This document describes tools, tasks and workflow that one needs to be familiar with in order to effectively maintain this project. If you use this package within your own software as is but don't plan on modifying it, this guide is not for you.
We recommend using pyenv for Python runtime management. If you use macOS, follow the following steps:
brew update
brew install pyenv
Install necessary Python runtimes for development/testing. You can rely on Travis CI builds for testing with various major versions. https://github.com/slackapi/bolt-python/blob/main/.travis.yml
pyenv install -l | grep -v "-e[conda|stackless|pypy]"
pyenv install 3.10.7 # select the latest patch version
pyenv local 3.10.7
pyenv versions
system
3.7.13
* 3.10.7 (set by /path-to-bolt-python/.python-version)
pyenv rehash
Then, you can create a new Virtual Environment this way:
python -m venv env_3.10.7
source env_3.10.7/bin/activate
You need a supported version of Node.js (see package.json
field "engines") and npx
(which is distributed with Node.js).
This project contains an .editorconfig
file. It is used by Prettier to lint and format the JSON files
# Run flake8 & prettier from root directory for linting
./scripts/run_lint.sh
# Run black & prettier from root directory for code formatting
./scripts/run_format.sh
If you make some changes to this SDK, please write corresponding unit tests as much as possible. You can easily run all the tests by running the following script.
If this is your first time to run tests, although it may take a bit long time, running the following script is the easiest.
./scripts/install_all_and_run_tests.sh
Once you installed all the required dependencies, you can use the following one.
./scripts/run_tests.sh
NOTE: The main
branch is production!
-
Create a tag for your potential release
- Your tag name will Bump the version number in adherence to Semantic Versioning of the previous tags
- For example
1.2.3
, from your current branch:git tag v1.2.3
git push origin --tags
-
Update the
$ref
fields in your JSON schemas to the files in the tag.-
For each
$ref
field your changes affect update the value with theraw.githubusercontent.com
of the tagged file, example:{ "$ref": "https://raw.githubusercontent.com/slackapi/manifest-schema/v1.2.3/schemas/manifest.schema.1.0.0.json" }
-
Commit with a message including the new version number. For example
1.2.3
& Push the commit to your branch -
git commit -m 'version 1.2.3'
-
git push origin {your-branch}
-
-
Create a PR with
main
- Ensure all tests pass!
- For changes based on feedback
- Delete created tag
git tag -d v1.2.3
git push origin --delete v1.2.3
- Make commit changes to branch
- Repeat from step 1.
- Delete created tag
- Merge in release PR after getting an approval from at least one maintainer.
-
Your changes are now live on https://raw.githubusercontent.com/slackapi/manifest-schema/main/schemas/manifest.schema.json
When in doubt, find the other maintainers and ask.