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

Refactor and Enhance Data Processing and Metadata Modules #7

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

druvus
Copy link
Contributor

@druvus druvus commented Oct 9, 2023

Description

This PR introduces several key improvements to the metaquest project, focusing on the data_processing.py and metadata.py modules. The main goals are to improve code readability, add type annotations, enhance logging, and add a retry mechanism for failed metadata downloads.

Key Changes

  1. Improved Logging: All functions now use the logging library to provide informative log messages.
  2. Type Annotations: Functions now include type hints for better readability and future type checking.
  3. Retry Mechanism: The download_metadata function now retries failed downloads up to three times with exponential backoff.
  4. Wrapper Functions: Added wrapper functions for argparse to call, allowing for pre- and post-call logic.
  5. Command-Line Arguments: Functions now take individual arguments instead of the argparse.Namespace object for better reusability.
  6. Code Documentation: Added docstrings to functions for better understanding of their functionalities.

Files Modified

  • metaquest/data_processing.py
  • metaquest/metadata.py
  • metaquest/metaquest.py

@druvus druvus merged commit 3710595 into main Oct 9, 2023
2 checks passed
@druvus druvus deleted the improve-231009-1 branch October 9, 2023 16:39
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.

1 participant