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

Optimize Config objects #954

Closed
michplunkett opened this issue Jul 3, 2023 · 0 comments · Fixed by #956
Closed

Optimize Config objects #954

michplunkett opened this issue Jul 3, 2023 · 0 comments · Fixed by #956
Assignees

Comments

@michplunkett
Copy link
Collaborator

michplunkett commented Jul 3, 2023

What issue are you seeing?

It would be better form to replace our current_app.config calls with their respectiveBaseConfig references.

current_app.config["XYZ"] -> BaseConfig.XYZ

Edit: To do this fully, you'd need to add an additional library, which didn't feel like the smart move. Instead I added inheritance to the Config objects and removed unnecessary functions from them.

@michplunkett michplunkett self-assigned this Jul 3, 2023
@michplunkett michplunkett changed the title Replace current_app.config references with BaseConfig Replace current_app.config references with BaseConfig objects Jul 3, 2023
@michplunkett michplunkett linked a pull request Jul 3, 2023 that will close this issue
3 tasks
@michplunkett michplunkett linked a pull request Jul 3, 2023 that will close this issue
3 tasks
@michplunkett michplunkett changed the title Replace current_app.config references with BaseConfig objects Optimize Config objects Jul 6, 2023
michplunkett added a commit that referenced this issue Jul 7, 2023
## Fixes issue
 #954

## Description of Changes
Added inheritance to the `Config` objects, removed unnecessary functions
from the `Config` classes, and removed the custom constants and replaced
them with `HTTPMethod` constants.

## Tests and linting
 - [x] This branch is up-to-date with the `develop` branch.
 - [x] `pytest` passes on my local development environment.
 - [x] `pre-commit` passes on my local development environment.
sea-kelp pushed a commit to OrcaCollective/OpenOversight that referenced this issue Sep 6, 2023
 lucyparsons#954

Added inheritance to the `Config` objects, removed unnecessary functions
from the `Config` classes, and removed the custom constants and replaced
them with `HTTPMethod` constants.

 - [x] This branch is up-to-date with the `develop` branch.
 - [x] `pytest` passes on my local development environment.
 - [x] `pre-commit` passes on my local development environment.
sea-kelp pushed a commit to OrcaCollective/OpenOversight that referenced this issue Sep 25, 2023
 lucyparsons#954

Added inheritance to the `Config` objects, removed unnecessary functions
from the `Config` classes, and removed the custom constants and replaced
them with `HTTPMethod` constants.

 - [x] This branch is up-to-date with the `develop` branch.
 - [x] `pytest` passes on my local development environment.
 - [x] `pre-commit` passes on my local development environment.
sea-kelp pushed a commit to OrcaCollective/OpenOversight that referenced this issue Oct 5, 2023
 lucyparsons#954

Added inheritance to the `Config` objects, removed unnecessary functions
from the `Config` classes, and removed the custom constants and replaced
them with `HTTPMethod` constants.

 - [x] This branch is up-to-date with the `develop` branch.
 - [x] `pytest` passes on my local development environment.
 - [x] `pre-commit` passes on my local development environment.
AetherUnbound pushed a commit to OrcaCollective/OpenOversight that referenced this issue Oct 9, 2023
 lucyparsons#954

Added inheritance to the `Config` objects, removed unnecessary functions
from the `Config` classes, and removed the custom constants and replaced
them with `HTTPMethod` constants.

 - [x] This branch is up-to-date with the `develop` branch.
 - [x] `pytest` passes on my local development environment.
 - [x] `pre-commit` passes on my local development environment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant