forked from slackapi/bolt-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
108 additions
and
23 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,77 @@ | ||
# Deploy to test repository | ||
# Getting Started with The Project | ||
|
||
## Python Runtime Management | ||
|
||
We recommend using pyenv for Python runtime management. | ||
|
||
https://github.com/pyenv/pyenv | ||
|
||
If you use macOS, follow the following steps: | ||
|
||
```bash | ||
$ brew update | ||
$ brew install pyenv | ||
``` | ||
|
||
Then, install Python runtimes for this project: | ||
|
||
```bash | ||
$ pyenv install -l | grep -v "-e[conda|stackless|pypy]" | ||
|
||
$ pyenv install 3.8.5 | ||
$ pyenv local 3.8.5 | ||
|
||
$ pyenv versions | ||
system | ||
3.6.10 | ||
3.7.7 | ||
* 3.8.5 (set by /path-to-bolt-python/.python-version) | ||
|
||
$ pyenv rehash | ||
``` | ||
|
||
## Create a Virtual Environment | ||
|
||
``` | ||
$ python -m venv env_3.8.5 | ||
$ source env_3.8.5/bin/activate | ||
``` | ||
# https://packaging.python.org/guides/using-testpypi/ | ||
python -m venv env | ||
source env/bin/activate | ||
pip install --upgrade pip | ||
pip install twine wheel | ||
rm -rf dist/ build/ slack_bolt.egg-info/ && python setup.py sdist bdist_wheel | ||
twine check dist/* | ||
|
||
# Deploy to test repository | ||
twine upload --repository testpypi dist/* | ||
# Test installation | ||
pip install -U --index-url https://test.pypi.org/simple/ slack_bolt | ||
## Run All the Tests | ||
|
||
```bash | ||
$ pip install -U pip | ||
$ python setup.py test # or ./scripts/run_tests.sh | ||
``` | ||
|
||
# Run the Samples | ||
|
||
```bash | ||
# Install all optional dependencies | ||
$ pip install -e ".[adapter]" | ||
|
||
$ cd samples/ | ||
$ export SLACK_SIGNING_SECRET=*** | ||
$ export SLACK_BOT_TOKEN=xoxb-*** | ||
$ python app.py | ||
|
||
# In another terminal | ||
$ ngrok http 3000 --subdomain {your-domain} | ||
``` | ||
|
||
# Deploying to test.pypi.org | ||
|
||
## $HOME/.pypirc | ||
|
||
``` | ||
[testpypi] | ||
username: {your username} | ||
password: {your password} | ||
``` | ||
|
||
## Run the Script | ||
|
||
```bash | ||
$ echo '__version__ = "{the version}"' > slack_bolt/version.py | ||
$ ./scripts/deploy_to_test_pypi_org.sh | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
./scripts/run_tests.sh && \ | ||
pip install -U pip && \ | ||
pip install twine wheel && \ | ||
rm -rf dist/ build/ slack_bolt.egg-info/ && \ | ||
python setup.py sdist bdist_wheel && \ | ||
twine check dist/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
./scripts/run_tests.sh && \ | ||
pip install -U pip && \ | ||
pip install twine wheel && \ | ||
rm -rf dist/ build/ slack_bolt.egg-info/ && \ | ||
python setup.py sdist bdist_wheel && \ | ||
twine check dist/* && \ | ||
twine upload --repository testpypi dist/* |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
pip freeze | grep -v "^-e" | xargs pip uninstall -y |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Don't add async module imports here | ||
from .handler import SlackRequestHandler | ||
from .handler import SlackRequestHandler |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.2.0a6" | ||
__version__ = "0.2.0a7" |