-
Notifications
You must be signed in to change notification settings - Fork 7
Refactor configuration #213
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
Merged
Merged
Conversation
This file contains hidden or 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
General * User __name__ as logger name everywhere '$participants' command: * Move from extension module to simple cog * Use dynamic role list instead of hard-coded role names * Add channel visibility check bot.py * Simplify and refactor program notifications * Use channel names in config, not IDs * Simplify notification logic
* Config: Require file path explicitly * run-bot: Expect config file path as --config-file or CONFIG_FILE * README: Update * uv: Remove python-dotenv and certifi dependencies * Move config files to repo root * Docker: Expect CONFIG_FILE * Compose: Specify config file and .secrets
Model all configuration as cog-specific pydantic.BaseModels.
Remove certifi, yarl and arrow
764d6f0
to
aa20350
Compare
9fc013d
to
d30f680
Compare
Use plain messages instead of embeds, use ASCII codes instead of unicode emojis
d30f680
to
4c59923
Compare
21c7ce3
to
3ca3b3e
Compare
3ca3b3e
to
df49599
Compare
1aa519e
to
84ff839
Compare
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.
Fixes #139
Fixes #118
Fixes #214
Drop ansible, yarl, arrow, certifi
We don't use any of these packages. Ansible is used during deployment, but it is installed during the GitHub Action execution.
Drop
python-dotenv
The program now expects the environment variables
DISCORD_BOT_TOKEN
andPRETIX_TOKEN
without falling back to.secrets
.compose.yml
now usessecrets
asenv-file
instead of binding the file into the container.Split configuration, use pydantic
Every cog (besides
Ping
) now has its own configuration class. Configuration is modelled usingpydantic.BaseModel
.Refactor
$participants
command cogPing
) instead of multi-file extension.Use channel names instead of IDs in config, simplify registration and program notification code
The configuration is now server-agnostic, and the code contains less indirection.