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

Reworked Config #33

Merged
merged 9 commits into from
Mar 19, 2024
Merged

Reworked Config #33

merged 9 commits into from
Mar 19, 2024

Conversation

jontyms
Copy link
Member

@jontyms jontyms commented Mar 18, 2024

Switched config to a type validated pydantic setting class Introduces breaking changes to config file
add support for bitwarden secrets manager

fixed #4
supersedes #32

TODO

  • Add constr to strings to enforce length and format
  • make bitwarden optional
  • add dev mode to make config optional

index.py Show resolved Hide resolved
routes/admin.py Outdated Show resolved Hide resolved
routes/api.py Outdated Show resolved Hide resolved
util/forms.py Outdated Show resolved Hide resolved
util/options.py Outdated Show resolved Hide resolved
@Helithumper
Copy link
Contributor

I can help either this week or weekend with anything in here if you need it.

jontyms added 4 commits March 18, 2024 14:02
Switched config to a type validated pydantic setting class
Introduces breaking changes to config file
add support for bitwarden secrets manager
Fixed Forms to return proper execptions
@jontyms jontyms marked this pull request as ready for review March 18, 2024 18:41
util/options.py Outdated

return options.get(arg, None)
# Reads config from ../config/options.yml
here = os.path.abspath(os.path.dirname(__file__))
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of doing this raw in the python file, it's probably best to make Settings() into a different class and add this to the constructor with "options.yml" as the default value.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am going to be honest I have no idea how that function works, chatgpt wrote it

util/options.py Outdated Show resolved Hide resolved
util/options.py Outdated Show resolved Hide resolved
util/options.py Outdated Show resolved Hide resolved
@jontyms jontyms merged commit a159728 into HackUCF:main Mar 19, 2024
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.

Options uses arbitrary YAML to pull in Configuration
2 participants