From e789dadcc65f6ae5d61b8ecae0cfe220f891185d Mon Sep 17 00:00:00 2001 From: Adrienne Stilp Date: Thu, 1 Aug 2024 11:11:38 -0700 Subject: [PATCH 1/2] Change "release" to "release prep" in user-facing text These are not the actual workspaces that are getting released; instead they are workspaces where we are preparing the release. (This changed since they were initially coded.) To help prevent confusion from users, show "release prep" instead of "release" in text that users see. Do not make any changes to the underlying structure of the code or models, because we are not tracking the actual release workspaces in ACM. --- gregor_django/gregor_anvil/adapters.py | 4 ++-- gregor_django/templates/gregor_anvil/uploadcycle_detail.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gregor_django/gregor_anvil/adapters.py b/gregor_django/gregor_anvil/adapters.py index 50f6dee7..52cec715 100644 --- a/gregor_django/gregor_anvil/adapters.py +++ b/gregor_django/gregor_anvil/adapters.py @@ -119,8 +119,8 @@ class ReleaseWorkspaceAdapter(BaseWorkspaceAdapter): """Adapter for ReleaseWorkspace.""" type = "release" - name = "Release workspace" - description = "Workspaces for release to the general scientific community via dbGaP" + name = "Release prep workspace" + description = "Workspaces for preparing releases for the general scientific community via dbGaP" list_table_class_view = tables.ReleaseWorkspaceTable list_table_class_staff_view = tables.ReleaseWorkspaceTable workspace_data_model = models.ReleaseWorkspace diff --git a/gregor_django/templates/gregor_anvil/uploadcycle_detail.html b/gregor_django/templates/gregor_anvil/uploadcycle_detail.html index 9f421e63..f48d3a23 100644 --- a/gregor_django/templates/gregor_anvil/uploadcycle_detail.html +++ b/gregor_django/templates/gregor_anvil/uploadcycle_detail.html @@ -30,7 +30,7 @@

Combined consortium data workspaces

{% render_table tables.1 %} -

Release workspaces

+

Release prep workspaces

{% render_table tables.2 %}
From 79e5ec0efa80c57efb54360e5150464fe41e7301 Mon Sep 17 00:00:00 2001 From: Adrienne Stilp Date: Thu, 1 Aug 2024 11:16:32 -0700 Subject: [PATCH 2/2] Change release workspace verbose name to match --- ...leaseworkspace_meta_change_verbose_name.py | 21 +++++++++++++++++++ gregor_django/gregor_anvil/models.py | 3 ++- 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 gregor_django/gregor_anvil/migrations/0025_releaseworkspace_meta_change_verbose_name.py diff --git a/gregor_django/gregor_anvil/migrations/0025_releaseworkspace_meta_change_verbose_name.py b/gregor_django/gregor_anvil/migrations/0025_releaseworkspace_meta_change_verbose_name.py new file mode 100644 index 00000000..4521421b --- /dev/null +++ b/gregor_django/gregor_anvil/migrations/0025_releaseworkspace_meta_change_verbose_name.py @@ -0,0 +1,21 @@ +# Generated by Django 4.2.14 on 2024-08-01 18:14 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('gregor_anvil', '0024_member_upload_groups'), + ] + + operations = [ + migrations.AlterModelOptions( + name='historicalreleaseworkspace', + options={'get_latest_by': ('history_date', 'history_id'), 'ordering': ('-history_date', '-history_id'), 'verbose_name': 'historical release prep workspace', 'verbose_name_plural': 'historical release prep workspaces'}, + ), + migrations.AlterModelOptions( + name='releaseworkspace', + options={'verbose_name': 'release prep workspace'}, + ), + ] diff --git a/gregor_django/gregor_anvil/models.py b/gregor_django/gregor_anvil/models.py index 8a3813df..c39e6b4f 100644 --- a/gregor_django/gregor_anvil/models.py +++ b/gregor_django/gregor_anvil/models.py @@ -249,7 +249,7 @@ class CombinedConsortiumDataWorkspace(TimeStampedModel, BaseWorkspaceData): class ReleaseWorkspace(TimeStampedModel, BaseWorkspaceData): - """A model to track a workspace for release to the scientific community.""" + """A model to track a workspace for preparing data releases for the scientific community.""" phs = 3047 """dbGaP-assigned phs for the GREGoR study.""" @@ -285,6 +285,7 @@ class Meta: fields=["consent_group", "upload_cycle"], ), ] + verbose_name = "release prep workspace" def get_dbgap_accession(self): return "phs{phs:06d}.v{v}.p{p}".format(phs=self.phs, v=self.dbgap_version, p=self.dbgap_participant_set)