-
Notifications
You must be signed in to change notification settings - Fork 28
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
Models: define id, add various additional types (genotype, etc), boost model version to 0.3.0 #560
Conversation
* upstream/master: (22 commits) Strip trailing slash from API URL used by delete() Refresh dandiset.yaml on download if out of date Support "…/assets/?path=<path>" URLs Get hdmf, pynwb, h5py versions without importing Update CHANGELOG.md [skip ci] DOC: minor tune up to readme just to cut a release adding for Unknown in extract_sex Put package versions on one line and use get_module_version() Log dandi, hdmf, h5py, and pynwb versions to log file Log errors in extracting metadata for upload BF: proper import of importlib_metadata backport BF: remove unused pkg_resources import and correct docstring BF+ENH: fixup typing and use importlib ENH: use get_module_version for cache tokens ENH: get_module_version helper Update CHANGELOG.md [skip ci] BF: please linters ENH: make it work with current and perspective version of dandi-api Update dandiarchive client to use most_recent_published_version Give `ls` a `--metadata` option ...
Codecov Report
@@ Coverage Diff @@
## master #560 +/- ##
==========================================
+ Coverage 83.70% 83.78% +0.07%
==========================================
Files 62 62
Lines 6530 6567 +37
==========================================
+ Hits 5466 5502 +36
- Misses 1064 1065 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
* upstream/master: Update CHANGELOG.md [skip ci] BF: do not assume that service record of redirector is present/has url Fix a typo in the display string for one of the known URL patterns Error with a decent message when trying to delete() a path not in a Dandiset Fix & test for downloading by asset ID URL
* upstream/master: Add further tests of get_instance() and server-info
@yarikoptic - i would love to get this merged if there are no objections at this point. this would then trigger a schema update for api and web-ui which should help as well. nothing should technically be different at this point with |
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.
I am still a bit unsure about disappearance of identifier
from test records. Left various questions/recommendations throughout.
if "version" in newmeta: | ||
newmeta["id"] = f"{newmeta['identifier']}/{newmeta['version']}" | ||
else: | ||
newmeta["id"] = f"{newmeta['identifier']}/draft" |
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.
identifier
is made optional in Identifiable
(and was/is optional for others such as RelatedParticipant
) in this PR, so I guess it could fail or get a bogus None
here? may be no id
should be assigned if not identifier
?
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.
this is a converter and this function will go away as soon as we migrate.
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.
that is good, still don't see why it should be "not robust by design" meanwhile, but ok. I will assign you an issue if I run into one ;-)
@@ -1,5 +1,5 @@ | |||
{ | |||
"identifier": "0b0a1a0b-e3ea-4cf6-be94-e02c830d54be", | |||
"id": "dandiasset:0b0a1a0b-e3ea-4cf6-be94-e02c830d54be", |
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.
hm, I thought that with the recent changes we still retain identifier
and only provide id
at the level of dandi-api
queries (and may be only for json-ld serialization), thus minting it in addition/based on the identifier
. but even if "not only for json-ld" -- shouldn't original identifier
also appear here?
again - one of my arguments was/is - with just an id
users would need to "manually" split it inside of just using the value as asset_id
for the API queries. So by catering to the LD we are further sacrificing ease of use of this metadata for "more pragmatic" interactions ;-)
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.
i don't think this affects anything in the CLI now, because this is about conversion and the CLI explicitly ignores identifier.
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.
rright -- I think we are relying on API to provide us asset_id
s in its listing of assets for a path, so indeed should not get broken. But my comment was not about breakage but rather about changing metadata so there is no 1-to-1 immediate correspondence between those records and API (asset_id
).
Co-authored-by: Yaroslav Halchenko <[email protected]>
anyways -- I do not want to hold the progress here, since I might still be just missing on some aspects of identifier-vs-id situation. Time will show. Let's proceed and brace for an impact -- I will also release fresh dandi-cli with this as we just merged another PR which might be good to have for future proofing. |
- [ ] still decide on participant.