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

add check for dataset name before uploading #545 #555

Merged
merged 6 commits into from
Jan 19, 2022
Merged

add check for dataset name before uploading #545 #555

merged 6 commits into from
Jan 19, 2022

Conversation

normanrz
Copy link
Member

@normanrz normanrz commented Jan 12, 2022

Description:

  • Checks for dataset availability before uploading
  • Refactors __generate_client.py to work with local webknossos instance

Issues:

Todos:

Make sure to delete unnecessary points or to check all before merging:

  • Updated Changelog

@normanrz normanrz self-assigned this Jan 12, 2022
Copy link
Contributor

@jstriebel jstriebel left a comment

Choose a reason for hiding this comment

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

LGTM, assuming you tested this already 👍 :shipit:

Comment on lines +94 to +101
response = new_dataset_name_is_valid.sync_detailed(
organization_name=context.organization,
data_set_name=new_dataset_name,
client=context.generated_auth_client,
)
assert (
response.status_code == 200
), f"Dataset name {context.organization}/{new_dataset_name} does not seem to be valid: {response}"
Copy link
Contributor

Choose a reason for hiding this comment

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

It seem's weird that it's not necessary to update the snapshots, since the upload is also tested. Probably some bug related to the testing, I'll check it when working on #514

Copy link
Contributor

Choose a reason for hiding this comment

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

Nevermind, the tests are actually failing due to the tests 🙈 I'll commit an update for those

Copy link
Member Author

Choose a reason for hiding this comment

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

@jstriebel ping for cassette update

Copy link
Contributor

Choose a reason for hiding this comment

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

It was a bit more complex, please double-check my changes in commit 93f7398. I removed the cloning of the wk-repo and used a docker-compose file instead, where the databases are not persisted anymore. Also, I added some filters for vcr.py, so that the timestamps in some requests are ignored. More cleanup is coming with #514

@normanrz normanrz merged commit 459284e into master Jan 19, 2022
@normanrz normanrz deleted the fix-545 branch January 19, 2022 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dataset upload should check isValidNewName route first
2 participants