Skip to content

Commit

Permalink
Add templates to test
Browse files Browse the repository at this point in the history
  • Loading branch information
William Strecker-Kellogg committed May 24, 2021
1 parent 12c304e commit 6d981d4
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 253 deletions.
2 changes: 0 additions & 2 deletions sdccjupyter/forms/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
from .icform import ICForm
from .omniform import OmniForm
from .otherforms import *
70 changes: 0 additions & 70 deletions sdccjupyter/forms/icform.py

This file was deleted.

60 changes: 0 additions & 60 deletions sdccjupyter/forms/otherforms.py

This file was deleted.

3 changes: 2 additions & 1 deletion sdccjupyter/spawners/condor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
from traitlets import Unicode

from batchspawner import CondorSpawner
from .pathoverride import PathOverrideMixin

from ..formspawners import FormMixin


class SDCCCondorSpawner(FormMixin, CondorSpawner):
class SDCCCondorSpawner(FormMixin, PathOverrideMixin, CondorSpawner):

# Maybe allow singularity-image selection logic some day too?
req_scontainer = Unicode('')
Expand Down
49 changes: 0 additions & 49 deletions sdccjupyter/static/cfn.html

This file was deleted.

41 changes: 0 additions & 41 deletions sdccjupyter/static/knl.html

This file was deleted.

14 changes: 0 additions & 14 deletions sdccjupyter/static/nsls.html

This file was deleted.

41 changes: 26 additions & 15 deletions sdccjupyter/static/sdcc.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,48 +21,47 @@

<!-- Tab panes -->
<div class="tab-content">

<!-- *********************** SLURM Form ************************ -->
<div role="tabpanel" class="tab-pane" id="hpc">
<h4>Run a notebook on the IC Cluster</h4>
{% if partitions|length > 0 -%}
<fieldset id="icform">
<div class="form-group row">
<div class="col-sm-3">
<div class="col-lg-3 col-md-6">
<label for="partition">Select Partition</label>
<select id="partition" class="form-control" name="req_partition" onchange="updatedPartition()">
{% for name, _ in partitions %}
<option value="{{ name }}">{{ name }}</option>
{% endfor %}
</select>
</div>
<div class="col-sm-3">
<div class="col-lg-3 col-md-6">
<label for="account">Select Account</label>
<select id="account" class="form-control" name="req_account" onchange="updatedAccount()">

</select>
</div>
<div class="col-sm-2">
<div class="col-lg-2 col-md-4">
<label for="qos">QOS</label>
<select id="qos" class="form-control" name="req_qos" onchange="">
</select>
</div>
<!-- </div> -->
<!-- <div class="form-group row"> -->
<div class="col-sm-2">
<div class="col-lg-2 col-md-4">
<label for="account">GPU</label>
<select class="form-control" id="container" name="req_gputype" />
<option value="">any</option>
<option value="pascal">Pascal</option>
<option value="tesla">Tesla</option>
<select />
</div>
<div class="col-sm-2">
<div class="col-lg-2 col-md-4">
<label for="runtime">Runtime (min)</label>
<input type="number" class="form-control" max=960 min=30 step=30 value="120" id="runtime"
name="req_runtime" />
</div>
</div>
<div class="form-group row">
<div class="col-sm-8">
<div class="col-lg-6 col-md-8">
<button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#hideextrafields"
aria-expanded="false" aria-controls="hideextrafields">
+
Expand All @@ -79,25 +78,34 @@ <h4>Run a notebook on the IC Cluster</h4>
<input name="local" hidden=true value="true" />
<p class="col-sm-12 text-danger bg-warning"> WARNING: You are not in any SLURM
partitions, please request membership via <a
href="mailto:[email protected]">[email protected]</a>,
you can only spawn locally!
href="mailto:[email protected]">[email protected]</a>
</p>
</div>
{% endif -%}
</div>


<!-- *********************** HTCondor Form ************************ -->
<div role="tabpanel" class="tab-pane" id="htc">
<h4>Run a notebook on the HTCondor batch-farm requesting CPU/RAM</h4>
<div class="form group row">
<div class="col-sm-3">
<div class="form-group row">
<div class="col-sm-5 col-md-3">
<label for="runtime">Dedicated CPUs</label>
<input type="number" class="form-control" max=64 min=1 step=1 value="1" id="cpus" name="cpus" />
</div>
<div class="col-sm-3">
<div class="col-sm-5 col-md-3">
<label for="runtime">Memory (Mb)</label>
<input type="number" class="form-control" max=64000 min=200 step=50 value="1500" id="ram" name="ram" />
<input type="number" class="form-control" max=64000 min=300 step=100 value="1500" id="ram" name="ram" />
</div>
</div>
<div class="form-group row">
<p class="col-sm-8 text-danger bg-warning" style="margin-left: 1em">
WARNING: This may time-out if the condor farm is very busy and/or if you request a lot of resources
</p>
</div>
</div>

<!-- ******************** No Form Just Spawn ******************* -->
<div role="tabpanel" class="tab-pane active" id="lbpool">
<h4>Run a notebook on a standard interactive HTCondor submit-node</h4>
</div>
Expand All @@ -115,6 +123,9 @@ <h4>Run a notebook on a standard interactive HTCondor submit-node</h4>
#tabs {
margin-bottom: 20px;
}
div.form-group > div {
margin-top: 10px;
}
</style>
<script type="text/javascript">
function disableicform() {
Expand Down
4 changes: 4 additions & 0 deletions sdccjupyter/templates/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{% extends "home.html" %}
{% block main %}
{{ super() }}
{% endblock %}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def main():
setup(
name = 'sdccjupyter',
packages = find_packages(),
package_data = {'sdccjupyter': ['conf/*.cfg', 'cron/*', 'static/*.html']},
package_data = {'sdccjupyter': ['conf/*.cfg', 'cron/*', 'static/*.html', 'templates/*.html']},
version = VERSION,
description = """SDCC Jupyter Spawners""",
long_description = "",
Expand Down

0 comments on commit 6d981d4

Please sign in to comment.