Skip to content
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

Remove NotImplementedError to allow for uploading Zarr assets to embargoed Dandisets #1540

Merged
merged 6 commits into from
Nov 27, 2024

Conversation

kabilar
Copy link
Member

@kabilar kabilar commented Nov 25, 2024

  • Successfully upload a Zarr archive to DANDI staging server. See the embargoed Dandiset 215792.
  • Add unittest(s)

cc @jjnesbitt @aaronkanzer @waxlamp

Copy link

codecov bot commented Nov 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.55%. Comparing base (ff49fd1) to head (2a1c5ed).
Report is 17 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1540      +/-   ##
==========================================
+ Coverage   88.44%   88.55%   +0.10%     
==========================================
  Files          78       78              
  Lines       10691    10718      +27     
==========================================
+ Hits         9456     9491      +35     
+ Misses       1235     1227       -8     
Flag Coverage Δ
unittests 88.55% <100.00%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kabilar
Copy link
Member Author

kabilar commented Nov 25, 2024

Hi @jwodder @yarikoptic @jjnesbitt @waxlamp, we should ideally create a new release of dandi-cli with these changes at the same time that dandi/dandi-archive#2069 is pushed to production.

…rgoed and not dataset

I had to duplicate initiation from zarr_dandiset fixture, but seems
overall a small price to pay.  Subsequent commit would refactor to make sweeping
embargoed status on new_dataset easier.
@yarikoptic
Copy link
Member

We need a test! Pushing with a generic setup to sweep over embargoed or not case easily, and marking few tests with that.

dandi/tests/test_upload.py Outdated Show resolved Hide resolved
@yarikoptic yarikoptic added patch Increment the patch version when merged release Create a release when this pr is merged labels Nov 27, 2024
Co-authored-by: John T. Wodder II <[email protected]>
@@ -250,7 +251,11 @@ def test_upload_bids_non_nwb_file(bids_dandiset: SampleDandiset) -> None:
assert [asset.path for asset in bids_dandiset.dandiset.get_assets()] == ["README"]


def test_upload_sync_zarr(mocker, zarr_dandiset):
@sweep_embargo
def test_upload_sync_zarr(mocker: MockerFixture, zarr_dandiset: SampleDandiset, embargo: bool) -> None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The linter is complaining that this line is too long. You don't seem to have pre-commit set up in your local clone.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do have precommit -- I just accepted your suggestion online and that caused it -- we do not have pre-commit on CI to fix things up. I have pushed fixed up rewrite I did locally. Should be all good now.

@yarikoptic
Copy link
Member

@kabilar have a final look on how now we can decorate tests to test against embargoed and not for future references. I will merge (it will release, labels added) after all green.

@kabilar
Copy link
Member Author

kabilar commented Nov 27, 2024

@kabilar have a final look on how now we can decorate tests to test against embargoed and not for future references. I will merge (it will release, labels added) after all green.

Thank you, @yarikoptic. That sounds good. It looks like one workflow is failing as described in #1541.

@yarikoptic
Copy link
Member

Let's proceed. I will add more info on that issue

@yarikoptic yarikoptic closed this Nov 27, 2024
@yarikoptic yarikoptic reopened this Nov 27, 2024
@yarikoptic yarikoptic merged commit 2210320 into dandi:master Nov 27, 2024
23 of 25 checks passed
Copy link

🚀 PR was released in 0.65.1 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged release Create a release when this pr is merged released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants