-
Notifications
You must be signed in to change notification settings - Fork 7
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
Web changes for NWB conversion #344
base: master
Are you sure you want to change the base?
Changes from all commits
e538ff8
5da4fbe
75a9e4b
66878c3
e47d48c
ae6650e
be56f64
f4e288f
9399c6b
b260596
dac7984
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{% extends "benchmarks/components/app-view.html" %} | ||
{% load static %} | ||
|
||
{% block banner %} | ||
<h1> Convert NWB Data </h1> | ||
<p>Here you can convert your NWB data to a BrainScore Benchmark!</p> | ||
{% endblock %} | ||
|
||
{% block info_section %} | ||
{% include "benchmarks/tutorials/tutorial-info-section.html" %} | ||
{% endblock %} | ||
|
||
|
||
{% block content %} | ||
|
||
{% if user %} | ||
<div class="box leaderboard-table-component"> | ||
<h4 class="title is-4"> To convert, upload a JSON file containing the required NWB metadata.</h4> | ||
<br> | ||
|
||
<p>Feel free to download a reference template JSON file <a href="{% static "benchmarks/example_json.json" %}" download> here</a>, | ||
and fill in the required values.</p> | ||
<br> | ||
|
||
<form action="" method="post" enctype="multipart/form-data"> | ||
{% csrf_token %} | ||
|
||
{% for field in form %} | ||
<p class="special"> | ||
<br> | ||
{{ field.label_tag }} | ||
<br> | ||
{{ field }} | ||
<br> | ||
{% if field.help_text %} | ||
<small style="display: none">{{ field.help_text }}</small> | ||
{% endif %} | ||
{% for error in field.errors %} | ||
<p style="color: red">{{ error }}</p> | ||
{% endfor %} | ||
</p> | ||
{% endfor %} | ||
</p> | ||
<br> | ||
<button type="submit" class="button submission">Package Data</button> | ||
<br> | ||
</form> | ||
<br> | ||
<button onclick="location.href='logout/'" type="button" class="button button-primary tutorial_no_top">Logout</button> | ||
</div> | ||
{% else %} | ||
{% endif %} | ||
|
||
{% endblock %} | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,6 +43,7 @@ | |
path('profile/submit/', user.Upload.as_view(domain="vision"), name=f'vision-submit'), | ||
path('profile/resubmit/', partial(user.resubmit, domain="vision"), name='vision-resubmit'), | ||
path('profile/logout/', user.Logout.as_view(domain="vision"), name='vision-logout'), | ||
path('profile/nwb/', user.ConvertNWB.as_view(domain="vision"), name=f'convert-nwb'), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mike-ferguson to double check domain-specific url approach There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @mike-ferguson just checking if the endpoint is good as is or if it should be profile/vision/nwb/? |
||
|
||
# central tutorial page, constant across all Brain-Score domains | ||
path('tutorials/', user.Tutorials.as_view(tutorial_type="tutorial"), name='tutorial'), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"dandiset_id": "000788", | ||
"nwb_file_path": "sub-pico/sub-pico_ecephys.nwb", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note to change values to descriptors |
||
"identifier": "DataGenerationTrial_emogan", | ||
"assembly": { | ||
"region": ["IT"], | ||
"presentation": 8500, | ||
"neuroid": 18, | ||
"start_time_ms": 0, | ||
"stop_time_ms": 300, | ||
"tb_ms": 10 | ||
}, | ||
"stimulus_set": { | ||
"length": 170 | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a domain-specific button/address? For example, submission is at
http://{{ request.get_host }}/profile/{{ domain }}/submit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave as is for now, look for a place to add a disclaimer that this is only for vision