Skip to content

Conversation

@hrsubhut
Copy link

@hrsubhut hrsubhut commented Oct 2, 2025

Summary

This pull request addresses Issue #133 by modernizing and improving code readability in the 02_ingest/monthlyupdate module.

Changes Made

Improved Documentation

  • Added comprehensive docstrings to all functions with proper Args, Returns, and Raises sections
  • Converted old-style docstrings to Google-style format
  • Added detailed parameter descriptions and return type information

Python 3.8+ Modernization

  • Converted all .format() string formatting to f-strings for better readability
  • Updated shebang from #!/usr/bin/env python to #!/usr/bin/env python3
  • Replaced os.path operations with modern pathlib.Path where appropriate

Code Simplification

  • Simplified zip extraction by using path parameter instead of changing directories
  • Removed unnecessary os.chdir() operations
  • Streamlined string concatenation using Path operations

Related Issue

Fixes #133

Files Modified

  • 02_ingest/monthlyupdate/ingest_flights.py: Major refactoring with docstrings and f-strings
  • 02_ingest/monthlyupdate/main.py: Added docstrings and modernized string formatting

…odernize ingest_flights.py (Issue GoogleCloudPlatform#133)Improve code readability and modernize ingest_flights.py (Issue GoogleCloudPlatform#133)Refactor ingest_flights.py for clarity and maintainability

- Added comprehensive docstrings to all functions
- Converted all .format() calls to f-strings for better readability
- Simplified zip extraction with Path parameter using pathlib
- Verified code compliance with Python 3.8 standards
- Improved overall code documentation and maintainabilityRefactor ingest_flights.py to improve readability and maintainability. Updated logging statements for consistency and clarity, and replaced os.path with pathlib for better path handling.
…ython 3 and enhance logging

Convert .format() calls to f-strings, add comprehensive docstring to Flask endpoint function, and update shebang to Python 3 for consistency with ingest_flights.py improvements.Updated shebang to use Python 3 and improved logging format.
@google-cla
Copy link

google-cla bot commented Oct 2, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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.

Code readability improvements

1 participant