-
-
Notifications
You must be signed in to change notification settings - Fork 666
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
Scaffold server config via a bootstrapping script #2408
Scaffold server config via a bootstrapping script #2408
Conversation
This also adds a default env file to look for
These will mostly be fetched from the .env.default file, which won't be bootstrapped
According to Pydantic's docs: "Later files in the list/tuple will take priority over earlier files."
The purpose is to adhere to what we have in prod
It's been handled in 4b4b65b |
Dismissed because the approval was invalidated by another commit
|
||
contributors = 295488872404484098 |
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.
there should be a comment before these. Right now at first glance it looks as if they're self assignable
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.
Looks good to me, tested locally and all looks good.
# Conflicts: # poetry.lock # pyproject.toml
This is being merged now, handling any issues. |
TL;DR
Removes the the needed manual work to fill the
config.yaml
file with all the channel/role/category values of the test serverPain point
Configuring the bot is a very painful procedure due to how overwhelming & big the configuration file is. This makes contribution to people who aren't familiar with our project very discouraging, and people would often find themselves too lazy to configure it, confused in terms of what to configure and what not, or unable to configure since the contribution guide needs to be read thouroughly, etc.
Idea
The idea is to have a script that would magically build the necessary configuration with a click of a button/a single command.
Since the bot doesn't need all the channels, roles, categories, icons, emojis, etc. to be configured, the script would only prepare the necessary server related variables
This is simply achievable by following these steps
Configuring the script
This is as simple as
.env
file created in the root directory of your project (if not, please add it)BOT_TOKEN
variable with a value likewise:BOT_TOKEN=your-bot-token
GUILD_ID
variable with a value likewise:GUILD_ID=your-discord-server-id
Running the script
Once
BOT_TOKEN
andGUILD_ID
are configured, it should be as simple as runningpython bootstrap_config.py
The script will
Categories
,Channels
andCategories
.env.server
environment variables fileChangelog
.yaml
files for configuration with.env
filesPydantic
for parsing values from the environment variables AND the environment filesTodo: