-
Notifications
You must be signed in to change notification settings - Fork 47
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
Support empty data repositories #153
Conversation
updater/schema.py
Outdated
metaFilePath = os.path.join(dataDirectory, "meta.tsv") | ||
|
||
# If the data repository is empty, no schema compatibility check is necessary | ||
if not os.path.exists(metaFilePath): |
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.
Minor nit, you don't check the emptiness of the data repository. You just check if the meta.tsv
is not there yet. I think you should either adjust the comment or change the code 😉
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’d rather adjust the code, because it wouldn’t make sense to check the data repository in this case. I agree that the comment could have been more concise. I’ll adjust this.
aaad876
to
7312292
Compare
By accident, newly created data repositories didn’t work with the updater. The reason is that the updater checked the data schema version but failed, because no meta.tsv file (which contains the data schema version) was present. This adds a check that, if the meta.tsv file is not yet present, simply succeeds with the update, through which the data repository is populated with an up-to-date schema anyway.
7312292
to
4d5a807
Compare
@larsxschneider: I addressed your suggestion, please review again 🙂. |
By accident, newly created data repositories didn’t work with the updater. The reason is that the updater checked the data schema version but failed, because no
meta.tsv
file (which contains the data schema version) was present.This adds a check that, if the
meta.tsv
file is not yet present, simply succeeds with the update, through which the data repository is populated with an up-to-date schema anyway.In contrast to #146, this allows users to get started with an empty repository instead of having to create a
meta.tsv
manually and reading through some more documentation.Closes #145.