-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/dbgap options #702
Feat/dbgap options #702
Conversation
Pull Request Test Coverage Report for Build 7944
💛 - Coveralls |
The style in this PR agrees with This formatting comment was generated automatically by a script in uc-cdis/wool. |
@@ -370,12 +370,26 @@ dbGaP: | |||
proxy_user: '' | |||
protocol: 'sftp' | |||
decrypt_key: '' | |||
# parse out the consent from the dbgap accession number such that something | |||
# like "phs000123.v1.p1.c2" becomes "phs000123.c2". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does .v1.p1
mean? :D
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
] | ||
|
||
assert "phs000179" in resource_to_parent_paths | ||
assert resource_to_parent_paths["phs000179"] == ["/orgA/programs/"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
phs000179 is not in study_to_resource_namespaces
so where does the mapping come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gets put in the _default namespace
…s no overarching common exchange area, just parent study common exchange areas
…ecate existing handling giving access to phsid
# Will NOT MATCH forms like: phs000123 | ||
# | ||
# WARNING: Do not change this without consulting the code that uses it | ||
DBGAP_ACCESSION_WITH_CONSENT_REGEX: '(?P<phsid>phs[0-9]+)(.(?P<version>v[0-9]+)){0,1}(.(?P<participant_set>p[0-9]+)){0,1}.(?P<consent>c[0-9]+)' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you choose to make this configurable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in case dbgap projects we receive change format, we don't have to edit code. there are possibilities where the first 3 chars are not phs
. I'd rather be able to change it in configuration in the future than edit code 🤷♂️ idk, I could be convinced otherwise, but since this is an external format we are expected, figured it'd feel more at home in configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but instead of editing code in 1 place, we would have to edit the default config + edit the value in the config of all the Commons that use it 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not necessarily, just edit the default and don't supply it in the configurations in the commons so they use the default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and then if a specific commons expects something different they can override it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
like if for some commons we need phs123
but others we start getting phg123
, better to have that in config. I see your point though, it's not of immediate use now, I just feel like this is something that should be configurable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true!! assuming we remember to leave it out of the commons' configs 😅
fence/sync/sync_users.py
Outdated
# go through existing access and find any c999's and make sure to give access to | ||
# all accessions with consent for that phsid | ||
for username, user_project_info in copy.deepcopy(user_projects).items(): | ||
for project, permissions in copy.deepcopy(user_project_info).items(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
permissions
is not used - either use for project in copy.deepcopy(user_project_info)
here, or use permissions
instead of read-storage
later
tests/dbgap_sync/test_user_sync.py
Outdated
assert "phs000178.c999" in resource_to_parent_paths | ||
assert resource_to_parent_paths["phs000178.c999"] == ["/orgA/programs/"] | ||
|
||
assert "test_common_exchange_area" in resource_to_parent_paths | ||
assert resource_to_parent_paths["test_common_exchange_area"] == [ | ||
"/dbgap/programs/" | ||
] | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you forget to paste this somewhere? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, this logic was confusing, this is already checked below, no need to do it twice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✨ c999 ✨
New Features
c999
consent group nowc999
consent group" featureBreaking Changes
c999
is no longer converted to justphsid
when parsing consent codes (which causes issues when switching the configuration on/off in terms of data access). Now, when consent code parsing is on, usersync handlesc999
by providing access to all consents explicitly (including itself,.c999
, to represent the study-specific exchange area)Bug Fixes
Improvements
Dependency updates
Deployment changes
c999
the same as before. If using dbgap sync w/ consent code parsing and indexd records have acls with justphsid
to represent objects someone w/c999
should be able to see, you will need to ensure that the records also have the phsid.consent_code as well or users will lose access