-
Notifications
You must be signed in to change notification settings - Fork 6
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
PXP-11291 - Fix/data import directory notice #105
Conversation
The style in this PR agrees with This formatting comment was generated automatically by a script in uc-cdis/wool. |
datasimulator/main.py
Outdated
if not path_exists: | ||
logger.error("Cannot create file because path does not exist. Did you create a 'test-data' folder?") |
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 think a better solution in terms of UX would be to create the directory automatically instead
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 suggested that as well but @k-burt-uch is of the mind that we should just handle the error a bit more gracefully.
fix(improvement): generalizing error message Co-authored-by: Pauline Ribeyre <4224001+paulineribeyre@users.noreply.github.com>
fix(rename): better function name Co-authored-by: Pauline Ribeyre <4224001+paulineribeyre@users.noreply.github.com>
…' into fix/data_import_directory_notice # Conflicts: # datasimulator/file_handling.py
This PR adds a check that the directory exists, moves the original code into its own function to help with readability, and adds a test to ensure the function tries to open and write files as expected.
Link to JIRA ticket if there is one: https://ctds-planx.atlassian.net/browse/PXP-11291
New Features
data-simulator submission_order --path <path here>
, the code no longer will crash with a misleading message about the .txt file if the path does not existBreaking Changes
Bug Fixes
Improvements
Dependency updates
Deployment changes