-
Notifications
You must be signed in to change notification settings - Fork 36
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 app config flow (incl. dealing with flask env deprecation) #969
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: GustaafL <guus@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Signed-off-by: F.N. Claessen <felix@seita.nl>
Please, I need a description what this PR is doing. That's usually in the PR description. |
Signed-off-by: F.N. Claessen <felix@seita.nl>
We discussed splitting this PR into two:
@GustaafL thanks for editing the PR description. Please also remove any subsections that just contain contents from the PR template, as they only distract. |
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 didn't really review this, but I just noticed these two things:
- See comment in
check_app_env
. - It also looks like on of the checks is failing: https://github.com/FlexMeasures/flexmeasures/actions/runs/7745435994/job/21121419518?pr=969
"development", | ||
"testing", | ||
"staging", | ||
"production", | ||
): |
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.
The following print statement would need to be updated correspondingly, I suppose:
print(
f'Flexmeasures environment needs to be either "documentation", "development", "testing", "staging" or "production". It currently is "{env}".'
)
@nhoening want to take over this PR, seeing as you authored most of our app config logic? |
This issue has as motivation "the issue where the documentation was unable to build". That issue seems fine, looking at https://readthedocs.org/projects/flexmeasures/builds/ So I assume the motivation is now a refactoring for cleaner code. I'll have to review if I can wrap my head around this one of these days. |
Description
Refactor the flow in which the app config is loaded. This solves the issue where the documentation was unable to build by using a separate flow/function for the config loading for documentation, testing and (production, development, staging)
How to test
Execute the tests, try to build the documentation, starting flexmeasures with the environment variables coming from different locations.