This repository was archived by the owner on Aug 15, 2022. It is now read-only.
Specify location and name of config file #11
Merged
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.
Motivation/User Story
As a DevOps engineer for a Slack bot integration hosting service, I want to be able to specify the config file path so that the configuration of a running instance of python-rtmbot is decoupled from the location of the source code.
This will allow us to run multiple instances of python-rtmbot from the same code base, but with a different configuration (e.g., a different Slack token) for each. Then we can take all the time we save by deploying/maintaining just one copy of the code and have a bubble party.
What it does
This PR allows a user to specify the location and name of a config file with an optional command-line argument. The current behavior is still available, which is to say, if the argument is not provided, the
rtmbot.conffile in the project root is used.Usage
Use the
-cor--configcommand line option followed by the full path (including file name) of the desired config file: