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

fix: allow migration for versions greater than 0.3.2 #40

Merged
merged 2 commits into from
Jun 17, 2021

Conversation

satra
Copy link
Member

@satra satra commented Jun 17, 2021

Allow migrating from versions greater 0.3.1

@codecov
Copy link

codecov bot commented Jun 17, 2021

Codecov Report

Merging #40 (3b97841) into master (c8c0888) will decrease coverage by 0.09%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #40      +/-   ##
==========================================
- Coverage   95.79%   95.70%   -0.10%     
==========================================
  Files          11       11              
  Lines         975      977       +2     
==========================================
+ Hits          934      935       +1     
- Misses         41       42       +1     
Flag Coverage Δ
unittests 95.70% <75.00%> (-0.10%) ⬇️

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

Impacted Files Coverage Δ
dandischema/metadata.py 96.55% <66.66%> (-0.55%) ⬇️
dandischema/consts.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8c0888...3b97841. Read the comment docs.

@satra satra added patch Increment the patch version when merged release Create a release when this pr is merged labels Jun 17, 2021
Copy link
Contributor

@dchiquito dchiquito left a comment

Choose a reason for hiding this comment

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

It seems like we'd only like to run most of that block of code when migrating from < 0.3.2. What about adding this instead:

elif version2tuple(schema_version) < version2tuple(DANDI_SCHEMA_VERSION):
    obj["schemaVersion"] = to_version

@satra satra merged commit 9e9b6c5 into master Jun 17, 2021
@satra satra deleted the fix/migrate-newer branch June 17, 2021 20:49
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants