-
Notifications
You must be signed in to change notification settings - Fork 84
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
Generate yaml config for sydent #388
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuration handling will be slowly moved over to this SydentConfig class and away from the rest of the code.
The SydentEd25519 class is no longer needed as all it did was handle the signingkey config option before (which is now done in CryptoConfig) In the current setup, if no key is present a new one is generated and saved back to file. This is a special case for the crypto config and so the line `return self.crypto.save_key` isn't more general. In the future this might not be needed (e.g. by having sydent only do key generation when it first creates a config file for you, rather than everytime one is not found) and so this special casing can be removed.
test_jinja_templates used `("email", "email.verification_template")` for this argument, however this config option isn't mentioned anywhere else in the code (or even in the test's config) so it's ok to remove it
- Move config file and dict handling over to SydentConfig - Alter all places where Sydent object is constructed - Remove parse_cfg_bool and set_from_comma_set_string from sydent.py as these functions were only used for config parsing - Remove save_config from sydent.py as this can now be done from SydentConfig
migrating_config.yaml has each YAML option set to the old-style config option that it replaces.
Azrenbeth
force-pushed
the
azren/generate_yaml_config
branch
from
September 9, 2021 14:30
74fac53
to
30ac8d2
Compare
Gone down another route |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Depends on #385
Add a script to generate a YAML configuration file for Sydent.
(NOTE: this is currently not read anywhere, this will be added later)
Advantages of YAML
Why I did it like this:
Sydent to function.
Things to note
instead create a default brand template folder at the same time as migrating to YAML
Things I was unsure about
with
{arg}
and some with%(arg)s
formatting. Should we only use one type or is this OK?