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

Use Flask application factory #614

Merged
merged 15 commits into from
Jul 5, 2024
Merged

Use Flask application factory #614

merged 15 commits into from
Jul 5, 2024

Conversation

Ariana-B
Copy link
Contributor

@Ariana-B Ariana-B commented Jun 28, 2024

Rather than creating the Flask app module-level across _model.py and _pages.py, use the preferred application factory pattern to instantiate.
This highlighted an issue around how the default timezone is determined. Having CUBEDASH_DEFAULT_TIMEZONE be provided via both an environment variable and the app config seems like overkill, and which version is used - as well as the default value - appears to be inconsistent. Timezone configuration would likely be best revisited and properly reworked in another PR, but for now I suggest having it configurable only via the app config.


📚 Documentation preview 📚: https://datacube-explorer--614.org.readthedocs.build/en/614/

@whatnick
Copy link
Member

whatnick commented Jul 1, 2024

Please fix merge conflicts, not sure why the CI has paused.

@Ariana-B Ariana-B requested a review from omad July 2, 2024 04:11
Copy link
Member

@omad omad left a comment

Choose a reason for hiding this comment

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

Looking good, I think one thing to change now, and some more for later (because they're harder, and this is still a big improvement).

cubedash/_model.py Show resolved Hide resolved
cubedash/_monitoring.py Outdated Show resolved Hide resolved
cubedash/summary/_summarise.py Show resolved Hide resolved
@Ariana-B Ariana-B requested a review from omad July 3, 2024 06:24
@omad omad merged commit 0ed0a01 into develop Jul 5, 2024
9 checks passed
@omad omad deleted the use_app_factory branch July 5, 2024 06:43
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.

3 participants