Skip to content

Commit

Permalink
Update adapters for workspace_form_class requirement
Browse files Browse the repository at this point in the history
ACM v0.18 requires workspace adapters to provide workspace_form_class
that is used in place of the default WorkspaceForm from ACM. For all
the adapters, specify the default WorkspaceForm for now.
  • Loading branch information
amstilp committed Oct 2, 2023
1 parent c9b6dad commit 8d32897
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions primed/cdsa/adapters.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from anvil_consortium_manager.adapters.workspace import BaseWorkspaceAdapter
from anvil_consortium_manager.forms import WorkspaceForm

from . import forms, models, tables

Expand All @@ -12,6 +13,7 @@ class CDSAWorkspaceAdapter(BaseWorkspaceAdapter):
"Workspaces containing data from the Consortium Data Sharing Agreement."
)
list_table_class = tables.CDSAWorkspaceTable
workspace_form_class = WorkspaceForm
workspace_data_model = models.CDSAWorkspace
workspace_data_form_class = forms.CDSAWorkspaceForm
workspace_detail_template_name = "cdsa/cdsaworkspace_detail.html"
2 changes: 2 additions & 0 deletions primed/dbgap/adapters.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from anvil_consortium_manager.adapters.workspace import BaseWorkspaceAdapter
from anvil_consortium_manager.forms import WorkspaceForm

from . import forms, models, tables

Expand All @@ -10,6 +11,7 @@ class dbGaPWorkspaceAdapter(BaseWorkspaceAdapter):
name = "dbGaP workspace"
description = "Workspaces containing data from released dbGaP accessions"
list_table_class = tables.dbGaPWorkspaceTable
workspace_form_class = WorkspaceForm
workspace_data_model = models.dbGaPWorkspace
workspace_data_form_class = forms.dbGaPWorkspaceForm
workspace_detail_template_name = "dbgap/dbgapworkspace_detail.html"
6 changes: 6 additions & 0 deletions primed/miscellaneous_workspaces/adapters.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Adapters for the `workspaces` app."""

from anvil_consortium_manager.adapters.workspace import BaseWorkspaceAdapter
from anvil_consortium_manager.forms import WorkspaceForm

from primed.primed_anvil.tables import DefaultWorkspaceTable

Expand All @@ -14,6 +15,7 @@ class SimulatedDataWorkspaceAdapter(BaseWorkspaceAdapter):
name = "Simulated Data workspace"
description = "Workspaces containing simulated data"
list_table_class = DefaultWorkspaceTable
workspace_form_class = WorkspaceForm
workspace_data_model = models.SimulatedDataWorkspace
workspace_data_form_class = forms.SimulatedDataWorkspaceForm
workspace_detail_template_name = (
Expand All @@ -28,6 +30,7 @@ class ConsortiumDevelWorkspaceAdapter(BaseWorkspaceAdapter):
name = "Consortium development workspace"
description = "Workspaces intended for consortium development of methods"
list_table_class = DefaultWorkspaceTable
workspace_form_class = WorkspaceForm
workspace_data_model = models.ConsortiumDevelWorkspace
workspace_data_form_class = forms.ConsortiumDevelWorkspaceForm
workspace_detail_template_name = "anvil_consortium_manager/workspace_detail.html"
Expand All @@ -42,6 +45,7 @@ class ExampleWorkspaceAdapter(BaseWorkspaceAdapter):
"Workspaces containing examples of using AnVIL, working with data, etc."
)
list_table_class = DefaultWorkspaceTable
workspace_form_class = WorkspaceForm
workspace_data_model = models.ExampleWorkspace
workspace_data_form_class = forms.ExampleWorkspaceForm
workspace_detail_template_name = "anvil_consortium_manager/workspace_detail.html"
Expand All @@ -54,6 +58,7 @@ class TemplateWorkspaceAdapter(BaseWorkspaceAdapter):
name = "Template workspace"
description = "Template workspaces that can be cloned to create other workspaces"
list_table_class = DefaultWorkspaceTable
workspace_form_class = WorkspaceForm
workspace_data_model = models.TemplateWorkspace
workspace_data_form_class = forms.TemplateWorkspaceForm
workspace_detail_template_name = "anvil_consortium_manager/workspace_detail.html"
Expand All @@ -66,6 +71,7 @@ class OpenAccessWorkspaceAdapter(BaseWorkspaceAdapter):
name = "Open access workspace"
description = "Workspaces containing open access data"
list_table_class = tables.OpenAccessWorkspaceTable
workspace_form_class = WorkspaceForm
workspace_data_model = models.OpenAccessWorkspace
workspace_data_form_class = forms.OpenAccessWorkspaceForm
workspace_detail_template_name = (
Expand Down

0 comments on commit 8d32897

Please sign in to comment.