Skip to content

Conversation

@MyDrift-user
Copy link
Member

Type of Change

  • New feature
  • Documentation update
  • Refactoring

Description

Refactor utils into mw_utils package and improve app setup

  • Split the monolithic utils.py into a modular mw_utils package with dedicated modules for environment, config, parameter encoding, authentication, HTTP client, and handler creation.
  • Updated app.py to use the new utilities, added logging configuration, improved CORS setup, and introduced request ID and health check endpoints.
  • Replaced .env.example with a more detailed .env.template.

Improve MOODLE_URL handling and handler creation

  • Introduces _get_env_moodle_url to treat empty or '*' MOODLE_URL as unset, requiring moodle_url query param.
  • Adds docstrings for clarity, refines handler logic to use normalized base URL, and updates handler signature construction to reflect new environment variable handling.

Revise and clarify README documentation

  • Streamlined feature list
  • Updated Docker and manual run instructions
  • Clarified authentication and usage steps
  • Improved configuration documentation.
  • Enhanced environment variable explanations and provided clearer examples for API usage.
  • Added Credits

Testing

  • tested, works

Checklist

  • My code adheres to the coding and style guidelines of the project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no errors/warnings/merge conflicts.

- Split the monolithic utils.py into a modular mw_utils package with dedicated modules for environment, config, parameter encoding, authentication, HTTP client, and handler creation.
- Updated app.py to use the new utilities, added logging configuration, improved CORS setup, and introduced request ID and health check endpoints.
- Replaced .env.example with a more detailed .env.template.
- Introduces _get_env_moodle_url to treat empty or '*' MOODLE_URL as unset, requiring moodle_url query param.
- Adds docstrings for clarity, refines handler logic to use normalized base URL, and updates handler signature construction to reflect new environment variable handling.
- Streamlined feature list
- Updated Docker and manual run instructions
- Clarified authentication and usage steps
- Improved configuration documentation.
- Enhanced environment variable explanations and provided clearer examples for API usage.
- Added Credits
@MyDrift-user MyDrift-user merged commit 103f208 into main Sep 16, 2025
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.

2 participants