-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #857 from UW-GAC/main
Deploy to stage
- Loading branch information
Showing
31 changed files
with
1,390 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
sort-direction: ascending | ||
|
||
categories: | ||
- title: "⬆️ Dependencies" | ||
labels: | ||
- "dependencies" | ||
- "update-requirements-files" | ||
- "combined-pr" | ||
|
||
template: | | ||
## What’s Changed | ||
$CHANGES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
name: Release Drafter | ||
|
||
on: | ||
push: | ||
# branches to consider in the event; optional, defaults to all | ||
branches: | ||
- deploy/production | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
update_release_draft: | ||
permissions: | ||
# write permission is required to create a github release | ||
contents: write | ||
# write permission is required for autolabeler | ||
# otherwise, read permission is required at least | ||
pull-requests: read | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Get current date | ||
id: get-date | ||
run: | | ||
export CURRENT_DATE=$(TZ=":America/Los_Angeles" date "+%Y-%m-%d") | ||
echo "current_date=${CURRENT_DATE}" >> $GITHUB_OUTPUT | ||
echo "Current date set to ${CURRENT_DATE}" | ||
- name: Get number of releases for the current date | ||
id: get-release-count | ||
run: | | ||
export RELEASE_COUNT=$(gh release list \ | ||
--repo ${{ github.repository }} \ | ||
--json tagName \ | ||
--exclude-drafts \ | ||
--jq "map(select(.tagName | startswith(\"${CURRENT_DATE}\")))|length" \ | ||
) | ||
echo "release_count=${RELEASE_COUNT}" >> $GITHUB_OUTPUT | ||
echo "Found ${RELEASE_COUNT} releases" | ||
env: | ||
CURRENT_DATE: ${{ steps.get-date.outputs.current_date }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Prepare release version | ||
id: get-version | ||
run: | | ||
export VERSION="${CURRENT_DATE}" | ||
if [ $RELEASE_COUNT -gt 0 ]; then | ||
echo "Release already exists for version ${VERSION}" | ||
echo "Appending release count to version" | ||
export VERSION="${CURRENT_DATE}-${RELEASE_COUNT}" | ||
fi | ||
echo "version=${VERSION}" >> $GITHUB_OUTPUT | ||
echo "Version set to ${VERSION}" | ||
env: | ||
CURRENT_DATE: ${{ steps.get-date.outputs.current_date }} | ||
RELEASE_COUNT: ${{ steps.get-release-count.outputs.release_count }} | ||
|
||
|
||
- name: Check that version doesn't exist | ||
id: check-release | ||
run: | | ||
echo "Checking version ${VERSION}" | ||
export CHECK=$(gh release list \ | ||
--repo ${{ github.repository }} \ | ||
--json tagName \ | ||
--exclude-drafts \ | ||
--jq "map(select(.tagName == \"${VERSION}\"))|length" \ | ||
) | ||
echo "Found ${CHECK} releases" | ||
if [ $CHECK -gt 0 ]; then | ||
echo "Release already exists for version ${VERSION}" | ||
exit 1 | ||
fi | ||
env: | ||
VERSION: ${{ steps.get-version.outputs.version }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Check that tag doesn't exist | ||
id: check-tag | ||
run: | | ||
echo "Checking tag for version ${VERSION}" | ||
# Query the API for this tag. | ||
export CHECK=$(gh api \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
/repos/${{ github.repository }}/tags \ | ||
--jq "map(select(.name == \"${VERSION}\"))|length" \ | ||
) | ||
echo "Found ${CHECK} tags" | ||
if [ $CHECK -gt 0 ]; then | ||
echo "Tag already exists for version ${VERSION}" | ||
exit 1 | ||
fi | ||
env: | ||
VERSION: ${{ steps.get-version.outputs.version }} | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
- uses: release-drafter/release-drafter@v6 | ||
with: | ||
commitish: deploy/production | ||
tag: ${{ steps.get-version.outputs.version }} | ||
name: ${{ steps.get-version.outputs.version }} | ||
version: ${{ steps.get-version.outputs.version }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -298,6 +298,7 @@ | |
"socialaccount_signup", | ||
"admin:index", | ||
"admin:login", | ||
"favicon", | ||
] | ||
|
||
# django-dbbackup | ||
|
@@ -345,6 +346,11 @@ | |
"request_scope": True, | ||
"django_group_name": "Approved by PI for AnVIL access", | ||
}, | ||
{ | ||
"drupal_machine_name": "authenticated", | ||
"request_scope": True, | ||
"django_group_name": "Authenticated", | ||
}, | ||
], | ||
} | ||
} | ||
|
@@ -375,25 +381,19 @@ | |
# django-anvil-consortium-manager | ||
# ------------------------------------------------------------------------------ | ||
ANVIL_WORKSPACE_ADAPTERS = [ | ||
"gregor_django.gregor_anvil.adapters.ResourceWorkspaceAdapter", | ||
"gregor_django.gregor_anvil.adapters.TemplateWorkspaceAdapter", | ||
"gregor_django.gregor_anvil.adapters.CombinedConsortiumDataWorkspaceAdapter", | ||
"gregor_django.gregor_anvil.adapters.UploadWorkspaceAdapter", | ||
"gregor_django.gregor_anvil.adapters.ResourceWorkspaceAdapter", | ||
"gregor_django.gregor_anvil.adapters.ExchangeWorkspaceAdapter", | ||
"gregor_django.gregor_anvil.adapters.PartnerUploadWorkspaceAdapter", | ||
"gregor_django.gregor_anvil.adapters.CombinedConsortiumDataWorkspaceAdapter", | ||
"gregor_django.gregor_anvil.adapters.ReleaseWorkspaceAdapter", | ||
"gregor_django.gregor_anvil.adapters.DCCProcessingWorkspaceAdapter", | ||
"gregor_django.gregor_anvil.adapters.DCCProcessedDataWorkspaceAdapter", | ||
"gregor_django.gregor_anvil.adapters.ExchangeWorkspaceAdapter", | ||
"gregor_django.gregor_anvil.adapters.ReleaseWorkspaceAdapter", | ||
"gregor_django.gregor_anvil.adapters.TemplateWorkspaceAdapter", | ||
] | ||
ANVIL_ACCOUNT_ADAPTER = "gregor_django.gregor_anvil.adapters.AccountAdapter" | ||
ANVIL_MANAGED_GROUP_ADAPTER = "gregor_django.gregor_anvil.adapters.ManagedGroupAdapter" | ||
|
||
# Specify the URL name that AccountLink and AccountLinkVerify redirect to. | ||
ANVIL_ACCOUNT_LINK_REDIRECT = "users:redirect" | ||
# Specify the subject for AnVIL account verification emails. | ||
ANVIL_ACCOUNT_LINK_EMAIL_SUBJECT = "Verify your AnVIL account email" | ||
ANVIL_ACCOUNT_VERIFY_NOTIFICATION_EMAIL = "[email protected]" | ||
|
||
DRUPAL_API_CLIENT_ID = env("DRUPAL_API_CLIENT_ID", default="") | ||
DRUPAL_API_CLIENT_SECRET = env("DRUPAL_API_CLIENT_SECRET", default="") | ||
DRUPAL_API_REL_PATH = env("DRUPAL_API_REL_PATH", default="mockapi") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,7 +116,7 @@ def get_mocked_response(self): | |
"name": "testmaster", | ||
"email": "[email protected]", | ||
"email_verified": "True", | ||
"sub": 20122 | ||
"sub": "20122" | ||
}""", | ||
), | ||
] | ||
|
@@ -184,7 +184,7 @@ def get_id_token(self): | |
"iat": self.setup_time, | ||
"aud": allowed_audience, | ||
"scope": ["authenticated", "oauth_client_user"], | ||
"sub": 20122, | ||
"sub": "20122", | ||
} | ||
) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,6 +67,9 @@ class AccountAdapter(BaseAccountAdapter): | |
|
||
list_table_class = tables.AccountTable | ||
list_filterset_class = filters.AccountListFilter | ||
account_link_verify_redirect = "users:redirect" | ||
account_link_email_subject = "Verify your AnVIL account email" | ||
account_verify_notification_email = "[email protected]" | ||
|
||
def get_autocomplete_queryset(self, queryset, q): | ||
"""Filter to Accounts where the email or the associated user name matches the query `q`.""" | ||
|
@@ -115,6 +118,7 @@ class UploadWorkspaceAdapter(WorkspaceAdminSharingAdapterMixin, BaseWorkspaceAda | |
workspace_data_form_class = forms.UploadWorkspaceForm | ||
workspace_form_class = WorkspaceForm | ||
workspace_detail_template_name = "gregor_anvil/uploadworkspace_detail.html" | ||
workspace_list_template_name = "gregor_anvil/uploadworkspace_list.html" | ||
|
||
def get_autocomplete_queryset(self, queryset, q, forwarded={}): | ||
"""Filter to Accounts where the email or the associated user name matches the query `q`.""" | ||
|
@@ -139,7 +143,7 @@ class PartnerUploadWorkspaceAdapter(WorkspaceAdminSharingAdapterMixin, BaseWorks | |
name = "Partner upload workspace" | ||
description = "Workspaces that contain data uploaded by a Partner Group " | ||
list_table_class_view = tables.PartnerUploadWorkspaceTable | ||
list_table_class_staff_view = tables.PartnerUploadWorkspaceTable | ||
list_table_class_staff_view = tables.PartnerUploadWorkspaceStaffTable | ||
|
||
workspace_data_model = models.PartnerUploadWorkspace | ||
workspace_data_form_class = forms.PartnerUploadWorkspaceForm | ||
|
@@ -156,7 +160,7 @@ class ResourceWorkspaceAdapter(WorkspaceAdminSharingAdapterMixin, BaseWorkspaceA | |
"Workspaces that contain general Consortium resources (e.g., examples of using AnVIL, working with data, etc.)" # noqa: E501 | ||
) | ||
list_table_class_view = tables.DefaultWorkspaceTable | ||
list_table_class_staff_view = tables.DefaultWorkspaceTable | ||
list_table_class_staff_view = tables.DefaultWorkspaceStaffTable | ||
workspace_data_model = models.ResourceWorkspace | ||
workspace_data_form_class = forms.ResourceWorkspaceForm | ||
workspace_detail_template_name = "gregor_anvil/resourceworkspace_detail.html" | ||
|
@@ -189,6 +193,7 @@ class CombinedConsortiumDataWorkspaceAdapter(WorkspaceAdminSharingAdapterMixin, | |
workspace_data_form_class = forms.CombinedConsortiumDataWorkspaceForm | ||
workspace_detail_template_name = "gregor_anvil/combinedconsortiumdataworkspace_detail.html" | ||
workspace_form_class = WorkspaceForm | ||
workspace_list_template_name = "gregor_anvil/combinedconsortiumdataworkspace_list.html" | ||
|
||
|
||
class ReleaseWorkspaceAdapter(WorkspaceAdminSharingAdapterMixin, BaseWorkspaceAdapter): | ||
|
@@ -240,8 +245,9 @@ class ExchangeWorkspaceAdapter(WorkspaceAdminSharingAdapterMixin, BaseWorkspaceA | |
name = "Exchange workspace" | ||
description = "Workspaces for exchanging data with a Research Center outside of an upload cycle" | ||
list_table_class_view = tables.ExchangeWorkspaceTable | ||
list_table_class_staff_view = tables.ExchangeWorkspaceTable | ||
list_table_class_staff_view = tables.ExchangeWorkspaceStaffTable | ||
workspace_data_model = models.ExchangeWorkspace | ||
workspace_data_form_class = forms.ExchangeWorkspaceForm | ||
workspace_form_class = WorkspaceForm | ||
workspace_detail_template_name = "gregor_anvil/exchangeworkspace_detail.html" | ||
workspace_list_template_name = "gregor_anvil/exchangeworkspace_list.html" |
Oops, something went wrong.