@@ -27,7 +27,7 @@
Manage
-
diff --git a/physionet-django/console/urls.py b/physionet-django/console/urls.py
index 22cd5853f2..e1d8e1b9f6 100644
--- a/physionet-django/console/urls.py
+++ b/physionet-django/console/urls.py
@@ -134,6 +134,7 @@
path('process_pages//show/', views.process_pages_show, name='process_pages_show'),
path('process_pages/step_details//show/', views.step_details_show, name='step_details_show'),
path('process_pages/step_details//edit/', views.step_details_edit, name='step_details_edit'),
+ path('process_pages/step_details//delete/', views.step_details_delete, name='step_details_delete'),
path('licenses/', views.license_list, name='license_list'),
path('licenses//', views.license_detail, name='license_detail'),
diff --git a/physionet-django/console/views.py b/physionet-django/console/views.py
index c2d7ab89ff..ec47478fc4 100644
--- a/physionet-django/console/views.py
+++ b/physionet-django/console/views.py
@@ -2896,8 +2896,8 @@ def step_details_edit(request, step_details_pk):
step_details_form = forms.StepDetailsForm(instance=step_detail, data=request.POST)
if step_details_form.is_valid():
step_details_form.save()
- messages.success(request, "The static page was successfully edited.")
- return HttpResponseRedirect(reverse('static_pages'))
+ messages.success(request, f'The {step_detail} section was successfully edited.')
+ return HttpResponseRedirect(reverse('process_pages'))
else:
step_details_form = forms.StepDetailsForm(instance=step_detail)
@@ -2906,6 +2906,15 @@ def step_details_edit(request, step_details_pk):
'console/process_pages/step_details/edit.html',
{'step_detail': step_detail, 'step_details_form': step_details_form})
+@console_permission_required('physionet.change_staticpage')
+def step_details_delete(request, step_details_pk):
+ step_detail = get_object_or_404(StepDetails, pk=step_details_pk)
+ if request.method == 'POST':
+ step_detail.delete()
+ messages.success(request, f'The {step_detail} section was successfully deleted.')
+
+ return HttpResponseRedirect(reverse('process_pages'))
+
@console_permission_required('project.add_license')
def license_list(request):
if request.method == 'POST':
From 380789fb868082e6fc2159465635b779b60a993c Mon Sep 17 00:00:00 2001
From: rutvikrj26
Date: Wed, 8 May 2024 17:17:37 -0400
Subject: [PATCH 04/10] Updated the views, templates and admin console,
completing the cycle for adding and modifying the copy for create project
workflow
---
.../console/process_pages/index.html | 4 +-
physionet-django/console/urls.py | 2 +-
physionet-django/console/views.py | 15 +-
.../physionet/fixtures/project_copy.json | 1 +
.../physionet/fixtures/steps.json | 429 +++++++++++-------
...ction_options_alter_stepdetails_options.py | 21 +
..._step_process_name_process_step_process.py | 49 ++
physionet-django/physionet/models.py | 46 +-
.../templates/project/project_access.html | 55 +--
.../templates/project/project_authors.html | 34 --
.../templates/project/project_content.html | 81 ++--
.../templates/project/project_discovery.html | 65 +--
.../templates/project/project_ethics.html | 57 ++-
.../templates/project/project_files.html | 180 ++++----
.../templates/project/project_overview.html | 112 ++---
.../templates/project/project_proofread.html | 20 +-
.../templates/project/project_submission.html | 1 -
physionet-django/project/views.py | 46 +-
18 files changed, 705 insertions(+), 513 deletions(-)
create mode 100644 physionet-django/physionet/fixtures/project_copy.json
create mode 100644 physionet-django/physionet/migrations/0009_alter_section_options_alter_stepdetails_options.py
create mode 100644 physionet-django/physionet/migrations/0010_remove_step_process_name_process_step_process.py
diff --git a/physionet-django/console/templates/console/process_pages/index.html b/physionet-django/console/templates/console/process_pages/index.html
index 9154b1b914..96cbdfb2bb 100644
--- a/physionet-django/console/templates/console/process_pages/index.html
+++ b/physionet-django/console/templates/console/process_pages/index.html
@@ -22,9 +22,9 @@
{% for process in processes %}
- {{ process.process_name|title }}
+ {{ process.title }}
- Manage
+ Manage
{% endfor %}
diff --git a/physionet-django/console/urls.py b/physionet-django/console/urls.py
index e1d8e1b9f6..4806a9cb01 100644
--- a/physionet-django/console/urls.py
+++ b/physionet-django/console/urls.py
@@ -131,7 +131,7 @@
# create project pages
path('process_pages/', views.process_pages, name='process_pages'),
- path('process_pages//show/', views.process_pages_show, name='process_pages_show'),
+ path('process_pages//show/', views.process_pages_show, name='process_pages_show'),
path('process_pages/step_details//show/', views.step_details_show, name='step_details_show'),
path('process_pages/step_details//edit/', views.step_details_edit, name='step_details_edit'),
path('process_pages/step_details//delete/', views.step_details_delete, name='step_details_delete'),
diff --git a/physionet-django/console/views.py b/physionet-django/console/views.py
index ec47478fc4..d786dce418 100644
--- a/physionet-django/console/views.py
+++ b/physionet-django/console/views.py
@@ -32,7 +32,7 @@
from physionet.forms import set_saved_fields_cookie
from physionet.middleware.maintenance import ServiceUnavailable
from physionet.utility import paginate
-from physionet.models import FrontPageButton, Section, StaticPage, Step, StepDetails
+from physionet.models import FrontPageButton, Section, StaticPage, Process, Step, StepDetails
from project import forms as project_forms
from project.models import (
GCP,
@@ -2855,23 +2855,24 @@ def process_pages(request):
"""
Display a list of redirected URLs.
"""
- processes_name = Step.objects.all().distinct('process_name').order_by('process_name')
+ # Get the list of all the available process_names
+ processes = Process.objects.all()
return render(
request,
'console/process_pages/index.html',
- {'processes': processes_name})
+ {'processes': processes})
@console_permission_required('physionet.change_staticpage')
-def process_pages_show(request, step_pk):
+def process_pages_show(request, process_slug):
"""
Display a list of redirected URLs.
"""
- step = get_object_or_404(Step, pk=step_pk)
- steps = Step.objects.filter(process_name=step.process_name)
+ process = Process.objects.get(slug=process_slug)
+ steps = Step.objects.filter(process=process).order_by('order')
return render(
request,
'console/process_pages/show.html',
- {'steps': steps, 'process_name': step.process_name})
+ {'steps': steps, 'process_name': process.title})
@console_permission_required('physionet.change_staticpage')
def step_details_show(request, step_pk):
diff --git a/physionet-django/physionet/fixtures/project_copy.json b/physionet-django/physionet/fixtures/project_copy.json
new file mode 100644
index 0000000000..894bb88698
--- /dev/null
+++ b/physionet-django/physionet/fixtures/project_copy.json
@@ -0,0 +1 @@
+[{"model": "physionet.process", "pk": 1, "fields": {"title": "Create Project", "slug": "create_project", "description": "Create a new project on Health Data Nexus."}}, {"model": "physionet.step", "pk": 1, "fields": {"title": "Overview", "process": 1, "slug": "create_project_overview", "order": 1}}, {"model": "physionet.step", "pk": 2, "fields": {"title": "Authors", "process": 1, "slug": "create_project_authors", "order": 2}}, {"model": "physionet.step", "pk": 3, "fields": {"title": "Content", "process": 1, "slug": "create_project_content", "order": 3}}, {"model": "physionet.step", "pk": 4, "fields": {"title": "Access", "process": 1, "slug": "create_project_access", "order": 4}}, {"model": "physionet.step", "pk": 5, "fields": {"title": "Discovery", "process": 1, "slug": "create_project_discovery", "order": 5}}, {"model": "physionet.step", "pk": 6, "fields": {"title": "Ethics", "process": 1, "slug": "create_project_ethics", "order": 6}}, {"model": "physionet.step", "pk": 7, "fields": {"title": "Files", "process": 1, "slug": "create_project_files", "order": 7}}, {"model": "physionet.step", "pk": 8, "fields": {"title": "Proofread", "process": 1, "slug": "create_project_proofread", "order": 8}}, {"model": "physionet.stepdetails", "pk": 1, "fields": {"title": "Preparing for Submission", "content": "To prepare the project for submission, go through the following steps using the side panel:
\n \n Invite authors to be credited for creating the resource. \n Fill in the descriptive metadata. \n Set the access policy and license. \n Add discovery information. \n Upload the files. \n Proofread the project and make sure it is ready for submission. \n The full publishing process is described in the\n author\nguidelines .
", "order": 1, "step": 1, "slug": "preparing_for_submission", "tip": false}}, {"model": "physionet.stepdetails", "pk": 2, "fields": {"title": "Project Authors", "content": "The submitting author is responsible for managing co-authors and handling the project\n submission. Co-authors can be invited using the form below. Once the co-author is registered on {{ SITE_NAME }}, \n the invitation will appear on their project home page. Authors must provide their affiliation on a project-by-project basis.
\n", "order": 1, "step": 2, "slug": "project_authors", "tip": false}}, {"model": "physionet.stepdetails", "pk": 3, "fields": {"title": "Corresponding Author", "content": "The corresponding author is responsible for responding to inquiries from users post publication.
", "order": 2, "step": 2, "slug": "corresponding_author", "tip": false}}, {"model": "physionet.stepdetails", "pk": 4, "fields": {"title": "Corresponding Email", "content": "You are the selected corresponding author. Choose one of your emails to be listed for correspondence.
\n", "order": 3, "step": 2, "slug": "corresponding_email", "tip": false}}, {"model": "physionet.stepdetails", "pk": 5, "fields": {"title": "Your Affiliations", "content": "Set up to three affiliations for your author profile. Note: these fields are not tied to your user profile.
\n", "order": 4, "step": 2, "slug": "your_affiliations", "tip": false}}, {"model": "physionet.stepdetails", "pk": 6, "fields": {"title": "Your Affiliations", "content": "Institutions you are affiliated with. Maximum of 3.", "order": 5, "step": 2, "slug": "your_affiliations_tip", "tip": true}}, {"model": "physionet.stepdetails", "pk": 7, "fields": {"title": "Submitting Author", "content": "Only the submitting author of a project is able to edit content.\n You may transfer the role of submitting author to a co-author.\n Choose one of the co-authors below to make them the submitting author for this project.\n Transferring authorship will remove your ability to edit content!
", "order": 6, "step": 2, "slug": "submitting_author", "tip": false}}, {"model": "physionet.stepdetails", "pk": 8, "fields": {"title": "Project Content", "content": "Describe the context of your resource, the organization of its files, and how it is to be reused.
Please adhere to the standards specified in the helpstrings. Required fields are indicated by a *.", "order": 1, "step": 3, "slug": "project_content", "tip": false}}, {"model": "physionet.stepdetails", "pk": 9, "fields": {"title": "Project Access", "content": "
Set the access policy and terms of reuse for your resource. The descriptive metadata of all published projects are publically visible. The following access policies control access to the files:
\n\n\n\tOpen : Anyone can access the files, as long as they conform to the terms of the specified license. \n\tRestricted : Only logged in users who sign a data use agreement (DUA) for the project can access the files. \n\tCredentialed : Only Health Data Nexus credentialed users who sign a DUA for the project can access the files. This tier is only for sensitive databases. Please contact us beforehand if you would like to contribute such a resource. \n \n\nWe strongly encourage selecting the open access policy.
", "order": 1, "step": 4, "slug": "project_access", "tip": false}}, {"model": "physionet.stepdetails", "pk": 10, "fields": {"title": "Project Discovery", "content": "Add information to increase your project's discoverability.
", "order": 1, "step": 5, "slug": "project_discovery", "tip": false}}, {"model": "physionet.stepdetails", "pk": 11, "fields": {"title": "Ethics", "content": "Please provide an ethics statement following the author guidelines . Statements on ethics approval should appear here. Your statement will be included in the public project description.
", "order": 1, "step": 6, "slug": "project_ethics", "tip": false}}, {"model": "physionet.stepdetails", "pk": 12, "fields": {"title": "Supporting Documentation", "content": "You may upload supporting documents here. These documents will be reviewed by our editorial staff, but they will not be shared publicly. For further guidance, please refer to our author guidelines .
", "order": 2, "step": 6, "slug": "supporting_documentation", "tip": false}}, {"model": "physionet.stepdetails", "pk": 13, "fields": {"title": "Project Files", "content": "Health Data Nexus resources should be reusable by the greater scientific community. To facilitate the reuse of your content, please adhere to the following reusability guidelines.
\n\nGeneral Guidelines
\n\n\n\tFiles must contain no protected health information . \n\tFiles are provided in an open format such as text, csv, or WFDB, rather than a proprietary format. \n\tCode must be provided in source format. \n\tData files must be machine readable. \n\tLarge regularly-sampled time-series data, especially waveforms, are provided in WFDB format. \n\tFilenames must only contain letters, numbers, dashes, underscores, and dots. \n\tIf appropriate, provide a csv file named subject-info.csv containing information on all subjects, such as age and gender. \n \n\nWFDB Files
\n\n\n\tProvide a list of all WFDB format records, named RECORDS . Example file . If you upload this file, you will see a link to view your project's waveforms in LightWAVE . \n\tProvide a tab delimited list of all WFDB format annotation files, named ANNOTATORS . Example file . \n ", "order": 1, "step": 7, "slug": "project_files", "tip": false}}, {"model": "physionet.stepdetails", "pk": 14, "fields": {"title": "Proofread", "content": "Inspect the preview of the published project, and ensure that all authors are satisfied with the content. Any errors that are displayed must be addressed before the project can be submitted for review.
", "order": 1, "step": 8, "slug": "project_proofread", "tip": false}}]
\ No newline at end of file
diff --git a/physionet-django/physionet/fixtures/steps.json b/physionet-django/physionet/fixtures/steps.json
index 6dac090251..d3d8c2cb17 100644
--- a/physionet-django/physionet/fixtures/steps.json
+++ b/physionet-django/physionet/fixtures/steps.json
@@ -1,176 +1,259 @@
[
-{
- "model": "physionet.step",
- "pk": 1,
- "fields": {
- "title": "Overview",
- "slug": "create_project_overview",
- "process_name": "Create Project",
- "order": 1
+ {
+ "model": "physionet.process",
+ "pk": 1,
+ "fields": {
+ "title": "Create Project",
+ "slug": "create_project",
+ "description": "Create a new project on Health Data Nexus."
+ }
+ },
+ {
+ "model": "physionet.step",
+ "pk": 1,
+ "fields": {
+ "title": "Overview",
+ "slug": "create_project_overview",
+ "process": 1,
+ "order": 1
+ }
+ },
+ {
+ "model": "physionet.step",
+ "pk": 2,
+ "fields": {
+ "title": "Authors",
+ "slug": "create_project_authors",
+ "process": 1,
+ "order": 2
+ }
+ },
+ {
+ "model": "physionet.step",
+ "pk": 3,
+ "fields": {
+ "title": "Content",
+ "slug": "create_project_content",
+ "process": 1,
+ "order": 3
+ }
+ },
+ {
+ "model": "physionet.step",
+ "pk": 4,
+ "fields": {
+ "title": "Access",
+ "slug": "create_project_access",
+ "process": 1,
+ "order": 4
+ }
+ },
+ {
+ "model": "physionet.step",
+ "pk": 5,
+ "fields": {
+ "title": "Discovery",
+ "slug": "create_project_discovery",
+ "process": 1,
+ "order": 5
+ }
+ },
+ {
+ "model": "physionet.step",
+ "pk": 6,
+ "fields": {
+ "title": "Ethics",
+ "slug": "create_project_ethics",
+ "process": 1,
+ "order": 6
+ }
+ },
+ {
+ "model": "physionet.step",
+ "pk": 7,
+ "fields": {
+ "title": "Files",
+ "slug": "create_project_files",
+ "process": 1,
+ "order": 7
+ }
+ },
+ {
+ "model": "physionet.step",
+ "pk": 8,
+ "fields": {
+ "title": "Proofread",
+ "slug": "create_project_proofread",
+ "process": 1,
+ "order": 8
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 1,
+ "fields": {
+ "step": 1,
+ "title": "Preparing for Submission",
+ "slug": "preparing_for_submission",
+ "content": "To prepare the project for submission, go through the following steps using the side panel:
\n \n Invite authors to be credited for creating the resource. \n Fill in the descriptive metadata. \n Set the access policy and license. \n Add discovery information. \n Upload the files. \n Proofread the project and make sure it is ready for submission. \n The full publishing process is described in the\n author\nguidelines .
",
+ "order": 1,
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 2,
+ "fields": {
+ "step": 2,
+ "title": "Project Authors",
+ "slug": "project_authors",
+ "content": "The submitting author is responsible for managing co-authors and handling the project\n submission. Co-authors can be invited using the form below. Once the co-author is registered on {{ SITE_NAME }}, \n the invitation will appear on their project home page. Authors must provide their affiliation on a project-by-project basis.
\n",
+ "order": 1,
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 3,
+ "fields": {
+ "step": 2,
+ "title": "Corresponding Author",
+ "slug": "corresponding_author",
+ "content": "The corresponding author is responsible for responding to inquiries from users post publication.
",
+ "order": 2,
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 4,
+ "fields": {
+ "step": 2,
+ "title": "Corresponding Email",
+ "slug": "corresponding_email",
+ "content": "You are the selected corresponding author. Choose one of your emails to be listed for correspondence.
\n",
+ "order": 3,
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 5,
+ "fields": {
+ "step": 2,
+ "title": "Your Affiliations",
+ "slug": "your_affiliations",
+ "content": "Set up to three affiliations for your author profile. Note: these fields are not tied to your user profile.
\n",
+ "order": 4,
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 6,
+ "fields": {
+ "step": 2,
+ "title": "Your Affiliations",
+ "slug": "your_affiliations_tip",
+ "content": "Institutions you are affiliated with. Maximum of 3.",
+ "order": 5,
+ "tip": true
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 7,
+ "fields": {
+ "step": 2,
+ "title": "Submitting Author",
+ "slug": "submitting_author",
+ "content": "Only the submitting author of a project is able to edit content.\n You may transfer the role of submitting author to a co-author.\n Choose one of the co-authors below to make them the submitting author for this project.\n Transferring authorship will remove your ability to edit content!
",
+ "order": 6,
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 8,
+ "fields": {
+ "step": 3,
+ "title": "Project Content",
+ "slug": "project_content",
+ "content": "Describe the context of your resource, the organization of its files, and how it is to be reused.
Please adhere to the standards specified in the helpstrings. Required fields are indicated by a *.",
+ "order": 1,
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 9,
+ "fields": {
+ "step": 4,
+ "title": "Project Access",
+ "slug": "project_access",
+ "content": "
Set the access policy and terms of reuse for your resource. The descriptive metadata of all published projects are publically visible. The following access policies control access to the files:
\n\nOpen : Anyone can access the files, as long as they conform to the terms of the specified license. \nRestricted : Only logged in users who sign a data use agreement (DUA) for the project can access the files. \nCredentialed : Only Health Data Nexus credentialed users who sign a DUA for the project can access the files. This tier is only for sensitive databases. Please contact us beforehand if you would like to contribute such a resource. \n \nWe strongly encourage selecting the open access policy.
",
+ "order": 1,
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 10,
+ "fields": {
+ "step": 5,
+ "title": "Project Discovery",
+ "slug": "project_discovery",
+ "content": "Add information to increase your project's discoverability.
",
+ "order": 1,
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 11,
+ "fields": {
+ "step": 6,
+ "title": "Ethics",
+ "slug": "project_ethics",
+ "content": "Please provide an ethics statement following the author guidelines. Statements on ethics approval should appear here. Your statement will be included in the public project description.
",
+ "order": 1,
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 12,
+ "fields": {
+ "step": 6,
+ "title": "Supporting Documentation",
+ "slug": "supporting_documentation",
+ "content": "You may upload supporting documents here. These documents will be reviewed by our editorial staff, but they will not be shared publicly. For further guidance, please refer to our author guidelines.
",
+ "order": 2,
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 13,
+ "fields": {
+ "step": 7,
+ "title": "Project Files",
+ "slug": "project_files",
+ "content": "\"content\": \"Health Data Nexus resources should be reusable by the greater scientific community. To facilitate the reuse of your content, please adhere to the following reusability guidelines.
\\nGeneral Guidelines
\\n\\nFiles must contain no protected health information. \\nFiles are provided in an open format such as text, csv, or WFDB, rather than a proprietary format. \\nCode must be provided in source format. \\nData files must be machine readable. \\nLarge regularly-sampled time-series data , especially waveforms, are provided in WFDB format. \\nFilenames must only contain letters, numbers, dashes, underscores, and dots. \\nIf appropriate , provide a csv file named subject-info.csv containing information on all subjects, such as age and gender. \\n \\nWFDB Files
\\n\\nProvide a list of all WFDB format records, named RECORDS. Example file. If you upload this file, you will see a link to view your project's waveforms in LightWAVE. \\nProvide a tab delimited list of all WFDB format annotation files, named ANNOTATORS. Example file. \\n \"",
+ "order": 1,
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 14,
+ "fields": {
+ "step": 8,
+ "title": "Proofread",
+ "slug": "project_proofread",
+ "content": "Inspect the preview of the published project, and ensure that all authors are satisfied with the content. Any errors that are displayed must be addressed before the project can be submitted for review.
",
+ "order": 1,
+ "tip": false
+ }
}
-},
-{
- "model": "physionet.step",
- "pk": 2,
- "fields": {
- "title": "Authors",
- "slug": "create_project_authors",
- "process_name": "Create Project",
- "order": 2
- }
-},
-{
- "model": "physionet.step",
- "pk": 3,
- "fields": {
- "title": "Content",
- "slug": "create_project_content",
- "process_name": "Create Project",
- "order": 3
- }
-},
-{
- "model": "physionet.step",
- "pk": 4,
- "fields": {
- "title": "Access",
- "slug": "create_project_access",
- "process_name": "Create Project",
- "order": 4
- }
-},
-{
- "model": "physionet.step",
- "pk": 5,
- "fields": {
- "title": "Discovery",
- "slug": "create_project_discovery",
- "process_name": "Create Project",
- "order": 5
- }
-},
-{
- "model": "physionet.step",
- "pk": 6,
- "fields": {
- "title": "Ethics",
- "slug": "create_project_ethics",
- "process_name": "Create Project",
- "order": 6
- }
-},
-{
- "model": "physionet.step",
- "pk": 7,
- "fields": {
- "title": "Files",
- "slug": "create_project_files",
- "process_name": "Create Project",
- "order": 7
- }
-},
-{
- "model": "physionet.step",
- "pk": 8,
- "fields": {
- "title": "Proofread",
- "slug": "create_project_proofread",
- "process_name": "Create Project",
- "order": 8
- }
-},
-{
- "model": "physionet.step",
- "pk": 9,
- "fields": {
- "title": "Submission",
- "slug": "create_project_submission",
- "process_name": "Create Project",
- "order": 9
- }
-},
-{
- "model": "physionet.stepdetails",
- "pk": 1,
- "fields": {
- "step": 1,
- "title": "Preparing for Submission",
- "slug": "preparing_for_submission",
- "content": "To prepare the project for submission, go through the following steps using the side panel:
\n \n Invite authors to be credited for creating the resource. \n Fill in the descriptive metadata. \n Set the access policy and license. \n Add discovery information. \n Upload the files. \n Proofread the project and make sure it is ready for submission. \n The full publishing process is described in the\n author\nguidelines .
",
- "order": 1,
- "tip": false
- }
-},
-{
- "model": "physionet.stepdetails",
- "pk": 2,
- "fields": {
- "step": 2,
- "title": "1. Project Authors",
- "slug": "project_authors",
- "content": "The submitting author is responsible for managing co-authors and handling the project\n submission. Co-authors can be invited using the form below. Once the co-author is registered on {{ SITE_NAME }}, \n the invitation will appear on their project home page. Authors must provide their affiliation on a project-by-project basis.
\n",
- "order": 1,
- "tip": false
- }
-},
-{
- "model": "physionet.stepdetails",
- "pk": 3,
- "fields": {
- "step": 2,
- "title": "Corresponding Author",
- "slug": "corresponding_author",
- "content": "The corresponding author is responsible for responding to inquiries from users post publication.
",
- "order": 2,
- "tip": false
- }
-},
-{
- "model": "physionet.stepdetails",
- "pk": 4,
- "fields": {
- "step": 2,
- "title": "Corresponding Email",
- "slug": "corresponding_email",
- "content": "You are the selected corresponding author. Choose one of your emails to be listed for correspondence.
\n",
- "order": 3,
- "tip": false
- }
-},
-{
- "model": "physionet.stepdetails",
- "pk": 5,
- "fields": {
- "step": 2,
- "title": "Your Affiliations",
- "slug": "your_affiliations",
- "content": "Set up to three affiliations for your author profile. Note: these fields are not tied to your user profile.
\n",
- "order": 4,
- "tip": false
- }
-},
-{
- "model": "physionet.stepdetails",
- "pk": 6,
- "fields": {
- "step": 2,
- "title": "Your Affiliations",
- "slug": "your_affiliations_tip",
- "content": "Institutions you are affiliated with. Maximum of 3.",
- "order": 5,
- "tip": true
- }
-},
-{
- "model": "physionet.stepdetails",
- "pk": 7,
- "fields": {
- "step": 2,
- "title": "Submitting Author",
- "slug": "submitting_author",
- "content": "Only the submitting author of a project is able to edit content.\n You may transfer the role of submitting author to a co-author.\n Choose one of the co-authors below to make them the submitting author for this project.\n Transferring authorship will remove your ability to edit content!
",
- "order": 6,
- "tip": false
- }
-}
]
\ No newline at end of file
diff --git a/physionet-django/physionet/migrations/0009_alter_section_options_alter_stepdetails_options.py b/physionet-django/physionet/migrations/0009_alter_section_options_alter_stepdetails_options.py
new file mode 100644
index 0000000000..090b735144
--- /dev/null
+++ b/physionet-django/physionet/migrations/0009_alter_section_options_alter_stepdetails_options.py
@@ -0,0 +1,21 @@
+# Generated by Django 4.2.11 on 2024-05-08 15:09
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ("physionet", "0008_step_alter_section_options_stepdetails"),
+ ]
+
+ operations = [
+ migrations.AlterModelOptions(
+ name="section",
+ options={"default_permissions": (), "ordering": ("order",)},
+ ),
+ migrations.AlterModelOptions(
+ name="stepdetails",
+ options={"default_permissions": (), "ordering": ("order",)},
+ ),
+ ]
diff --git a/physionet-django/physionet/migrations/0010_remove_step_process_name_process_step_process.py b/physionet-django/physionet/migrations/0010_remove_step_process_name_process_step_process.py
new file mode 100644
index 0000000000..d28f914ea0
--- /dev/null
+++ b/physionet-django/physionet/migrations/0010_remove_step_process_name_process_step_process.py
@@ -0,0 +1,49 @@
+# Generated by Django 4.2.11 on 2024-05-08 20:40
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ("physionet", "0009_alter_section_options_alter_stepdetails_options"),
+ ]
+
+ operations = [
+ migrations.RemoveField(
+ model_name="step",
+ name="process_name",
+ ),
+ migrations.CreateModel(
+ name="Process",
+ fields=[
+ (
+ "id",
+ models.AutoField(
+ auto_created=True,
+ primary_key=True,
+ serialize=False,
+ verbose_name="ID",
+ ),
+ ),
+ ("title", models.CharField(max_length=64)),
+ ("slug", models.CharField(max_length=64, unique=True)),
+ ("description", models.TextField(blank=True)),
+ ],
+ options={
+ "default_permissions": (),
+ "unique_together": {("title", "slug")},
+ },
+ ),
+ migrations.AddField(
+ model_name="step",
+ name="process",
+ field=models.ForeignKey(
+ default=None,
+ on_delete=django.db.models.deletion.CASCADE,
+ related_name="steps",
+ to="physionet.process",
+ ),
+ ),
+ ]
diff --git a/physionet-django/physionet/models.py b/physionet-django/physionet/models.py
index f98f5fedc6..596ecf0462 100644
--- a/physionet-django/physionet/models.py
+++ b/physionet-django/physionet/models.py
@@ -59,24 +59,18 @@ def delete(self, *args, **kwargs):
page.save()
-class AbstractSection(models.Model):
- title = models.CharField(max_length=64)
- content = SafeHTMLField(blank=True)
- order = models.PositiveSmallIntegerField(default=0)
-
- class Meta:
- abstract = True
- ordering = ('order',)
-
-
-class Section(AbstractSection):
+class Section(models.Model):
"""
Holds sections of content for StaticPage.
"""
+ title = models.CharField(max_length=64)
+ content = SafeHTMLField(blank=True)
+ order = models.PositiveSmallIntegerField(default=0)
static_page = models.ForeignKey(StaticPage, on_delete=models.CASCADE)
class Meta:
default_permissions = ()
+ ordering = ('order',)
unique_together = (('static_page', 'order'),)
def __str__(self):
@@ -154,12 +148,31 @@ def move_down(self):
self.order = order + 1
self.save()
+
+class Process(models.Model):
+ """
+ Refers to a workflow on the platform.
+ Eg: Creating a Project, Updating a License, etc.
+ To be used along with Step and StepDetails for storing web content
+ """
+ title = models.CharField(max_length=64)
+ slug = models.CharField(max_length=64, unique=True)
+ description = models.TextField(blank=True)
+
+ class Meta:
+ default_permissions = ()
+ unique_together = (('title', 'slug'),)
+
+ def __str__(self):
+ return self.title
+
+
class Step(models.Model):
"""
Holds sections of content for StaticPage.
"""
title = models.CharField(max_length=64)
- process_name = models.CharField(max_length=64)
+ process = models.ForeignKey(Process, on_delete=models.CASCADE, default=None, related_name='steps')
slug = models.CharField(max_length=64)
order = models.PositiveSmallIntegerField(default=0)
@@ -168,18 +181,23 @@ class Meta:
ordering = ('order',)
def __str__(self):
- return f"{self.process_name}: {self.title}"
+ return f"{self.process.title}: {self.title}"
-class StepDetails(AbstractSection):
+
+class StepDetails(models.Model):
"""
Holds sections of content for StaticPage.
"""
+ title = models.CharField(max_length=64)
+ content = SafeHTMLField(blank=True)
+ order = models.PositiveSmallIntegerField(default=0)
step = models.ForeignKey(Step, on_delete=models.CASCADE)
slug = models.CharField(max_length=64)
tip = models.BooleanField(default=False)
class Meta:
default_permissions = ()
+ ordering = ('order',)
unique_together = (('step', 'order'),)
def __str__(self):
diff --git a/physionet-django/project/templates/project/project_access.html b/physionet-django/project/templates/project/project_access.html
index 3454eb1c09..eb8c7b7821 100644
--- a/physionet-django/project/templates/project/project_access.html
+++ b/physionet-django/project/templates/project/project_access.html
@@ -5,35 +5,38 @@
{% block title %}Project Access - {{ project }}{% endblock %}
{% block main_content %}
-
-
+ {% with step_detail=step_details_dict.project_access %}
+
+
+
+ {{ step_detail.content|safe }}
+
+ {% endwith %}
-{% include 'about/access_policies.html'%}
+ {% if not project.author_editable %}
+
+ The project cannot be edited right now.
+
+ {% elif not is_submitting %}
+
+ Only the submitting author may edit the access information.
+
+ {% endif %}
-{% if not project.author_editable %}
-
- The project cannot be edited right now.
-
-{% elif not is_submitting %}
-
- Only the submitting author may edit the access information.
-
-{% endif %}
-
-
+
{% endblock %}
{% block local_js_bottom %}
-
-
+
+
{% endblock %}
diff --git a/physionet-django/project/templates/project/project_authors.html b/physionet-django/project/templates/project/project_authors.html
index 3675291600..819bff2a66 100644
--- a/physionet-django/project/templates/project/project_authors.html
+++ b/physionet-django/project/templates/project/project_authors.html
@@ -32,17 +32,10 @@
{% block main_content %}
{% with step_detail=step_details_dict.project_authors %}
- {% if step_detail %}
{{ step_detail.content|safe }}
- {% else %}
-
-
- {% include "about/authors.html" %}
-
- {% endif %}
{% endwith %}
{% if not project.author_editable %}
@@ -84,11 +77,7 @@ Outstanding Author Invitations
{% if is_submitting %}
{% with step_detail=step_details_dict.invite_author %}
- {% if step_detail %}
{{ step_detail.title }}
- {% else %}
- Invite Author
- {% endif %}
+ {% with step_detail=step_details_dict.project_content %}
+
+
+ {{ step_detail.content|safe }}
+ {% endwith %}
+
+
+ {% if not project.author_editable %}
+
+ The project cannot be edited right now.
+
+ {% elif not is_submitting %}
+
+ Only the submitting author may edit the content.
+
+ {% endif %}
+
+
{% endblock %}
{% block local_js_bottom %}
-
-
-
-{# Disable submission if not currently editable or not submitting author #}
-{% if not is_submitting or not project.author_editable %}
-
-{% endif %}
+
+
+
+ {# Disable submission if not currently editable or not submitting author #}
+ {% if not is_submitting or not project.author_editable %}
+
+ {% endif %}
{% endblock %}
diff --git a/physionet-django/project/templates/project/project_discovery.html b/physionet-django/project/templates/project/project_discovery.html
index 40e92c8f78..3e73128f55 100644
--- a/physionet-django/project/templates/project/project_discovery.html
+++ b/physionet-django/project/templates/project/project_discovery.html
@@ -5,40 +5,45 @@
{% block title %}Project Discovery - {{ project }}{% endblock %}
{% block local_js_top %}
-
-
+
+
{% endblock %}
{% block main_content %}
-
-
-{% include 'about/discovery.html' %}
-{% if not project.author_editable %}
-
- The project cannot be edited right now.
-
-{% elif not is_submitting %}
-
- Only the submitting author may edit these details.
-
-{% endif %}
-
-
+ {% with step_detail=step_details_dict.project_discovery %}
+
+
+
+
+ {{ step_detail.content|safe }}
+
+ {% endwith %}
+ {% if not project.author_editable %}
+
+ The project cannot be edited right now.
+
+ {% elif not is_submitting %}
+
+ Only the submitting author may edit these details.
+
+ {% endif %}
+
+
{% endblock %}
{% block local_js_bottom %}
-
-
-{# Disable submission if not currently editable or not submitting author #}
-{% if not is_submitting or not project.author_editable %}
-
-{% endif %}
+
+
+ {# Disable submission if not currently editable or not submitting author #}
+ {% if not is_submitting or not project.author_editable %}
+
+ {% endif %}
{% endblock %}
diff --git a/physionet-django/project/templates/project/project_ethics.html b/physionet-django/project/templates/project/project_ethics.html
index 17e5209e13..261d1839f1 100644
--- a/physionet-django/project/templates/project/project_ethics.html
+++ b/physionet-django/project/templates/project/project_ethics.html
@@ -5,33 +5,42 @@
{% block title %}Project Ethics - {{ project }}{% endblock %}
{% block main_content %}
-
-
-Please provide an ethics statement following the author guidelines . Statements on ethics approval should appear here. Your statement will be included in the public project description.
+ {% with step_detail=step_details_dict.project_ethics %}
+
+
+
+ {{ step_detail.content|safe }}
+
+ {% endwith %}
-{% if not project.author_editable %}
-
- The project cannot be edited right now.
-
- {% elif not is_submitting %}
-
- Only the submitting author may edit the approvals.
-
-{% endif %}
+ {% if not project.author_editable %}
+
+ The project cannot be edited right now.
+
+ {% elif not is_submitting %}
+
+ Only the submitting author may edit the approvals.
+
+ {% endif %}
-
+
{% endblock %}
{% block local_js_bottom %}
-
-
-
-
+
+
+
+
{% endblock %}
\ No newline at end of file
diff --git a/physionet-django/project/templates/project/project_files.html b/physionet-django/project/templates/project/project_files.html
index 61b8565a18..8af34989da 100644
--- a/physionet-django/project/templates/project/project_files.html
+++ b/physionet-django/project/templates/project/project_files.html
@@ -7,106 +7,108 @@
{% block title %}Project Files - {{ project }}{% endblock %}
{% block local_js_top %}
-
-
+
+
{% endblock %}
{% block local_css %}
-
-
+
+
{% endblock %}
{% block main_content %}
-
-
-{% include "about/files.html" %}
-
-
-{% if not project.author_editable %}
-
- The project cannot be edited right now.
-
-{% elif not is_submitting %}
-
- Only the submitting author may manage files and request more storage.
-
-{% elif maintenance_message %}
-
- {{ maintenance_message }}
-
-{% endif %}
-
-
- {% include "project/project_storage_allowance.html" %}
+ {% with step_detail=step_details_dict.project_files %}
+
+
+ {{ step_detail.content|safe }}
- {% if storage_request %}
-
Storage request for {{ storage_request.request_allowance }}GB pending.
- {% if files_editable %}
-
Cancel Request
-
-
+ {% endwith %}
+
+ {% if not project.author_editable %}
+
+ The project cannot be edited right now.
+
+ {% elif not is_submitting %}
+
+ Only the submitting author may manage files and request more storage.
- {% endif %}
+ {% elif maintenance_message %}
+
+ {{ maintenance_message }}
+
+ {% endif %}
+
+
+ {% include "project/project_storage_allowance.html" %}
+
+ {% if storage_request %}
+
Storage request for {{ storage_request.request_allowance }}GB pending.
+ {% if files_editable %}
+
Cancel Request
+
+ {% endif %}
- {% else %}
- {% if files_editable %}
-
- Request Storage
-
+ {% else %}
+ {% if files_editable %}
+
+ Request Storage
+
-
-
+
+ {% endif %}
+ {% endif %}
- {% endif %}
+
+
+ {% if is_lightwave_supported %}
+ {% if project.has_wfdb %}
+
Visualize waveforms
+ {% endif %}
{% endif %}
-
-
-
-{% if is_lightwave_supported %}
- {% if project.has_wfdb %}
-
Visualize waveforms
- {% endif %}
-{% endif %}
-{% include "project/edit_files_panel.html" %}
+ {% include "project/edit_files_panel.html" %}
{% endblock %}
diff --git a/physionet-django/project/templates/project/project_overview.html b/physionet-django/project/templates/project/project_overview.html
index 32424e63d9..dcbe9bc101 100644
--- a/physionet-django/project/templates/project/project_overview.html
+++ b/physionet-django/project/templates/project/project_overview.html
@@ -6,73 +6,61 @@
{% load project_templatetags %}
{% block local_js_top %}
-
-
+
+
{% endblock %}
{% block main_content %}
-
-
+
+
-
- {{ project.resource_type.id|resource_badge|safe }}
- {% if project.under_submission %}
- Under Submission
- {% endif %}
-
-
- Created {{ project.creation_datetime|date }} Modified {{ project.modified_datetime|date }}
-
-
- Submitting Author: {{ submitting_author.disp_name_email }}
-
-
+
+ {{ project.resource_type.id|resource_badge|safe }}
+ {% if project.under_submission %}
+ Under Submission
+ {% endif %}
+
+
+ Created {{ project.creation_datetime|date }} Modified {{ project.modified_datetime|date }}
+
+
+ Submitting Author: {{ submitting_author.disp_name_email }}
+
+
-
-{% with step_detail=step_details_dict.preparing_for_submission %}
- {% if step_detail %}
-
{{ step_detail.title }}
-
- {{ step_detail.content|safe }}
-
- {% else %}
-
Preparing for Submission
-
-
To prepare the project for submission, go through the following steps using the side panel:
-
- {% include "about/preparation_checklist.html" %}
-
The full publishing process is described in the
- author
- guidelines .
- {% endif %}
-{% endwith %}
-
-{% if is_submitting %}
-
- Delete Project
-
-
-
-{% endif %}
+ {% endif %}
{% endblock %}
diff --git a/physionet-django/project/templates/project/project_proofread.html b/physionet-django/project/templates/project/project_proofread.html
index 281566245c..b237414818 100644
--- a/physionet-django/project/templates/project/project_proofread.html
+++ b/physionet-django/project/templates/project/project_proofread.html
@@ -3,13 +3,17 @@
{% block title %}Project Proofread - {{ project }}{% endblock %}
{% block main_content %}
-
-
-{% include "about/proofread.html" %}
-
-
-
+ {% with step_detail=step_details_dict.project_proofread %}
+
+
+
+ {{ step_detail.content|safe }}
+
+ {% endwith %}
+
+
+
{% endblock %}
diff --git a/physionet-django/project/templates/project/project_submission.html b/physionet-django/project/templates/project/project_submission.html
index 8bf01b77cd..65d55c5add 100644
--- a/physionet-django/project/templates/project/project_submission.html
+++ b/physionet-django/project/templates/project/project_submission.html
@@ -48,7 +48,6 @@
}
-
{% if not project.under_submission %}
diff --git a/physionet-django/project/views.py b/physionet-django/project/views.py
index d1f47749fa..474af5e011 100644
--- a/physionet-django/project/views.py
+++ b/physionet-django/project/views.py
@@ -784,10 +784,15 @@ def project_content(request, project_slug, **kwargs):
'Invalid submission. See errors below.')
edit_url = reverse('edit_content_item', args=[project.slug])
+ project_content_step = Step.objects.get(slug='create_project_content')
+ project_content_step_details = StepDetails.objects.filter(step=project_content_step)
+ step_details_dict = { step_detail.slug: step_detail for step_detail in project_content_step_details }
+
response = render(request, 'project/project_content.html', {'project':project,
'description_form':description_form, 'reference_formset':reference_formset,
'messages':messages.get_messages(request),
'is_submitting':is_submitting,
+ 'step_details_dict': step_details_dict,
'add_item_url':edit_url, 'remove_item_url':edit_url})
if saved:
set_saved_fields_cookie(description_form, request.path, response)
@@ -824,9 +829,15 @@ def project_access(request, project_slug, **kwargs):
else:
access_form = forms.AccessMetadataForm(instance=project, editable=editable)
+ project_access_step = Step.objects.get(slug='create_project_access')
+ project_access_step_details = StepDetails.objects.filter(step=project_access_step)
+ step_details_dict = {step_detail.slug: step_detail for step_detail in project_access_step_details}
- return render(request, 'project/project_access.html', {'project':project,
- 'access_form':access_form, 'is_submitting':kwargs['is_submitting']})
+ return render(request, 'project/project_access.html',
+ {'project': project,
+ 'access_form': access_form,
+ 'is_submitting': kwargs['is_submitting'],
+ 'step_details_dict': step_details_dict})
@project_auth(auth_mode=0, post_auth_mode=2)
@@ -875,11 +886,17 @@ def project_discovery(request, project_slug, **kwargs):
else:
messages.error(request, 'Invalid submission. See errors below.')
edit_url = reverse('edit_content_item', args=[project.slug])
+
+ project_discovery_step = Step.objects.get(slug='create_project_discovery')
+ project_discovery_step_details = StepDetails.objects.filter(step=project_discovery_step)
+ step_details_dict = {step_detail.slug: step_detail for step_detail in project_discovery_step_details}
+
return render(request, 'project/project_discovery.html',
- {'project':project, 'discovery_form':discovery_form,
- 'publication_formset':publication_formset,
- 'topic_formset':topic_formset, 'add_item_url':edit_url,
- 'remove_item_url':edit_url, 'is_submitting':is_submitting})
+ {'project': project, 'discovery_form': discovery_form,
+ 'publication_formset': publication_formset,
+ 'step_details_dict': step_details_dict,
+ 'topic_formset': topic_formset, 'add_item_url': edit_url,
+ 'remove_item_url': edit_url, 'is_submitting': is_submitting})
class ProjectAutocomplete(autocomplete.Select2QuerySetView):
@@ -1138,6 +1155,10 @@ def project_files(request, project_slug, subdir='', **kwargs):
move_items_form, delete_items_form) = get_file_forms(
project=project, subdir=subdir, display_dirs=display_dirs)
+ project_files_step = Step.objects.get(slug='create_project_files')
+ project_files_step_details = StepDetails.objects.filter(step=project_files_step)
+ step_details_dict = {step_detail.slug: step_detail for step_detail in project_files_step_details}
+
return render(
request,
'project/project_files.html',
@@ -1164,6 +1185,7 @@ def project_files(request, project_slug, subdir='', **kwargs):
'maintenance_message': maintenance_message,
'is_lightwave_supported': project.files.is_lightwave_supported(),
'storage_type': settings.STORAGE_TYPE,
+ 'step_details_dict': step_details_dict,
},
)
@@ -1343,8 +1365,13 @@ def project_proofread(request, project_slug, **kwargs):
"""
Proofreading page for project before submission
"""
+
+ project_proofread_step = Step.objects.get(slug='create_project_proofread')
+ project_proofread_step_details = StepDetails.objects.filter(step=project_proofread_step)
+ step_details_dict = {step_detail.slug: step_detail for step_detail in project_proofread_step_details}
+
return render(request, 'project/project_proofread.html',
- {'project':kwargs['project']})
+ {'project':kwargs['project'], 'step_details_dict': step_details_dict})
@project_auth(auth_mode=0)
@@ -1481,6 +1508,10 @@ def project_ethics(request, project_slug, **kwargs):
ethics_form = forms.EthicsForm(instance=project, editable=editable)
documents_formset = UploadedDocumentFormSet(instance=project)
+ ethics_step = Step.objects.get(slug='create_project_ethics')
+ ethics_step_details = StepDetails.objects.filter(step=ethics_step)
+ step_details_dict = {step_detail.slug: step_detail for step_detail in ethics_step_details}
+
edit_url = reverse('edit_ethics', kwargs={'project_slug': project.slug})
return render(
@@ -1491,6 +1522,7 @@ def project_ethics(request, project_slug, **kwargs):
'ethics_form': ethics_form,
'is_submitting': kwargs['is_submitting'],
'documents_formset': documents_formset,
+ 'step_details_dict': step_details_dict,
'add_item_url': edit_url,
'remove_item_url': edit_url,
},
From ae3d7220b75e08999b124e981bbc183f663d2d74 Mon Sep 17 00:00:00 2001
From: rutvikrj26
Date: Wed, 8 May 2024 17:27:00 -0400
Subject: [PATCH 05/10] Refactored the default physionet project copy
---
.../physionet/fixtures/project_copy.json | 260 +++++++++++++++++-
1 file changed, 259 insertions(+), 1 deletion(-)
diff --git a/physionet-django/physionet/fixtures/project_copy.json b/physionet-django/physionet/fixtures/project_copy.json
index 894bb88698..f0eb3bd297 100644
--- a/physionet-django/physionet/fixtures/project_copy.json
+++ b/physionet-django/physionet/fixtures/project_copy.json
@@ -1 +1,259 @@
-[{"model": "physionet.process", "pk": 1, "fields": {"title": "Create Project", "slug": "create_project", "description": "Create a new project on Health Data Nexus."}}, {"model": "physionet.step", "pk": 1, "fields": {"title": "Overview", "process": 1, "slug": "create_project_overview", "order": 1}}, {"model": "physionet.step", "pk": 2, "fields": {"title": "Authors", "process": 1, "slug": "create_project_authors", "order": 2}}, {"model": "physionet.step", "pk": 3, "fields": {"title": "Content", "process": 1, "slug": "create_project_content", "order": 3}}, {"model": "physionet.step", "pk": 4, "fields": {"title": "Access", "process": 1, "slug": "create_project_access", "order": 4}}, {"model": "physionet.step", "pk": 5, "fields": {"title": "Discovery", "process": 1, "slug": "create_project_discovery", "order": 5}}, {"model": "physionet.step", "pk": 6, "fields": {"title": "Ethics", "process": 1, "slug": "create_project_ethics", "order": 6}}, {"model": "physionet.step", "pk": 7, "fields": {"title": "Files", "process": 1, "slug": "create_project_files", "order": 7}}, {"model": "physionet.step", "pk": 8, "fields": {"title": "Proofread", "process": 1, "slug": "create_project_proofread", "order": 8}}, {"model": "physionet.stepdetails", "pk": 1, "fields": {"title": "Preparing for Submission", "content": "To prepare the project for submission, go through the following steps using the side panel:
\n \n Invite authors to be credited for creating the resource. \n Fill in the descriptive metadata. \n Set the access policy and license. \n Add discovery information. \n Upload the files. \n Proofread the project and make sure it is ready for submission. \n The full publishing process is described in the\n author\nguidelines .
", "order": 1, "step": 1, "slug": "preparing_for_submission", "tip": false}}, {"model": "physionet.stepdetails", "pk": 2, "fields": {"title": "Project Authors", "content": "The submitting author is responsible for managing co-authors and handling the project\n submission. Co-authors can be invited using the form below. Once the co-author is registered on {{ SITE_NAME }}, \n the invitation will appear on their project home page. Authors must provide their affiliation on a project-by-project basis.
\n", "order": 1, "step": 2, "slug": "project_authors", "tip": false}}, {"model": "physionet.stepdetails", "pk": 3, "fields": {"title": "Corresponding Author", "content": "The corresponding author is responsible for responding to inquiries from users post publication.
", "order": 2, "step": 2, "slug": "corresponding_author", "tip": false}}, {"model": "physionet.stepdetails", "pk": 4, "fields": {"title": "Corresponding Email", "content": "You are the selected corresponding author. Choose one of your emails to be listed for correspondence.
\n", "order": 3, "step": 2, "slug": "corresponding_email", "tip": false}}, {"model": "physionet.stepdetails", "pk": 5, "fields": {"title": "Your Affiliations", "content": "Set up to three affiliations for your author profile. Note: these fields are not tied to your user profile.
\n", "order": 4, "step": 2, "slug": "your_affiliations", "tip": false}}, {"model": "physionet.stepdetails", "pk": 6, "fields": {"title": "Your Affiliations", "content": "Institutions you are affiliated with. Maximum of 3.", "order": 5, "step": 2, "slug": "your_affiliations_tip", "tip": true}}, {"model": "physionet.stepdetails", "pk": 7, "fields": {"title": "Submitting Author", "content": "Only the submitting author of a project is able to edit content.\n You may transfer the role of submitting author to a co-author.\n Choose one of the co-authors below to make them the submitting author for this project.\n Transferring authorship will remove your ability to edit content!
", "order": 6, "step": 2, "slug": "submitting_author", "tip": false}}, {"model": "physionet.stepdetails", "pk": 8, "fields": {"title": "Project Content", "content": "Describe the context of your resource, the organization of its files, and how it is to be reused.
Please adhere to the standards specified in the helpstrings. Required fields are indicated by a *.", "order": 1, "step": 3, "slug": "project_content", "tip": false}}, {"model": "physionet.stepdetails", "pk": 9, "fields": {"title": "Project Access", "content": "
Set the access policy and terms of reuse for your resource. The descriptive metadata of all published projects are publically visible. The following access policies control access to the files:
\n\n\n\tOpen : Anyone can access the files, as long as they conform to the terms of the specified license. \n\tRestricted : Only logged in users who sign a data use agreement (DUA) for the project can access the files. \n\tCredentialed : Only Health Data Nexus credentialed users who sign a DUA for the project can access the files. This tier is only for sensitive databases. Please contact us beforehand if you would like to contribute such a resource. \n \n\nWe strongly encourage selecting the open access policy.
", "order": 1, "step": 4, "slug": "project_access", "tip": false}}, {"model": "physionet.stepdetails", "pk": 10, "fields": {"title": "Project Discovery", "content": "Add information to increase your project's discoverability.
", "order": 1, "step": 5, "slug": "project_discovery", "tip": false}}, {"model": "physionet.stepdetails", "pk": 11, "fields": {"title": "Ethics", "content": "Please provide an ethics statement following the author guidelines . Statements on ethics approval should appear here. Your statement will be included in the public project description.
", "order": 1, "step": 6, "slug": "project_ethics", "tip": false}}, {"model": "physionet.stepdetails", "pk": 12, "fields": {"title": "Supporting Documentation", "content": "You may upload supporting documents here. These documents will be reviewed by our editorial staff, but they will not be shared publicly. For further guidance, please refer to our author guidelines .
", "order": 2, "step": 6, "slug": "supporting_documentation", "tip": false}}, {"model": "physionet.stepdetails", "pk": 13, "fields": {"title": "Project Files", "content": "Health Data Nexus resources should be reusable by the greater scientific community. To facilitate the reuse of your content, please adhere to the following reusability guidelines.
\n\nGeneral Guidelines
\n\n\n\tFiles must contain no protected health information . \n\tFiles are provided in an open format such as text, csv, or WFDB, rather than a proprietary format. \n\tCode must be provided in source format. \n\tData files must be machine readable. \n\tLarge regularly-sampled time-series data, especially waveforms, are provided in WFDB format. \n\tFilenames must only contain letters, numbers, dashes, underscores, and dots. \n\tIf appropriate, provide a csv file named subject-info.csv containing information on all subjects, such as age and gender. \n \n\nWFDB Files
\n\n\n\tProvide a list of all WFDB format records, named RECORDS . Example file . If you upload this file, you will see a link to view your project's waveforms in LightWAVE . \n\tProvide a tab delimited list of all WFDB format annotation files, named ANNOTATORS . Example file . \n ", "order": 1, "step": 7, "slug": "project_files", "tip": false}}, {"model": "physionet.stepdetails", "pk": 14, "fields": {"title": "Proofread", "content": "Inspect the preview of the published project, and ensure that all authors are satisfied with the content. Any errors that are displayed must be addressed before the project can be submitted for review.
", "order": 1, "step": 8, "slug": "project_proofread", "tip": false}}]
\ No newline at end of file
+[
+ {
+ "model": "physionet.process",
+ "pk": 1,
+ "fields": {
+ "title": "Create Project",
+ "slug": "create_project",
+ "description": "Create a new project on Health Data Nexus."
+ }
+ },
+ {
+ "model": "physionet.step",
+ "pk": 1,
+ "fields": {
+ "title": "Overview",
+ "process": 1,
+ "slug": "create_project_overview",
+ "order": 1
+ }
+ },
+ {
+ "model": "physionet.step",
+ "pk": 2,
+ "fields": {
+ "title": "Authors",
+ "process": 1,
+ "slug": "create_project_authors",
+ "order": 2
+ }
+ },
+ {
+ "model": "physionet.step",
+ "pk": 3,
+ "fields": {
+ "title": "Content",
+ "process": 1,
+ "slug": "create_project_content",
+ "order": 3
+ }
+ },
+ {
+ "model": "physionet.step",
+ "pk": 4,
+ "fields": {
+ "title": "Access",
+ "process": 1,
+ "slug": "create_project_access",
+ "order": 4
+ }
+ },
+ {
+ "model": "physionet.step",
+ "pk": 5,
+ "fields": {
+ "title": "Discovery",
+ "process": 1,
+ "slug": "create_project_discovery",
+ "order": 5
+ }
+ },
+ {
+ "model": "physionet.step",
+ "pk": 6,
+ "fields": {
+ "title": "Ethics",
+ "process": 1,
+ "slug": "create_project_ethics",
+ "order": 6
+ }
+ },
+ {
+ "model": "physionet.step",
+ "pk": 7,
+ "fields": {
+ "title": "Files",
+ "process": 1,
+ "slug": "create_project_files",
+ "order": 7
+ }
+ },
+ {
+ "model": "physionet.step",
+ "pk": 8,
+ "fields": {
+ "title": "Proofread",
+ "process": 1,
+ "slug": "create_project_proofread",
+ "order": 8
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 1,
+ "fields": {
+ "title": "Preparing for Submission",
+ "content": "To prepare the project for submission, go through the following steps using the side panel:
\n \n Invite authors to be credited for creating the resource. \n Fill in the descriptive metadata. \n Set the access policy and license. \n Add discovery information. \n Upload the files. \n Proofread the project and make sure it is ready for submission. \n The full publishing process is described in the\n author\nguidelines .
",
+ "order": 1,
+ "step": 1,
+ "slug": "preparing_for_submission",
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 2,
+ "fields": {
+ "title": "Project Authors",
+ "content": "The submitting author is responsible for managing co-authors and handling the project\n submission. Co-authors can be invited using the form below. Once the co-author is registered on {{ SITE_NAME }}, \n the invitation will appear on their project home page. Authors must provide their affiliation on a project-by-project basis.
\n",
+ "order": 1,
+ "step": 2,
+ "slug": "project_authors",
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 3,
+ "fields": {
+ "title": "Corresponding Author",
+ "content": "The corresponding author is responsible for responding to inquiries from users post publication.
",
+ "order": 2,
+ "step": 2,
+ "slug": "corresponding_author",
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 4,
+ "fields": {
+ "title": "Corresponding Email",
+ "content": "You are the selected corresponding author. Choose one of your emails to be listed for correspondence.
\n",
+ "order": 3,
+ "step": 2,
+ "slug": "corresponding_email",
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 5,
+ "fields": {
+ "title": "Your Affiliations",
+ "content": "Set up to three affiliations for your author profile. Note: these fields are not tied to your user profile.
\n",
+ "order": 4,
+ "step": 2,
+ "slug": "your_affiliations",
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 6,
+ "fields": {
+ "title": "Your Affiliations",
+ "content": "Institutions you are affiliated with. Maximum of 3.",
+ "order": 5,
+ "step": 2,
+ "slug": "your_affiliations_tip",
+ "tip": true
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 7,
+ "fields": {
+ "title": "Submitting Author",
+ "content": "Only the submitting author of a project is able to edit content.\n You may transfer the role of submitting author to a co-author.\n Choose one of the co-authors below to make them the submitting author for this project.\n Transferring authorship will remove your ability to edit content!
",
+ "order": 6,
+ "step": 2,
+ "slug": "submitting_author",
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 8,
+ "fields": {
+ "title": "Project Content",
+ "content": "Describe the context of your resource, the organization of its files, and how it is to be reused.
Please adhere to the standards specified in the helpstrings. Required fields are indicated by a *.",
+ "order": 1,
+ "step": 3,
+ "slug": "project_content",
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 9,
+ "fields": {
+ "title": "Project Access",
+ "content": "
Set the access policy and terms of reuse for your resource. The descriptive metadata of all published projects are publically visible. The following access policies control access to the files:
\n\n\n\tOpen : Anyone can access the files, as long as they conform to the terms of the specified license. \n\tRestricted : Only logged in users who sign a data use agreement (DUA) for the project can access the files. \n\tCredentialed : Only Health Data Nexus credentialed users who sign a DUA for the project can access the files. This tier is only for sensitive databases. Please contact us beforehand if you would like to contribute such a resource. \n \n\nWe strongly encourage selecting the open access policy.
",
+ "order": 1,
+ "step": 4,
+ "slug": "project_access",
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 10,
+ "fields": {
+ "title": "Project Discovery",
+ "content": "Add information to increase your project's discoverability.
",
+ "order": 1,
+ "step": 5,
+ "slug": "project_discovery",
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 11,
+ "fields": {
+ "title": "Ethics",
+ "content": "Please provide an ethics statement following the author guidelines . Statements on ethics approval should appear here. Your statement will be included in the public project description.
",
+ "order": 1,
+ "step": 6,
+ "slug": "project_ethics",
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 12,
+ "fields": {
+ "title": "Supporting Documentation",
+ "content": "You may upload supporting documents here. These documents will be reviewed by our editorial staff, but they will not be shared publicly. For further guidance, please refer to our author guidelines .
",
+ "order": 2,
+ "step": 6,
+ "slug": "supporting_documentation",
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 13,
+ "fields": {
+ "title": "Project Files",
+ "content": "Health Data Nexus resources should be reusable by the greater scientific community. To facilitate the reuse of your content, please adhere to the following reusability guidelines.
\n\nGeneral Guidelines
\n\n\n\tFiles must contain no protected health information . \n\tFiles are provided in an open format such as text, csv, or WFDB, rather than a proprietary format. \n\tCode must be provided in source format. \n\tData files must be machine readable. \n\tLarge regularly-sampled time-series data, especially waveforms, are provided in WFDB format. \n\tFilenames must only contain letters, numbers, dashes, underscores, and dots. \n\tIf appropriate, provide a csv file named subject-info.csv containing information on all subjects, such as age and gender. \n \n\nWFDB Files
\n\n\n\tProvide a list of all WFDB format records, named RECORDS . Example file . If you upload this file, you will see a link to view your project's waveforms in LightWAVE . \n\tProvide a tab delimited list of all WFDB format annotation files, named ANNOTATORS . Example file . \n ",
+ "order": 1,
+ "step": 7,
+ "slug": "project_files",
+ "tip": false
+ }
+ },
+ {
+ "model": "physionet.stepdetails",
+ "pk": 14,
+ "fields": {
+ "title": "Proofread",
+ "content": "Inspect the preview of the published project, and ensure that all authors are satisfied with the content. Any errors that are displayed must be addressed before the project can be submitted for review.
",
+ "order": 1,
+ "step": 8,
+ "slug": "project_proofread",
+ "tip": false
+ }
+ }
+]
\ No newline at end of file
From dcd29a390210efea42608e05526f1a01197a81e0 Mon Sep 17 00:00:00 2001
From: rutvikrj26
Date: Wed, 8 May 2024 18:20:48 -0400
Subject: [PATCH 06/10] Added individual model fixtures
---
.../physionet/fixtures/processes.json | 1 +
.../physionet/fixtures/stepdetails.json | 1 +
.../physionet/fixtures/steps.json | 260 +-----------------
3 files changed, 3 insertions(+), 259 deletions(-)
create mode 100644 physionet-django/physionet/fixtures/processes.json
create mode 100644 physionet-django/physionet/fixtures/stepdetails.json
diff --git a/physionet-django/physionet/fixtures/processes.json b/physionet-django/physionet/fixtures/processes.json
new file mode 100644
index 0000000000..0fb5200f94
--- /dev/null
+++ b/physionet-django/physionet/fixtures/processes.json
@@ -0,0 +1 @@
+[{"model": "physionet.process", "pk": 1, "fields": {"title": "Create Project", "slug": "create_project", "description": "Create a new project on Health Data Nexus."}}]
\ No newline at end of file
diff --git a/physionet-django/physionet/fixtures/stepdetails.json b/physionet-django/physionet/fixtures/stepdetails.json
new file mode 100644
index 0000000000..3ffb25dea2
--- /dev/null
+++ b/physionet-django/physionet/fixtures/stepdetails.json
@@ -0,0 +1 @@
+[{"model": "physionet.stepdetails", "pk": 1, "fields": {"title": "Preparing for Submission", "content": "To prepare the project for submission, go through the following steps using the side panel:
\n \n Invite authors to be credited for creating the resource. \n Fill in the descriptive metadata. \n Set the access policy and license. \n Add discovery information. \n Upload the files. \n Proofread the project and make sure it is ready for submission. \n The full publishing process is described in the\n author\nguidelines .
", "order": 1, "step": 1, "slug": "preparing_for_submission", "tip": false}}, {"model": "physionet.stepdetails", "pk": 2, "fields": {"title": "Project Authors", "content": "The submitting author is responsible for managing co-authors and handling the project\n submission. Co-authors can be invited using the form below. Once the co-author is registered on {{ SITE_NAME }}, \n the invitation will appear on their project home page. Authors must provide their affiliation on a project-by-project basis.
\n", "order": 1, "step": 2, "slug": "project_authors", "tip": false}}, {"model": "physionet.stepdetails", "pk": 3, "fields": {"title": "Corresponding Author", "content": "The corresponding author is responsible for responding to inquiries from users post publication.
", "order": 2, "step": 2, "slug": "corresponding_author", "tip": false}}, {"model": "physionet.stepdetails", "pk": 4, "fields": {"title": "Corresponding Email", "content": "You are the selected corresponding author. Choose one of your emails to be listed for correspondence.
\n", "order": 3, "step": 2, "slug": "corresponding_email", "tip": false}}, {"model": "physionet.stepdetails", "pk": 5, "fields": {"title": "Your Affiliations", "content": "Set up to three affiliations for your author profile. Note: these fields are not tied to your user profile.
\n", "order": 4, "step": 2, "slug": "your_affiliations", "tip": false}}, {"model": "physionet.stepdetails", "pk": 6, "fields": {"title": "Your Affiliations", "content": "Institutions you are affiliated with. Maximum of 3.", "order": 5, "step": 2, "slug": "your_affiliations_tip", "tip": true}}, {"model": "physionet.stepdetails", "pk": 7, "fields": {"title": "Submitting Author", "content": "Only the submitting author of a project is able to edit content.\n You may transfer the role of submitting author to a co-author.\n Choose one of the co-authors below to make them the submitting author for this project.\n Transferring authorship will remove your ability to edit content!
", "order": 6, "step": 2, "slug": "submitting_author", "tip": false}}, {"model": "physionet.stepdetails", "pk": 8, "fields": {"title": "Project Content", "content": "Describe the context of your resource, the organization of its files, and how it is to be reused.
Please adhere to the standards specified in the helpstrings. Required fields are indicated by a *.", "order": 1, "step": 3, "slug": "project_content", "tip": false}}, {"model": "physionet.stepdetails", "pk": 9, "fields": {"title": "Project Access", "content": "
Set the access policy and terms of reuse for your resource. The descriptive metadata of all published projects are publically visible. The following access policies control access to the files:
\n\n\n\tOpen : Anyone can access the files, as long as they conform to the terms of the specified license. \n\tRestricted : Only logged in users who sign a data use agreement (DUA) for the project can access the files. \n\tCredentialed : Only Health Data Nexus credentialed users who sign a DUA for the project can access the files. This tier is only for sensitive databases. Please contact us beforehand if you would like to contribute such a resource. \n \n\nWe strongly encourage selecting the open access policy.
", "order": 1, "step": 4, "slug": "project_access", "tip": false}}, {"model": "physionet.stepdetails", "pk": 10, "fields": {"title": "Project Discovery", "content": "Add information to increase your project's discoverability.
", "order": 1, "step": 5, "slug": "project_discovery", "tip": false}}, {"model": "physionet.stepdetails", "pk": 11, "fields": {"title": "Ethics", "content": "Please provide an ethics statement following the author guidelines . Statements on ethics approval should appear here. Your statement will be included in the public project description.
", "order": 1, "step": 6, "slug": "project_ethics", "tip": false}}, {"model": "physionet.stepdetails", "pk": 12, "fields": {"title": "Supporting Documentation", "content": "You may upload supporting documents here. These documents will be reviewed by our editorial staff, but they will not be shared publicly. For further guidance, please refer to our author guidelines .
", "order": 2, "step": 6, "slug": "supporting_documentation", "tip": false}}, {"model": "physionet.stepdetails", "pk": 13, "fields": {"title": "Project Files", "content": "Health Data Nexus resources should be reusable by the greater scientific community. To facilitate the reuse of your content, please adhere to the following reusability guidelines.
\n\nGeneral Guidelines
\n\n\n\tFiles must contain no protected health information . \n\tFiles are provided in an open format such as text, csv, or WFDB, rather than a proprietary format. \n\tCode must be provided in source format. \n\tData files must be machine readable. \n\tLarge regularly-sampled time-series data, especially waveforms, are provided in WFDB format. \n\tFilenames must only contain letters, numbers, dashes, underscores, and dots. \n\tIf appropriate, provide a csv file named subject-info.csv containing information on all subjects, such as age and gender. \n \n\nWFDB Files
\n\n\n\tProvide a list of all WFDB format records, named RECORDS . Example file . If you upload this file, you will see a link to view your project's waveforms in LightWAVE . \n\tProvide a tab delimited list of all WFDB format annotation files, named ANNOTATORS . Example file . \n ", "order": 1, "step": 7, "slug": "project_files", "tip": false}}, {"model": "physionet.stepdetails", "pk": 14, "fields": {"title": "Proofread", "content": "Inspect the preview of the published project, and ensure that all authors are satisfied with the content. Any errors that are displayed must be addressed before the project can be submitted for review.
", "order": 1, "step": 8, "slug": "project_proofread", "tip": false}}]
\ No newline at end of file
diff --git a/physionet-django/physionet/fixtures/steps.json b/physionet-django/physionet/fixtures/steps.json
index d3d8c2cb17..90e27855f3 100644
--- a/physionet-django/physionet/fixtures/steps.json
+++ b/physionet-django/physionet/fixtures/steps.json
@@ -1,259 +1 @@
-[
- {
- "model": "physionet.process",
- "pk": 1,
- "fields": {
- "title": "Create Project",
- "slug": "create_project",
- "description": "Create a new project on Health Data Nexus."
- }
- },
- {
- "model": "physionet.step",
- "pk": 1,
- "fields": {
- "title": "Overview",
- "slug": "create_project_overview",
- "process": 1,
- "order": 1
- }
- },
- {
- "model": "physionet.step",
- "pk": 2,
- "fields": {
- "title": "Authors",
- "slug": "create_project_authors",
- "process": 1,
- "order": 2
- }
- },
- {
- "model": "physionet.step",
- "pk": 3,
- "fields": {
- "title": "Content",
- "slug": "create_project_content",
- "process": 1,
- "order": 3
- }
- },
- {
- "model": "physionet.step",
- "pk": 4,
- "fields": {
- "title": "Access",
- "slug": "create_project_access",
- "process": 1,
- "order": 4
- }
- },
- {
- "model": "physionet.step",
- "pk": 5,
- "fields": {
- "title": "Discovery",
- "slug": "create_project_discovery",
- "process": 1,
- "order": 5
- }
- },
- {
- "model": "physionet.step",
- "pk": 6,
- "fields": {
- "title": "Ethics",
- "slug": "create_project_ethics",
- "process": 1,
- "order": 6
- }
- },
- {
- "model": "physionet.step",
- "pk": 7,
- "fields": {
- "title": "Files",
- "slug": "create_project_files",
- "process": 1,
- "order": 7
- }
- },
- {
- "model": "physionet.step",
- "pk": 8,
- "fields": {
- "title": "Proofread",
- "slug": "create_project_proofread",
- "process": 1,
- "order": 8
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 1,
- "fields": {
- "step": 1,
- "title": "Preparing for Submission",
- "slug": "preparing_for_submission",
- "content": "To prepare the project for submission, go through the following steps using the side panel:
\n \n Invite authors to be credited for creating the resource. \n Fill in the descriptive metadata. \n Set the access policy and license. \n Add discovery information. \n Upload the files. \n Proofread the project and make sure it is ready for submission. \n The full publishing process is described in the\n author\nguidelines .
",
- "order": 1,
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 2,
- "fields": {
- "step": 2,
- "title": "Project Authors",
- "slug": "project_authors",
- "content": "The submitting author is responsible for managing co-authors and handling the project\n submission. Co-authors can be invited using the form below. Once the co-author is registered on {{ SITE_NAME }}, \n the invitation will appear on their project home page. Authors must provide their affiliation on a project-by-project basis.
\n",
- "order": 1,
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 3,
- "fields": {
- "step": 2,
- "title": "Corresponding Author",
- "slug": "corresponding_author",
- "content": "The corresponding author is responsible for responding to inquiries from users post publication.
",
- "order": 2,
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 4,
- "fields": {
- "step": 2,
- "title": "Corresponding Email",
- "slug": "corresponding_email",
- "content": "You are the selected corresponding author. Choose one of your emails to be listed for correspondence.
\n",
- "order": 3,
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 5,
- "fields": {
- "step": 2,
- "title": "Your Affiliations",
- "slug": "your_affiliations",
- "content": "Set up to three affiliations for your author profile. Note: these fields are not tied to your user profile.
\n",
- "order": 4,
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 6,
- "fields": {
- "step": 2,
- "title": "Your Affiliations",
- "slug": "your_affiliations_tip",
- "content": "Institutions you are affiliated with. Maximum of 3.",
- "order": 5,
- "tip": true
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 7,
- "fields": {
- "step": 2,
- "title": "Submitting Author",
- "slug": "submitting_author",
- "content": "Only the submitting author of a project is able to edit content.\n You may transfer the role of submitting author to a co-author.\n Choose one of the co-authors below to make them the submitting author for this project.\n Transferring authorship will remove your ability to edit content!
",
- "order": 6,
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 8,
- "fields": {
- "step": 3,
- "title": "Project Content",
- "slug": "project_content",
- "content": "Describe the context of your resource, the organization of its files, and how it is to be reused.
Please adhere to the standards specified in the helpstrings. Required fields are indicated by a *.",
- "order": 1,
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 9,
- "fields": {
- "step": 4,
- "title": "Project Access",
- "slug": "project_access",
- "content": "
Set the access policy and terms of reuse for your resource. The descriptive metadata of all published projects are publically visible. The following access policies control access to the files:
\n\nOpen : Anyone can access the files, as long as they conform to the terms of the specified license. \nRestricted : Only logged in users who sign a data use agreement (DUA) for the project can access the files. \nCredentialed : Only Health Data Nexus credentialed users who sign a DUA for the project can access the files. This tier is only for sensitive databases. Please contact us beforehand if you would like to contribute such a resource. \n \nWe strongly encourage selecting the open access policy.
",
- "order": 1,
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 10,
- "fields": {
- "step": 5,
- "title": "Project Discovery",
- "slug": "project_discovery",
- "content": "Add information to increase your project's discoverability.
",
- "order": 1,
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 11,
- "fields": {
- "step": 6,
- "title": "Ethics",
- "slug": "project_ethics",
- "content": "Please provide an ethics statement following the author guidelines. Statements on ethics approval should appear here. Your statement will be included in the public project description.
",
- "order": 1,
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 12,
- "fields": {
- "step": 6,
- "title": "Supporting Documentation",
- "slug": "supporting_documentation",
- "content": "You may upload supporting documents here. These documents will be reviewed by our editorial staff, but they will not be shared publicly. For further guidance, please refer to our author guidelines.
",
- "order": 2,
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 13,
- "fields": {
- "step": 7,
- "title": "Project Files",
- "slug": "project_files",
- "content": "\"content\": \"Health Data Nexus resources should be reusable by the greater scientific community. To facilitate the reuse of your content, please adhere to the following reusability guidelines.
\\nGeneral Guidelines
\\n\\nFiles must contain no protected health information. \\nFiles are provided in an open format such as text, csv, or WFDB, rather than a proprietary format. \\nCode must be provided in source format. \\nData files must be machine readable. \\nLarge regularly-sampled time-series data , especially waveforms, are provided in WFDB format. \\nFilenames must only contain letters, numbers, dashes, underscores, and dots. \\nIf appropriate , provide a csv file named subject-info.csv containing information on all subjects, such as age and gender. \\n \\nWFDB Files
\\n\\nProvide a list of all WFDB format records, named RECORDS. Example file. If you upload this file, you will see a link to view your project's waveforms in LightWAVE. \\nProvide a tab delimited list of all WFDB format annotation files, named ANNOTATORS. Example file. \\n \"",
- "order": 1,
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 14,
- "fields": {
- "step": 8,
- "title": "Proofread",
- "slug": "project_proofread",
- "content": "Inspect the preview of the published project, and ensure that all authors are satisfied with the content. Any errors that are displayed must be addressed before the project can be submitted for review.
",
- "order": 1,
- "tip": false
- }
- }
-]
\ No newline at end of file
+[{"model": "physionet.step", "pk": 1, "fields": {"title": "Overview", "process": 1, "slug": "create_project_overview", "order": 1}}, {"model": "physionet.step", "pk": 2, "fields": {"title": "Authors", "process": 1, "slug": "create_project_authors", "order": 2}}, {"model": "physionet.step", "pk": 3, "fields": {"title": "Content", "process": 1, "slug": "create_project_content", "order": 3}}, {"model": "physionet.step", "pk": 4, "fields": {"title": "Access", "process": 1, "slug": "create_project_access", "order": 4}}, {"model": "physionet.step", "pk": 5, "fields": {"title": "Discovery", "process": 1, "slug": "create_project_discovery", "order": 5}}, {"model": "physionet.step", "pk": 6, "fields": {"title": "Ethics", "process": 1, "slug": "create_project_ethics", "order": 6}}, {"model": "physionet.step", "pk": 7, "fields": {"title": "Files", "process": 1, "slug": "create_project_files", "order": 7}}, {"model": "physionet.step", "pk": 8, "fields": {"title": "Proofread", "process": 1, "slug": "create_project_proofread", "order": 8}}]
\ No newline at end of file
From 207afc415d94a5ef19f0f9d9534e5c719a1f77f0 Mon Sep 17 00:00:00 2001
From: rutvikrj26
Date: Sat, 11 May 2024 17:01:27 -0400
Subject: [PATCH 07/10] added the project_copy to loaddemo management command &
updated the console test defaults for new url paths
---
physionet-django/console/urls.py | 1 +
.../physionet/fixtures/processes.json | 1 -
.../physionet/fixtures/project_copy.json | 260 +-----------------
.../physionet/fixtures/stepdetails.json | 1 -
.../physionet/fixtures/steps.json | 1 -
.../user/management/commands/loaddemo.py | 5 +
6 files changed, 7 insertions(+), 262 deletions(-)
delete mode 100644 physionet-django/physionet/fixtures/processes.json
delete mode 100644 physionet-django/physionet/fixtures/stepdetails.json
delete mode 100644 physionet-django/physionet/fixtures/steps.json
diff --git a/physionet-django/console/urls.py b/physionet-django/console/urls.py
index 4806a9cb01..f94d6ebfc5 100644
--- a/physionet-django/console/urls.py
+++ b/physionet-django/console/urls.py
@@ -178,6 +178,7 @@
'news_id': 1,
'username': 'rgmark',
'news_slug': 'cloud-migration',
+ 'process_slug': 'create_project',
}
TEST_CASES = {
'manage_published_project': {
diff --git a/physionet-django/physionet/fixtures/processes.json b/physionet-django/physionet/fixtures/processes.json
deleted file mode 100644
index 0fb5200f94..0000000000
--- a/physionet-django/physionet/fixtures/processes.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"model": "physionet.process", "pk": 1, "fields": {"title": "Create Project", "slug": "create_project", "description": "Create a new project on Health Data Nexus."}}]
\ No newline at end of file
diff --git a/physionet-django/physionet/fixtures/project_copy.json b/physionet-django/physionet/fixtures/project_copy.json
index f0eb3bd297..894bb88698 100644
--- a/physionet-django/physionet/fixtures/project_copy.json
+++ b/physionet-django/physionet/fixtures/project_copy.json
@@ -1,259 +1 @@
-[
- {
- "model": "physionet.process",
- "pk": 1,
- "fields": {
- "title": "Create Project",
- "slug": "create_project",
- "description": "Create a new project on Health Data Nexus."
- }
- },
- {
- "model": "physionet.step",
- "pk": 1,
- "fields": {
- "title": "Overview",
- "process": 1,
- "slug": "create_project_overview",
- "order": 1
- }
- },
- {
- "model": "physionet.step",
- "pk": 2,
- "fields": {
- "title": "Authors",
- "process": 1,
- "slug": "create_project_authors",
- "order": 2
- }
- },
- {
- "model": "physionet.step",
- "pk": 3,
- "fields": {
- "title": "Content",
- "process": 1,
- "slug": "create_project_content",
- "order": 3
- }
- },
- {
- "model": "physionet.step",
- "pk": 4,
- "fields": {
- "title": "Access",
- "process": 1,
- "slug": "create_project_access",
- "order": 4
- }
- },
- {
- "model": "physionet.step",
- "pk": 5,
- "fields": {
- "title": "Discovery",
- "process": 1,
- "slug": "create_project_discovery",
- "order": 5
- }
- },
- {
- "model": "physionet.step",
- "pk": 6,
- "fields": {
- "title": "Ethics",
- "process": 1,
- "slug": "create_project_ethics",
- "order": 6
- }
- },
- {
- "model": "physionet.step",
- "pk": 7,
- "fields": {
- "title": "Files",
- "process": 1,
- "slug": "create_project_files",
- "order": 7
- }
- },
- {
- "model": "physionet.step",
- "pk": 8,
- "fields": {
- "title": "Proofread",
- "process": 1,
- "slug": "create_project_proofread",
- "order": 8
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 1,
- "fields": {
- "title": "Preparing for Submission",
- "content": "To prepare the project for submission, go through the following steps using the side panel:
\n \n Invite authors to be credited for creating the resource. \n Fill in the descriptive metadata. \n Set the access policy and license. \n Add discovery information. \n Upload the files. \n Proofread the project and make sure it is ready for submission. \n The full publishing process is described in the\n author\nguidelines .
",
- "order": 1,
- "step": 1,
- "slug": "preparing_for_submission",
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 2,
- "fields": {
- "title": "Project Authors",
- "content": "The submitting author is responsible for managing co-authors and handling the project\n submission. Co-authors can be invited using the form below. Once the co-author is registered on {{ SITE_NAME }}, \n the invitation will appear on their project home page. Authors must provide their affiliation on a project-by-project basis.
\n",
- "order": 1,
- "step": 2,
- "slug": "project_authors",
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 3,
- "fields": {
- "title": "Corresponding Author",
- "content": "The corresponding author is responsible for responding to inquiries from users post publication.
",
- "order": 2,
- "step": 2,
- "slug": "corresponding_author",
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 4,
- "fields": {
- "title": "Corresponding Email",
- "content": "You are the selected corresponding author. Choose one of your emails to be listed for correspondence.
\n",
- "order": 3,
- "step": 2,
- "slug": "corresponding_email",
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 5,
- "fields": {
- "title": "Your Affiliations",
- "content": "Set up to three affiliations for your author profile. Note: these fields are not tied to your user profile.
\n",
- "order": 4,
- "step": 2,
- "slug": "your_affiliations",
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 6,
- "fields": {
- "title": "Your Affiliations",
- "content": "Institutions you are affiliated with. Maximum of 3.",
- "order": 5,
- "step": 2,
- "slug": "your_affiliations_tip",
- "tip": true
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 7,
- "fields": {
- "title": "Submitting Author",
- "content": "Only the submitting author of a project is able to edit content.\n You may transfer the role of submitting author to a co-author.\n Choose one of the co-authors below to make them the submitting author for this project.\n Transferring authorship will remove your ability to edit content!
",
- "order": 6,
- "step": 2,
- "slug": "submitting_author",
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 8,
- "fields": {
- "title": "Project Content",
- "content": "Describe the context of your resource, the organization of its files, and how it is to be reused.
Please adhere to the standards specified in the helpstrings. Required fields are indicated by a *.",
- "order": 1,
- "step": 3,
- "slug": "project_content",
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 9,
- "fields": {
- "title": "Project Access",
- "content": "
Set the access policy and terms of reuse for your resource. The descriptive metadata of all published projects are publically visible. The following access policies control access to the files:
\n\n\n\tOpen : Anyone can access the files, as long as they conform to the terms of the specified license. \n\tRestricted : Only logged in users who sign a data use agreement (DUA) for the project can access the files. \n\tCredentialed : Only Health Data Nexus credentialed users who sign a DUA for the project can access the files. This tier is only for sensitive databases. Please contact us beforehand if you would like to contribute such a resource. \n \n\nWe strongly encourage selecting the open access policy.
",
- "order": 1,
- "step": 4,
- "slug": "project_access",
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 10,
- "fields": {
- "title": "Project Discovery",
- "content": "Add information to increase your project's discoverability.
",
- "order": 1,
- "step": 5,
- "slug": "project_discovery",
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 11,
- "fields": {
- "title": "Ethics",
- "content": "Please provide an ethics statement following the author guidelines . Statements on ethics approval should appear here. Your statement will be included in the public project description.
",
- "order": 1,
- "step": 6,
- "slug": "project_ethics",
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 12,
- "fields": {
- "title": "Supporting Documentation",
- "content": "You may upload supporting documents here. These documents will be reviewed by our editorial staff, but they will not be shared publicly. For further guidance, please refer to our author guidelines .
",
- "order": 2,
- "step": 6,
- "slug": "supporting_documentation",
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 13,
- "fields": {
- "title": "Project Files",
- "content": "Health Data Nexus resources should be reusable by the greater scientific community. To facilitate the reuse of your content, please adhere to the following reusability guidelines.
\n\nGeneral Guidelines
\n\n\n\tFiles must contain no protected health information . \n\tFiles are provided in an open format such as text, csv, or WFDB, rather than a proprietary format. \n\tCode must be provided in source format. \n\tData files must be machine readable. \n\tLarge regularly-sampled time-series data, especially waveforms, are provided in WFDB format. \n\tFilenames must only contain letters, numbers, dashes, underscores, and dots. \n\tIf appropriate, provide a csv file named subject-info.csv containing information on all subjects, such as age and gender. \n \n\nWFDB Files
\n\n\n\tProvide a list of all WFDB format records, named RECORDS . Example file . If you upload this file, you will see a link to view your project's waveforms in LightWAVE . \n\tProvide a tab delimited list of all WFDB format annotation files, named ANNOTATORS . Example file . \n ",
- "order": 1,
- "step": 7,
- "slug": "project_files",
- "tip": false
- }
- },
- {
- "model": "physionet.stepdetails",
- "pk": 14,
- "fields": {
- "title": "Proofread",
- "content": "Inspect the preview of the published project, and ensure that all authors are satisfied with the content. Any errors that are displayed must be addressed before the project can be submitted for review.
",
- "order": 1,
- "step": 8,
- "slug": "project_proofread",
- "tip": false
- }
- }
-]
\ No newline at end of file
+[{"model": "physionet.process", "pk": 1, "fields": {"title": "Create Project", "slug": "create_project", "description": "Create a new project on Health Data Nexus."}}, {"model": "physionet.step", "pk": 1, "fields": {"title": "Overview", "process": 1, "slug": "create_project_overview", "order": 1}}, {"model": "physionet.step", "pk": 2, "fields": {"title": "Authors", "process": 1, "slug": "create_project_authors", "order": 2}}, {"model": "physionet.step", "pk": 3, "fields": {"title": "Content", "process": 1, "slug": "create_project_content", "order": 3}}, {"model": "physionet.step", "pk": 4, "fields": {"title": "Access", "process": 1, "slug": "create_project_access", "order": 4}}, {"model": "physionet.step", "pk": 5, "fields": {"title": "Discovery", "process": 1, "slug": "create_project_discovery", "order": 5}}, {"model": "physionet.step", "pk": 6, "fields": {"title": "Ethics", "process": 1, "slug": "create_project_ethics", "order": 6}}, {"model": "physionet.step", "pk": 7, "fields": {"title": "Files", "process": 1, "slug": "create_project_files", "order": 7}}, {"model": "physionet.step", "pk": 8, "fields": {"title": "Proofread", "process": 1, "slug": "create_project_proofread", "order": 8}}, {"model": "physionet.stepdetails", "pk": 1, "fields": {"title": "Preparing for Submission", "content": "To prepare the project for submission, go through the following steps using the side panel:
\n \n Invite authors to be credited for creating the resource. \n Fill in the descriptive metadata. \n Set the access policy and license. \n Add discovery information. \n Upload the files. \n Proofread the project and make sure it is ready for submission. \n The full publishing process is described in the\n author\nguidelines .
", "order": 1, "step": 1, "slug": "preparing_for_submission", "tip": false}}, {"model": "physionet.stepdetails", "pk": 2, "fields": {"title": "Project Authors", "content": "The submitting author is responsible for managing co-authors and handling the project\n submission. Co-authors can be invited using the form below. Once the co-author is registered on {{ SITE_NAME }}, \n the invitation will appear on their project home page. Authors must provide their affiliation on a project-by-project basis.
\n", "order": 1, "step": 2, "slug": "project_authors", "tip": false}}, {"model": "physionet.stepdetails", "pk": 3, "fields": {"title": "Corresponding Author", "content": "The corresponding author is responsible for responding to inquiries from users post publication.
", "order": 2, "step": 2, "slug": "corresponding_author", "tip": false}}, {"model": "physionet.stepdetails", "pk": 4, "fields": {"title": "Corresponding Email", "content": "You are the selected corresponding author. Choose one of your emails to be listed for correspondence.
\n", "order": 3, "step": 2, "slug": "corresponding_email", "tip": false}}, {"model": "physionet.stepdetails", "pk": 5, "fields": {"title": "Your Affiliations", "content": "Set up to three affiliations for your author profile. Note: these fields are not tied to your user profile.
\n", "order": 4, "step": 2, "slug": "your_affiliations", "tip": false}}, {"model": "physionet.stepdetails", "pk": 6, "fields": {"title": "Your Affiliations", "content": "Institutions you are affiliated with. Maximum of 3.", "order": 5, "step": 2, "slug": "your_affiliations_tip", "tip": true}}, {"model": "physionet.stepdetails", "pk": 7, "fields": {"title": "Submitting Author", "content": "Only the submitting author of a project is able to edit content.\n You may transfer the role of submitting author to a co-author.\n Choose one of the co-authors below to make them the submitting author for this project.\n Transferring authorship will remove your ability to edit content!
", "order": 6, "step": 2, "slug": "submitting_author", "tip": false}}, {"model": "physionet.stepdetails", "pk": 8, "fields": {"title": "Project Content", "content": "Describe the context of your resource, the organization of its files, and how it is to be reused.
Please adhere to the standards specified in the helpstrings. Required fields are indicated by a *.", "order": 1, "step": 3, "slug": "project_content", "tip": false}}, {"model": "physionet.stepdetails", "pk": 9, "fields": {"title": "Project Access", "content": "
Set the access policy and terms of reuse for your resource. The descriptive metadata of all published projects are publically visible. The following access policies control access to the files:
\n\n\n\tOpen : Anyone can access the files, as long as they conform to the terms of the specified license. \n\tRestricted : Only logged in users who sign a data use agreement (DUA) for the project can access the files. \n\tCredentialed : Only Health Data Nexus credentialed users who sign a DUA for the project can access the files. This tier is only for sensitive databases. Please contact us beforehand if you would like to contribute such a resource. \n \n\nWe strongly encourage selecting the open access policy.
", "order": 1, "step": 4, "slug": "project_access", "tip": false}}, {"model": "physionet.stepdetails", "pk": 10, "fields": {"title": "Project Discovery", "content": "Add information to increase your project's discoverability.
", "order": 1, "step": 5, "slug": "project_discovery", "tip": false}}, {"model": "physionet.stepdetails", "pk": 11, "fields": {"title": "Ethics", "content": "Please provide an ethics statement following the author guidelines . Statements on ethics approval should appear here. Your statement will be included in the public project description.
", "order": 1, "step": 6, "slug": "project_ethics", "tip": false}}, {"model": "physionet.stepdetails", "pk": 12, "fields": {"title": "Supporting Documentation", "content": "You may upload supporting documents here. These documents will be reviewed by our editorial staff, but they will not be shared publicly. For further guidance, please refer to our author guidelines .
", "order": 2, "step": 6, "slug": "supporting_documentation", "tip": false}}, {"model": "physionet.stepdetails", "pk": 13, "fields": {"title": "Project Files", "content": "Health Data Nexus resources should be reusable by the greater scientific community. To facilitate the reuse of your content, please adhere to the following reusability guidelines.
\n\nGeneral Guidelines
\n\n\n\tFiles must contain no protected health information . \n\tFiles are provided in an open format such as text, csv, or WFDB, rather than a proprietary format. \n\tCode must be provided in source format. \n\tData files must be machine readable. \n\tLarge regularly-sampled time-series data, especially waveforms, are provided in WFDB format. \n\tFilenames must only contain letters, numbers, dashes, underscores, and dots. \n\tIf appropriate, provide a csv file named subject-info.csv containing information on all subjects, such as age and gender. \n \n\nWFDB Files
\n\n\n\tProvide a list of all WFDB format records, named RECORDS . Example file . If you upload this file, you will see a link to view your project's waveforms in LightWAVE . \n\tProvide a tab delimited list of all WFDB format annotation files, named ANNOTATORS . Example file . \n ", "order": 1, "step": 7, "slug": "project_files", "tip": false}}, {"model": "physionet.stepdetails", "pk": 14, "fields": {"title": "Proofread", "content": "Inspect the preview of the published project, and ensure that all authors are satisfied with the content. Any errors that are displayed must be addressed before the project can be submitted for review.
", "order": 1, "step": 8, "slug": "project_proofread", "tip": false}}]
\ No newline at end of file
diff --git a/physionet-django/physionet/fixtures/stepdetails.json b/physionet-django/physionet/fixtures/stepdetails.json
deleted file mode 100644
index 3ffb25dea2..0000000000
--- a/physionet-django/physionet/fixtures/stepdetails.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"model": "physionet.stepdetails", "pk": 1, "fields": {"title": "Preparing for Submission", "content": "To prepare the project for submission, go through the following steps using the side panel:
\n \n Invite authors to be credited for creating the resource. \n Fill in the descriptive metadata. \n Set the access policy and license. \n Add discovery information. \n Upload the files. \n Proofread the project and make sure it is ready for submission. \n The full publishing process is described in the\n author\nguidelines .
", "order": 1, "step": 1, "slug": "preparing_for_submission", "tip": false}}, {"model": "physionet.stepdetails", "pk": 2, "fields": {"title": "Project Authors", "content": "The submitting author is responsible for managing co-authors and handling the project\n submission. Co-authors can be invited using the form below. Once the co-author is registered on {{ SITE_NAME }}, \n the invitation will appear on their project home page. Authors must provide their affiliation on a project-by-project basis.
\n", "order": 1, "step": 2, "slug": "project_authors", "tip": false}}, {"model": "physionet.stepdetails", "pk": 3, "fields": {"title": "Corresponding Author", "content": "The corresponding author is responsible for responding to inquiries from users post publication.
", "order": 2, "step": 2, "slug": "corresponding_author", "tip": false}}, {"model": "physionet.stepdetails", "pk": 4, "fields": {"title": "Corresponding Email", "content": "You are the selected corresponding author. Choose one of your emails to be listed for correspondence.
\n", "order": 3, "step": 2, "slug": "corresponding_email", "tip": false}}, {"model": "physionet.stepdetails", "pk": 5, "fields": {"title": "Your Affiliations", "content": "Set up to three affiliations for your author profile. Note: these fields are not tied to your user profile.
\n", "order": 4, "step": 2, "slug": "your_affiliations", "tip": false}}, {"model": "physionet.stepdetails", "pk": 6, "fields": {"title": "Your Affiliations", "content": "Institutions you are affiliated with. Maximum of 3.", "order": 5, "step": 2, "slug": "your_affiliations_tip", "tip": true}}, {"model": "physionet.stepdetails", "pk": 7, "fields": {"title": "Submitting Author", "content": "Only the submitting author of a project is able to edit content.\n You may transfer the role of submitting author to a co-author.\n Choose one of the co-authors below to make them the submitting author for this project.\n Transferring authorship will remove your ability to edit content!
", "order": 6, "step": 2, "slug": "submitting_author", "tip": false}}, {"model": "physionet.stepdetails", "pk": 8, "fields": {"title": "Project Content", "content": "Describe the context of your resource, the organization of its files, and how it is to be reused.
Please adhere to the standards specified in the helpstrings. Required fields are indicated by a *.", "order": 1, "step": 3, "slug": "project_content", "tip": false}}, {"model": "physionet.stepdetails", "pk": 9, "fields": {"title": "Project Access", "content": "
Set the access policy and terms of reuse for your resource. The descriptive metadata of all published projects are publically visible. The following access policies control access to the files:
\n\n\n\tOpen : Anyone can access the files, as long as they conform to the terms of the specified license. \n\tRestricted : Only logged in users who sign a data use agreement (DUA) for the project can access the files. \n\tCredentialed : Only Health Data Nexus credentialed users who sign a DUA for the project can access the files. This tier is only for sensitive databases. Please contact us beforehand if you would like to contribute such a resource. \n \n\nWe strongly encourage selecting the open access policy.
", "order": 1, "step": 4, "slug": "project_access", "tip": false}}, {"model": "physionet.stepdetails", "pk": 10, "fields": {"title": "Project Discovery", "content": "Add information to increase your project's discoverability.
", "order": 1, "step": 5, "slug": "project_discovery", "tip": false}}, {"model": "physionet.stepdetails", "pk": 11, "fields": {"title": "Ethics", "content": "Please provide an ethics statement following the author guidelines . Statements on ethics approval should appear here. Your statement will be included in the public project description.
", "order": 1, "step": 6, "slug": "project_ethics", "tip": false}}, {"model": "physionet.stepdetails", "pk": 12, "fields": {"title": "Supporting Documentation", "content": "You may upload supporting documents here. These documents will be reviewed by our editorial staff, but they will not be shared publicly. For further guidance, please refer to our author guidelines .
", "order": 2, "step": 6, "slug": "supporting_documentation", "tip": false}}, {"model": "physionet.stepdetails", "pk": 13, "fields": {"title": "Project Files", "content": "Health Data Nexus resources should be reusable by the greater scientific community. To facilitate the reuse of your content, please adhere to the following reusability guidelines.
\n\nGeneral Guidelines
\n\n\n\tFiles must contain no protected health information . \n\tFiles are provided in an open format such as text, csv, or WFDB, rather than a proprietary format. \n\tCode must be provided in source format. \n\tData files must be machine readable. \n\tLarge regularly-sampled time-series data, especially waveforms, are provided in WFDB format. \n\tFilenames must only contain letters, numbers, dashes, underscores, and dots. \n\tIf appropriate, provide a csv file named subject-info.csv containing information on all subjects, such as age and gender. \n \n\nWFDB Files
\n\n\n\tProvide a list of all WFDB format records, named RECORDS . Example file . If you upload this file, you will see a link to view your project's waveforms in LightWAVE . \n\tProvide a tab delimited list of all WFDB format annotation files, named ANNOTATORS . Example file . \n ", "order": 1, "step": 7, "slug": "project_files", "tip": false}}, {"model": "physionet.stepdetails", "pk": 14, "fields": {"title": "Proofread", "content": "Inspect the preview of the published project, and ensure that all authors are satisfied with the content. Any errors that are displayed must be addressed before the project can be submitted for review.
", "order": 1, "step": 8, "slug": "project_proofread", "tip": false}}]
\ No newline at end of file
diff --git a/physionet-django/physionet/fixtures/steps.json b/physionet-django/physionet/fixtures/steps.json
deleted file mode 100644
index 90e27855f3..0000000000
--- a/physionet-django/physionet/fixtures/steps.json
+++ /dev/null
@@ -1 +0,0 @@
-[{"model": "physionet.step", "pk": 1, "fields": {"title": "Overview", "process": 1, "slug": "create_project_overview", "order": 1}}, {"model": "physionet.step", "pk": 2, "fields": {"title": "Authors", "process": 1, "slug": "create_project_authors", "order": 2}}, {"model": "physionet.step", "pk": 3, "fields": {"title": "Content", "process": 1, "slug": "create_project_content", "order": 3}}, {"model": "physionet.step", "pk": 4, "fields": {"title": "Access", "process": 1, "slug": "create_project_access", "order": 4}}, {"model": "physionet.step", "pk": 5, "fields": {"title": "Discovery", "process": 1, "slug": "create_project_discovery", "order": 5}}, {"model": "physionet.step", "pk": 6, "fields": {"title": "Ethics", "process": 1, "slug": "create_project_ethics", "order": 6}}, {"model": "physionet.step", "pk": 7, "fields": {"title": "Files", "process": 1, "slug": "create_project_files", "order": 7}}, {"model": "physionet.step", "pk": 8, "fields": {"title": "Proofread", "process": 1, "slug": "create_project_proofread", "order": 8}}]
\ No newline at end of file
diff --git a/physionet-django/user/management/commands/loaddemo.py b/physionet-django/user/management/commands/loaddemo.py
index 5ce63753a5..bb22e571b2 100644
--- a/physionet-django/user/management/commands/loaddemo.py
+++ b/physionet-django/user/management/commands/loaddemo.py
@@ -53,6 +53,11 @@ def handle(self, *args, **options):
'fixtures', 'sites.json')
call_command('loaddata', site_fixtures, verbosity=1)
+ # load Copy for create project process
+ project_copy_fixtures = os.path.join(settings.BASE_DIR, 'physionet',
+ 'fixtures', 'project_copy.json')
+ call_command('loaddata', project_copy_fixtures, verbosity=1)
+
# Load SSO login instruction static page
if settings.ENABLE_SSO:
sso_fixtures = os.path.join(settings.BASE_DIR, 'physionet',
From bbf261c4d4750e9826dc18bfb1be02ed0d27fb9d Mon Sep 17 00:00:00 2001
From: rutvikrj26
Date: Sat, 11 May 2024 17:20:40 -0400
Subject: [PATCH 08/10] added step_pk and step_details_pk for default test
cases
---
physionet-django/console/urls.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/physionet-django/console/urls.py b/physionet-django/console/urls.py
index bb7ce86a38..12bc431ee8 100644
--- a/physionet-django/console/urls.py
+++ b/physionet-django/console/urls.py
@@ -192,6 +192,8 @@
'process_slug': 'create_project',
'version': '1.0',
'training_slug': 'world-101-introduction-to-continents-and-countries',
+ 'step_pk': 1,
+ 'step_details_pk': 1,
}
TEST_CASES = {
'manage_published_project': {
From 70b7a7c3e458da5ba2e2932935aea7c29381345c Mon Sep 17 00:00:00 2001
From: rutvikrj26
Date: Sat, 11 May 2024 17:48:16 -0400
Subject: [PATCH 09/10] fixed styling changes
---
physionet-django/console/urls.py | 4 ++-
physionet-django/console/views.py | 5 ++++
physionet-django/project/views.py | 25 +++++++++++--------
.../user/management/commands/loaddemo.py | 2 +-
.../commands/test_add_new_sections.py | 15 ++++++-----
5 files changed, 32 insertions(+), 19 deletions(-)
diff --git a/physionet-django/console/urls.py b/physionet-django/console/urls.py
index 12bc431ee8..d52e4322d9 100644
--- a/physionet-django/console/urls.py
+++ b/physionet-django/console/urls.py
@@ -137,7 +137,8 @@
path('process_pages//show/', views.process_pages_show, name='process_pages_show'),
path('process_pages/step_details//show/', views.step_details_show, name='step_details_show'),
path('process_pages/step_details//edit/', views.step_details_edit, name='step_details_edit'),
- path('process_pages/step_details//delete/', views.step_details_delete, name='step_details_delete'),
+ path('process_pages/step_details//delete/',
+ views.step_details_delete, name='step_details_delete'),
path('licenses/', views.license_list, name='license_list'),
path('licenses//', views.license_detail, name='license_detail'),
@@ -195,6 +196,7 @@
'step_pk': 1,
'step_details_pk': 1,
}
+
TEST_CASES = {
'manage_published_project': {
'project_slug': 'demoeicu',
diff --git a/physionet-django/console/views.py b/physionet-django/console/views.py
index b24aeaffdb..4d788c3299 100644
--- a/physionet-django/console/views.py
+++ b/physionet-django/console/views.py
@@ -2860,6 +2860,7 @@ def static_page_sections_edit(request, page_pk, section_pk):
{'section_form': section_form, 'page': static_page, 'section': section},
)
+
@console_permission_required('physionet.change_staticpage')
def process_pages(request):
"""
@@ -2872,6 +2873,7 @@ def process_pages(request):
'console/process_pages/index.html',
{'processes': processes})
+
@console_permission_required('physionet.change_staticpage')
def process_pages_show(request, process_slug):
"""
@@ -2884,6 +2886,7 @@ def process_pages_show(request, process_slug):
'console/process_pages/show.html',
{'steps': steps, 'process_name': process.title})
+
@console_permission_required('physionet.change_staticpage')
def step_details_show(request, step_pk):
"""
@@ -2897,6 +2900,7 @@ def step_details_show(request, step_pk):
'console/process_pages/step_details/index.html',
{'step': step, 'step_details': step_details})
+
@console_permission_required('physionet.change_staticpage')
def step_details_edit(request, step_details_pk):
"""
@@ -2917,6 +2921,7 @@ def step_details_edit(request, step_details_pk):
'console/process_pages/step_details/edit.html',
{'step_detail': step_detail, 'step_details_form': step_details_form})
+
@console_permission_required('physionet.change_staticpage')
def step_details_delete(request, step_details_pk):
step_detail = get_object_or_404(StepDetails, pk=step_details_pk)
diff --git a/physionet-django/project/views.py b/physionet-django/project/views.py
index f5175c717b..bc3e9bcdf5 100644
--- a/physionet-django/project/views.py
+++ b/physionet-django/project/views.py
@@ -407,12 +407,12 @@ def project_overview(request, project_slug, **kwargs):
project_overview_step = Step.objects.get(slug='create_project_overview')
project_overview_step_details = StepDetails.objects.filter(step=project_overview_step)
- step_details_dict = { step_detail.slug: step_detail for step_detail in project_overview_step_details }
+ step_details_dict = {step_detail.slug: step_detail for step_detail in project_overview_step_details}
return render(request, 'project/project_overview.html',
{'project':project, 'is_submitting':is_submitting,
- 'under_submission':under_submission,
- 'submitting_author':kwargs['authors'].get(is_submitting=True),
+ 'under_submission': under_submission,
+ 'submitting_author': kwargs['authors'].get(is_submitting=True),
'step_details_dict': step_details_dict})
@@ -649,7 +649,7 @@ def project_authors(request, project_slug, **kwargs):
edit_affiliations_url = reverse('edit_affiliation', args=[project.slug])
project_authors_step = Step.objects.get(slug='create_project_authors')
project_authors_step_details = StepDetails.objects.filter(step=project_authors_step)
- step_details_dict = { step_detail.slug: step_detail for step_detail in project_authors_step_details }
+ step_details_dict = {step_detail.slug: step_detail for step_detail in project_authors_step_details}
return render(
@@ -787,7 +787,7 @@ def project_content(request, project_slug, **kwargs):
project_content_step = Step.objects.get(slug='create_project_content')
project_content_step_details = StepDetails.objects.filter(step=project_content_step)
- step_details_dict = { step_detail.slug: step_detail for step_detail in project_content_step_details }
+ step_details_dict = {step_detail.slug: step_detail for step_detail in project_content_step_details}
response = render(request, 'project/project_content.html', {'project':project,
'description_form':description_form, 'reference_formset':reference_formset,
@@ -893,11 +893,14 @@ def project_discovery(request, project_slug, **kwargs):
step_details_dict = {step_detail.slug: step_detail for step_detail in project_discovery_step_details}
return render(request, 'project/project_discovery.html',
- {'project': project, 'discovery_form': discovery_form,
- 'publication_formset': publication_formset,
- 'step_details_dict': step_details_dict,
- 'topic_formset': topic_formset, 'add_item_url': edit_url,
- 'remove_item_url': edit_url, 'is_submitting': is_submitting})
+ {'project': project,
+ 'discovery_form': discovery_form,
+ 'publication_formset': publication_formset,
+ 'step_details_dict': step_details_dict,
+ 'topic_formset': topic_formset,
+ 'add_item_url': edit_url,
+ 'remove_item_url': edit_url,
+ 'is_submitting': is_submitting})
class ProjectAutocomplete(autocomplete.Select2QuerySetView):
@@ -1372,7 +1375,7 @@ def project_proofread(request, project_slug, **kwargs):
step_details_dict = {step_detail.slug: step_detail for step_detail in project_proofread_step_details}
return render(request, 'project/project_proofread.html',
- {'project':kwargs['project'], 'step_details_dict': step_details_dict})
+ {'project': kwargs['project'], 'step_details_dict': step_details_dict})
@project_auth(auth_mode=0)
diff --git a/physionet-django/user/management/commands/loaddemo.py b/physionet-django/user/management/commands/loaddemo.py
index bb22e571b2..ba4bb457f2 100644
--- a/physionet-django/user/management/commands/loaddemo.py
+++ b/physionet-django/user/management/commands/loaddemo.py
@@ -55,7 +55,7 @@ def handle(self, *args, **options):
# load Copy for create project process
project_copy_fixtures = os.path.join(settings.BASE_DIR, 'physionet',
- 'fixtures', 'project_copy.json')
+ 'fixtures', 'project_copy.json')
call_command('loaddata', project_copy_fixtures, verbosity=1)
# Load SSO login instruction static page
diff --git a/physionet-django/user/management/commands/test_add_new_sections.py b/physionet-django/user/management/commands/test_add_new_sections.py
index 5137026bf8..6337f73b4c 100644
--- a/physionet-django/user/management/commands/test_add_new_sections.py
+++ b/physionet-django/user/management/commands/test_add_new_sections.py
@@ -9,19 +9,22 @@
"""
import os
-
+import sys
from django.conf import settings
from django.core.management import call_command
from django.core.management.base import BaseCommand
+
class Command(BaseCommand):
def handle(self, *args, **options):
# If not in development, prompt warning messages twice
if 'development' not in settings.ENVIRONMENT:
- warning_messages = ['You are NOT in the development environment. Are you sure you want to insert demo data? [y/n]',
- 'The demo data will be mixed with existing data. Are you sure? [y/n]',
- 'Final warning. Are you ABSOLUTELY SURE? [y/n]']
+ warning_messages = [
+ 'You are NOT in the development environment. Are you sure you want to insert demo data? [y/n]',
+ 'The demo data will be mixed with existing data. Are you sure? [y/n]',
+ 'Final warning. Are you ABSOLUTELY SURE? [y/n]'
+ ]
for i in range(3):
choice = input(warning_messages[i]).lower()
if choice != 'y':
@@ -30,5 +33,5 @@ def handle(self, *args, **options):
# Load licences and software languages
sections_fixtures = os.path.join(settings.BASE_DIR, 'physionet',
- 'fixtures', 'steps.json')
- call_command('loaddata', sections_fixtures, verbosity=1)
\ No newline at end of file
+ 'fixtures', 'project_copy.json')
+ call_command('loaddata', sections_fixtures, verbosity=1)
From d87a06a15a09edaddceeec5e96e91ece1bcf0a3c Mon Sep 17 00:00:00 2001
From: rutvikrj26
Date: Wed, 15 May 2024 16:25:42 -0400
Subject: [PATCH 10/10] re-organized the migrations
---
.../0008_process_step_stepdetails.py | 96 +++++++++++++++++++
..._step_alter_section_options_stepdetails.py | 49 ----------
...ction_options_alter_stepdetails_options.py | 21 ----
..._step_process_name_process_step_process.py | 49 ----------
4 files changed, 96 insertions(+), 119 deletions(-)
create mode 100644 physionet-django/physionet/migrations/0008_process_step_stepdetails.py
delete mode 100644 physionet-django/physionet/migrations/0008_step_alter_section_options_stepdetails.py
delete mode 100644 physionet-django/physionet/migrations/0009_alter_section_options_alter_stepdetails_options.py
delete mode 100644 physionet-django/physionet/migrations/0010_remove_step_process_name_process_step_process.py
diff --git a/physionet-django/physionet/migrations/0008_process_step_stepdetails.py b/physionet-django/physionet/migrations/0008_process_step_stepdetails.py
new file mode 100644
index 0000000000..394930ef5c
--- /dev/null
+++ b/physionet-django/physionet/migrations/0008_process_step_stepdetails.py
@@ -0,0 +1,96 @@
+# Generated by Django 4.2.11 on 2024-05-15 20:22
+
+from django.db import migrations, models
+import django.db.models.deletion
+import project.modelcomponents.fields
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ("physionet", "0007_frontpagebutton"),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ name="Process",
+ fields=[
+ (
+ "id",
+ models.AutoField(
+ auto_created=True,
+ primary_key=True,
+ serialize=False,
+ verbose_name="ID",
+ ),
+ ),
+ ("title", models.CharField(max_length=64)),
+ ("slug", models.CharField(max_length=64, unique=True)),
+ ("description", models.TextField(blank=True)),
+ ],
+ options={
+ "default_permissions": (),
+ "unique_together": {("title", "slug")},
+ },
+ ),
+ migrations.CreateModel(
+ name="Step",
+ fields=[
+ (
+ "id",
+ models.AutoField(
+ auto_created=True,
+ primary_key=True,
+ serialize=False,
+ verbose_name="ID",
+ ),
+ ),
+ ("title", models.CharField(max_length=64)),
+ ("slug", models.CharField(max_length=64)),
+ ("order", models.PositiveSmallIntegerField(default=0)),
+ (
+ "process",
+ models.ForeignKey(
+ default=None,
+ on_delete=django.db.models.deletion.CASCADE,
+ related_name="steps",
+ to="physionet.process",
+ ),
+ ),
+ ],
+ options={
+ "ordering": ("order",),
+ "default_permissions": (),
+ },
+ ),
+ migrations.CreateModel(
+ name="StepDetails",
+ fields=[
+ (
+ "id",
+ models.AutoField(
+ auto_created=True,
+ primary_key=True,
+ serialize=False,
+ verbose_name="ID",
+ ),
+ ),
+ ("title", models.CharField(max_length=64)),
+ ("content", project.modelcomponents.fields.SafeHTMLField(blank=True)),
+ ("order", models.PositiveSmallIntegerField(default=0)),
+ ("slug", models.CharField(max_length=64)),
+ ("tip", models.BooleanField(default=False)),
+ (
+ "step",
+ models.ForeignKey(
+ on_delete=django.db.models.deletion.CASCADE, to="physionet.step"
+ ),
+ ),
+ ],
+ options={
+ "ordering": ("order",),
+ "default_permissions": (),
+ "unique_together": {("step", "order")},
+ },
+ ),
+ ]
diff --git a/physionet-django/physionet/migrations/0008_step_alter_section_options_stepdetails.py b/physionet-django/physionet/migrations/0008_step_alter_section_options_stepdetails.py
deleted file mode 100644
index af830e1035..0000000000
--- a/physionet-django/physionet/migrations/0008_step_alter_section_options_stepdetails.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# Generated by Django 4.1.13 on 2024-02-29 09:28
-
-from django.db import migrations, models
-import django.db.models.deletion
-import project.modelcomponents.fields
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ('physionet', '0007_frontpagebutton'),
- ]
-
- operations = [
- migrations.CreateModel(
- name='Step',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(max_length=64)),
- ('process_name', models.CharField(max_length=64)),
- ('slug', models.CharField(max_length=64)),
- ('order', models.PositiveSmallIntegerField(default=0)),
- ],
- options={
- 'ordering': ('order',),
- 'default_permissions': (),
- },
- ),
- migrations.AlterModelOptions(
- name='section',
- options={'default_permissions': ()},
- ),
- migrations.CreateModel(
- name='StepDetails',
- fields=[
- ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
- ('title', models.CharField(max_length=64)),
- ('content', project.modelcomponents.fields.SafeHTMLField(blank=True)),
- ('order', models.PositiveSmallIntegerField(default=0)),
- ('slug', models.CharField(max_length=64)),
- ('tip', models.BooleanField(default=False)),
- ('step', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='physionet.step')),
- ],
- options={
- 'default_permissions': (),
- 'unique_together': {('step', 'order')},
- },
- ),
- ]
diff --git a/physionet-django/physionet/migrations/0009_alter_section_options_alter_stepdetails_options.py b/physionet-django/physionet/migrations/0009_alter_section_options_alter_stepdetails_options.py
deleted file mode 100644
index 090b735144..0000000000
--- a/physionet-django/physionet/migrations/0009_alter_section_options_alter_stepdetails_options.py
+++ /dev/null
@@ -1,21 +0,0 @@
-# Generated by Django 4.2.11 on 2024-05-08 15:09
-
-from django.db import migrations
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ("physionet", "0008_step_alter_section_options_stepdetails"),
- ]
-
- operations = [
- migrations.AlterModelOptions(
- name="section",
- options={"default_permissions": (), "ordering": ("order",)},
- ),
- migrations.AlterModelOptions(
- name="stepdetails",
- options={"default_permissions": (), "ordering": ("order",)},
- ),
- ]
diff --git a/physionet-django/physionet/migrations/0010_remove_step_process_name_process_step_process.py b/physionet-django/physionet/migrations/0010_remove_step_process_name_process_step_process.py
deleted file mode 100644
index d28f914ea0..0000000000
--- a/physionet-django/physionet/migrations/0010_remove_step_process_name_process_step_process.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# Generated by Django 4.2.11 on 2024-05-08 20:40
-
-from django.db import migrations, models
-import django.db.models.deletion
-
-
-class Migration(migrations.Migration):
-
- dependencies = [
- ("physionet", "0009_alter_section_options_alter_stepdetails_options"),
- ]
-
- operations = [
- migrations.RemoveField(
- model_name="step",
- name="process_name",
- ),
- migrations.CreateModel(
- name="Process",
- fields=[
- (
- "id",
- models.AutoField(
- auto_created=True,
- primary_key=True,
- serialize=False,
- verbose_name="ID",
- ),
- ),
- ("title", models.CharField(max_length=64)),
- ("slug", models.CharField(max_length=64, unique=True)),
- ("description", models.TextField(blank=True)),
- ],
- options={
- "default_permissions": (),
- "unique_together": {("title", "slug")},
- },
- ),
- migrations.AddField(
- model_name="step",
- name="process",
- field=models.ForeignKey(
- default=None,
- on_delete=django.db.models.deletion.CASCADE,
- related_name="steps",
- to="physionet.process",
- ),
- ),
- ]