-
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 #551 from UW-GAC/main
Deploy to stage
- Loading branch information
Showing
119 changed files
with
4,020 additions
and
5,133 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
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 |
---|---|---|
|
@@ -19,27 +19,6 @@ concurrency: | |
cancel-in-progress: true | ||
|
||
jobs: | ||
linter: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout Code Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.9 | ||
cache: pip | ||
cache-dependency-path: | | ||
requirements/requirements.txt | ||
requirements/test-requirements.txt | ||
# Run all pre-commit hooks on all the files. | ||
# Getting only staged files can be tricky in case a new PR is opened | ||
# since the action is run on a branch in detached head state | ||
- name: Install and Run Pre-commit | ||
uses: pre-commit/[email protected] | ||
|
||
pytest-mariadb: | ||
runs-on: ubuntu-latest | ||
|
@@ -50,7 +29,7 @@ jobs: | |
# ahead of planned upgrades we can add versions as | ||
# needed | ||
python-version: [3.8] | ||
mariadb-version: ["10.4"] | ||
mariadb-version: ["10.4", "10.5"] | ||
|
||
services: | ||
mysql: | ||
|
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,20 @@ | ||
line-length = 120 | ||
exclude = [ | ||
"**/migrations/**", | ||
"*/static/CACHE/*", | ||
"venv", | ||
"docs", | ||
] | ||
|
||
[lint] | ||
extend-select = [ | ||
"E", | ||
"F", | ||
"W", # pycodestyle warnings | ||
"I", # isort | ||
"DJ", # flake8-django | ||
"E501", # line-too-long | ||
] | ||
|
||
[lint.isort] | ||
known-first-party = ["primed", "config", ] |
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
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 |
---|---|---|
|
@@ -55,27 +55,15 @@ | |
|
||
|
||
# Add accounts to the auth domains. | ||
account_1 = AccountFactory.create( | ||
user__name="Adrienne", verified=True, email="[email protected]" | ||
) | ||
account_2 = AccountFactory.create( | ||
user__name="Ben", verified=True, email="[email protected]" | ||
) | ||
account_3 = AccountFactory.create( | ||
user__name="Matt", verified=True, email="[email protected]" | ||
) | ||
account_4 = AccountFactory.create( | ||
user__name="Stephanie", verified=True, email="[email protected]" | ||
) | ||
account_1 = AccountFactory.create(user__name="Adrienne", verified=True, email="[email protected]") | ||
account_2 = AccountFactory.create(user__name="Ben", verified=True, email="[email protected]") | ||
account_3 = AccountFactory.create(user__name="Matt", verified=True, email="[email protected]") | ||
account_4 = AccountFactory.create(user__name="Stephanie", verified=True, email="[email protected]") | ||
|
||
# Set up collab analysis workspace one | ||
# analyst group | ||
GroupAccountMembershipFactory.create( | ||
account=account_1, group=collaborative_analysis_workspace_1.analyst_group | ||
) | ||
GroupAccountMembershipFactory.create( | ||
account=account_2, group=collaborative_analysis_workspace_1.analyst_group | ||
) | ||
GroupAccountMembershipFactory.create(account=account_1, group=collaborative_analysis_workspace_1.analyst_group) | ||
GroupAccountMembershipFactory.create(account=account_2, group=collaborative_analysis_workspace_1.analyst_group) | ||
# auth domains | ||
GroupAccountMembershipFactory.create( | ||
account=account_1, | ||
|
@@ -84,12 +72,8 @@ | |
|
||
# Set up collab analysis workspace two | ||
# analyst group | ||
GroupAccountMembershipFactory.create( | ||
account=account_3, group=collaborative_analysis_workspace_2.analyst_group | ||
) | ||
GroupAccountMembershipFactory.create( | ||
account=account_4, group=collaborative_analysis_workspace_2.analyst_group | ||
) | ||
GroupAccountMembershipFactory.create(account=account_3, group=collaborative_analysis_workspace_2.analyst_group) | ||
GroupAccountMembershipFactory.create(account=account_4, group=collaborative_analysis_workspace_2.analyst_group) | ||
# auth domains | ||
GroupAccountMembershipFactory.create( | ||
account=account_3, | ||
|
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,44 @@ | ||
# Temporary script to create some test data. | ||
# Run with: python manage.py shell < add_phenotype_inventory_input_example_data.py | ||
|
||
from anvil_consortium_manager.tests.factories import ( | ||
ManagedGroupFactory, | ||
WorkspaceGroupSharingFactory, | ||
) | ||
|
||
from primed.cdsa.tests.factories import CDSAWorkspaceFactory | ||
from primed.dbgap.tests.factories import dbGaPWorkspaceFactory | ||
from primed.miscellaneous_workspaces.tests.factories import OpenAccessWorkspaceFactory | ||
from primed.primed_anvil.tests.factories import StudyFactory | ||
|
||
# Create a dbGaP workspace. | ||
fhs = StudyFactory.create(short_name="FHS", full_name="Framingham Heart Study") | ||
workspace_dbgap = dbGaPWorkspaceFactory.create( | ||
dbgap_study_accession__dbgap_phs=7, | ||
dbgap_study_accession__studies=[fhs], | ||
dbgap_version=33, | ||
dbgap_participant_set=12, | ||
dbgap_consent_code=1, | ||
dbgap_consent_abbreviation="HMB", | ||
workspace__name="DBGAP_FHS_v33_p12_HMB", | ||
) | ||
|
||
|
||
# Create a CDSA workspace. | ||
workspace_cdsa = CDSAWorkspaceFactory.create( | ||
study__short_name="MESA", | ||
workspace__name="CDSA_MESA_HMB", | ||
) | ||
|
||
# Create an open access workspace | ||
workspace_open_access = OpenAccessWorkspaceFactory.create( | ||
workspace__name="OPEN_ACCESS_FHS", | ||
) | ||
workspace_open_access.studies.add(fhs) | ||
|
||
|
||
# Share workspaces with PRIMED_ALL | ||
primed_all = ManagedGroupFactory.create(name="PRIMED_ALL") | ||
WorkspaceGroupSharingFactory.create(workspace=workspace_dbgap.workspace, group=primed_all) | ||
WorkspaceGroupSharingFactory.create(workspace=workspace_cdsa.workspace, group=primed_all) | ||
WorkspaceGroupSharingFactory.create(workspace=workspace_open_access.workspace, group=primed_all) |
Oops, something went wrong.