-
Notifications
You must be signed in to change notification settings - Fork 2
Add view to run experiments based on a given entity version #138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
f9e07bf
ignore my PyCharm files
skeating d8167d0
Merge remote-tracking branch 'origin/master' into 67-add-view-run-exp
skeating 01969b8
Finally sorted the url and getting a new page displayed
skeating f274d1c
corrected name as can use run experiments with either models/protocols
skeating c2aade3
change name model -> entity
skeating bf4174b
page no lists the appropriate things - tackling version next
skeating e93247c
fixed test that worked locally but not in github
skeating 88ecc0a
sorted the view for my model/protocols
skeating 5b04abf
add force override checkbox
skeating 441a1bb
My local set up is not letting me play with js files so adding them s…
skeating bc4de21
add url test for runexperiments
skeating 898e589
getting checkboxes to work as indicated
skeating b79fc2c
checkboxes not working as hoped try again
skeating 7e07e6f
trying checkboxes again
skeating 010f601
sorry changed context and forgot tests
skeating b0f360f
typo in comments
skeating 9f6a427
Try Jonathan's suggestion to sort checkboxes
skeating 964d8d0
Made EntityRunExperimentView also inherit PermissionRequiredMixin
skeating 00bb989
start with latest versions checked
skeating 6f1019f
update tests for adding permission to run experiment view
skeating b56a372
try again with tests - my local setup is clearly not completely accur…
skeating 3718b94
think I've got it- sorted the tests for permissions on runExperiment
skeating 75db07d
<ul> tag should be outside for loop
skeating cf45cd2
improve query speed
skeating 0a2dac4
change wording of force override button
skeating 12d466d
only show Run experiment button if user has permission to create expe…
skeating 626b5ed
changed hard coded 'model' to get correct entity type
skeating 9d61b18
Merge remote-tracking branch 'origin/submit-expt-improvements' into 6…
skeating dde92d2
In teh interest of time pushing my development work to git so I get a…
skeating 29415f6
trying to see if this works
skeating dd6e4e9
am I actually picking up experiments
skeating 4137ec8
that confirmed my suspicions - take out the 404 code that I added to …
skeating d377474
Merge remote-tracking branch 'origin/master' into 67-add-view-run-exp
skeating 5ca1340
Merge remote-tracking branch 'origin/master' into 67-add-view-run-exp
skeating 65e7afe
finally got tings working so I add experiments to PlannedExperiments
skeating c6ad76f
divide listed entities into 'My' and 'Other'
skeating 5a27adf
testing of my vs other lists and running experiments
skeating bba5e24
Merge remote-tracking branch 'origin/master' into 67-add-view-run-exp
skeating 9b1e47d
Got the force or not to force rerun checkbox working
skeating e1bf92d
changed spelling of function to be more python-esque Thanks Michael
skeating 2986d68
changed name and added additional test for no checkboxes checked
skeating dcf1a71
few more changes from Jonathan - mostly syntax
skeating 4b7ded9
more changes from Jonathan
skeating 6f6c64b
missed a line
skeating 114f0b6
filter for experiments with or whithout versions
skeating bdb41e1
add test for experiment no versions
skeating e555f0a
took out if permission to create experiment
skeating 9874020
add newline at eof
skeating a3a4e6d
Creating expts & editing entities are independent permissions
jonc125 e616eaf
Funkier way of setting filter args
jonc125 79334c2
Correct experiment with no versions test
jonc125 5f501c7
Associate run experiments view with an entity _version_
jonc125 24d783b
Fix templatetag test
jonc125 775307f
Merge branch 'master' into 67-add-view-run-exp
jonc125 20d73fb
pick relevant commits that went into 182-fitting branch
skeating 955c620
Force text to be inline rather than separate lines
skeating d93574c
Shrink display further
jonc125 8fd191b
add tests for run experiment view of not latest version of an entity
skeating a4dbf1c
Test that post runxperiments also works with not latest version
skeating File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
|
|
||
| var RunExperiment = function() {}; | ||
|
|
||
| RunExperiment.prototype = { | ||
| init: function() { | ||
| $("#checkallbutton").click (function () { | ||
| $(".latestexperimentCheckBox").each (function () { | ||
| $(this).prop('checked', true) | ||
| }); | ||
| $(".experimentCheckBox").each (function () { | ||
| $(this).prop('checked', true) | ||
| }); | ||
| }); | ||
| $("#uncheckallbutton").click (function () { | ||
| $(".latestexperimentCheckBox").each (function () { | ||
| $(this).prop('checked', false) | ||
| }); | ||
| $(".experimentCheckBox").each (function () { | ||
| $(this).prop('checked', false) | ||
| }); | ||
| }); | ||
| $("#checklatestbutton").click (function () { | ||
| $(".latestexperimentCheckBox").each (function () { | ||
| $(this).prop('checked', true) | ||
| }); | ||
| $(".experimentCheckBox").each (function () { | ||
| $(this).prop('checked', false) | ||
| }); | ||
| }); | ||
| } | ||
| }; | ||
|
|
||
|
|
||
| $(document).ready(function() { | ||
| if ($("#runexperiment").length > 0) { | ||
| var page = new RunExperiment(); | ||
| page.init(); | ||
| } | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| {% extends "base.html" %} | ||
| {% load staticfiles %} | ||
| {% load entities %} | ||
|
|
||
| {% block title %}Experiment: run specific combinations - {% endblock title %} | ||
|
|
||
| {% block body_id %}runexperiment{% endblock %} | ||
|
|
||
| {% block content %} | ||
| <h1 id="entityname">Run experiments using <span>{{ entity.name }}</span></h1> | ||
|
|
||
| <button id="checkallbutton">check all</button> | ||
| <button id="checklatestbutton">check latest</button> | ||
| <button id="uncheckallbutton">uncheck all</button> | ||
| <form action="" method="post"> | ||
| {% csrf_token %} | ||
| <button id="savebutton">run experiments</button> | ||
| <p> | ||
| <input class="overrideCheckBox" type="checkbox" name="rerun_expts"/> | ||
| Create new versions of existing experiments (if unchecked, existing combinations will be skipped) | ||
| </p> | ||
|
|
||
|
|
||
| <p>You may run this {{ type }} {{ preposition }} the following {{ other_type }}s.</p> | ||
|
|
||
| <h2> Your {{ other_type }}s</h2> | ||
|
|
||
| <!-- list each entity and all versions of that entity --> | ||
| {% for entity_object in object_list %} | ||
|
|
||
| <strong>{{ entity_object.name }}</strong> | ||
| <ul> | ||
| {% for entity_version in entity_object.versions %} | ||
|
|
||
| <li> | ||
| <p> | ||
| {% if entity_version.latest %} | ||
|
|
||
| <input class="latestexperimentCheckBox" type="checkbox" | ||
| value="{{ entity_object.id }}:{{ entity_version.commit.hexsha }}" | ||
| name="model_protocol_list[]" | ||
| checked/> | ||
| {% else %} | ||
| <input class="experimentCheckBox" type="checkbox" | ||
| value="{{ entity_object.id }}:{{ entity_version.commit.hexsha }}" | ||
| name="model_protocol_list[]"/> | ||
| {% endif %} | ||
| <strong> | ||
| <a class="entityversionlink" href="{{ entity|url_version:entity_version.commit }}"> | ||
| {% include "./includes/version_name.html" with tags=entity_version.tags version=entity_version.commit only %} | ||
| </a> | ||
| </strong> | ||
| <span class="suppl"><small style="display: inline;">by <em>{{ entity_version.commit.author }}</em> | ||
| created <time>{{ entity_version.commit.committed_at }}</time></small></span><br/> | ||
| <span class="suppl"> | ||
| {{ entity_version.commit.message|linebreaksbr }} | ||
| </span> | ||
| </p> | ||
| </li> | ||
| {% endfor %} | ||
| </ul> | ||
| {% endfor %} | ||
|
|
||
| <h2> Other {{ other_type }}s</h2> | ||
|
|
||
| <!-- list each entity and all versions of that entity --> | ||
| {% for entity_object in other_object_list %} | ||
|
|
||
| <strong>{{ entity_object.name }}</strong> | ||
| <ul> | ||
| {% for entity_version in entity_object.versions %} | ||
|
|
||
| <li> | ||
| <p> | ||
| {% if entity_version.latest %} | ||
|
|
||
| <input class="latestexperimentCheckBox" type="checkbox" | ||
| value="{{ entity_object.id }}:{{ entity_version.commit.hexsha }}" | ||
| name="model_protocol_list[]" | ||
| checked/> | ||
| {% else %} | ||
| <input class="experimentCheckBox" type="checkbox" | ||
| value="{{ entity_object.id }}:{{ entity_version.commit.hexsha }}" | ||
| name="model_protocol_list[]"/> | ||
| {% endif %} | ||
| <strong> | ||
| <a class="entityversionlink" href="{{ entity|url_version:entity_version.commit }}"> | ||
| {% include "./includes/version_name.html" with tags=entity_version.tags version=entity_version.commit only %} | ||
| </a> | ||
| </strong> | ||
| by <em>{{ entity_version.commit.author }}</em><br/> | ||
| <span class="suppl"> | ||
| <small style="display: inline;">created </small> <time>{{ entity_version.commit.committed_at }}</time> | ||
| {% with entity_version.commit.filenames|length as numfiles %} | ||
| <small style="display: inline;">containing</small> {{ numfiles }} file{{ numfiles|pluralize }} | ||
| {% endwith %} | ||
| </span><br/> | ||
| <span class="suppl"> | ||
| {{ entity_version.commit.message|linebreaksbr }} | ||
| </span> | ||
| </p> | ||
| </li> | ||
| {% endfor %} | ||
| </ul> | ||
| {% endfor %} | ||
|
|
||
| </form> | ||
|
|
||
| {% endblock %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.