-
Notifications
You must be signed in to change notification settings - Fork 33
Vendorize dandi-cli per config in server info #1661
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
base: master
Are you sure you want to change the base?
Conversation
…e` branch This commit should be dropped before the containing PR is merged. This is a temporary measure to test the behavior of `dandischema` with the changes in dandi/dandi-schema#294
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1661 +/- ##
===========================================
- Coverage 88.84% 66.75% -22.10%
===========================================
Files 83 83
Lines 11515 11537 +22
===========================================
- Hits 10230 7701 -2529
- Misses 1285 3836 +2551
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This function binds the DANDI client to a specific DANDI server instance so that subsequence commands executed by the client is executed in the context of the DANDI sever instance
This function should be run before a command is executed so that it can set the context of the execution such as which DANDI sever instance to interact with.
89dc4d5 to
04f7c26
Compare
…`dandi.files.zarr.py` This is a step in delaying import of `schema.models` in `dandi.files.zarr.py`
Replace`DUMMY_DANDI_ETAG` and `DUMMY_DANDI_ZARR_CHECKSUM` in `dandi.misctypes` with caching functions. This change is needed to delay the import of `dandischema.models` in `dandi.misctypes` and in this package in general
3a512f8 to
066e16e
Compare
|
@yarikoptic I have successfully delayed the import of The commands in the following files have the
On the other hand, the commands in the following files lack the
Not all commands in these files need to import In coming up with that decision, we may want to consider changing the interface and/or design of this client. We may want to have a centralized command that configures the client to be associated with a DANDI instance, and use the instance to set the instance config in subsequent command executions. |
This PR brings new features to allow the DANDI client to vendorize itself according to a DANDI sever instance it interacts with. It closes #1660.
TODOs:
[x] Set the instance config in the CLI initialization process[ ] Implement way to save the DANDI server instance choice across different executions of commands[ ] Implement a command to allow user to set server instance choicedandishcema.modelsis not loaded at the start of each command that can take an instance optiondandishcema.modelsin numerous modulesRelease Notes
DUMMY_DANDI_ETAGandDUMMY_DANDI_ZARR_CHECKSUMindandi/misctypes.pyare replaced withget_dummy_dandi_etag()andget_dummy_dandi_zarr_checksumin order to delay the import ofdandischema.models.