| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [View Raw Code] [Original HTTPS Page] |
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 pyenvInstall necessary Python runtimes for development/testing. You can rely on GitHub Actions for testing with various major versions.
pyenv install -l | grep -v "-e[conda|stackless|pypy]"
pyenv install 3.9.18 # select the latest patch version
pyenv local 3.9.18
pyenv versions
system
3.6.10
3.7.7
* 3.9.18 (set by /path-to-python-slack-hooks/.python-version)
pyenv rehashThen, you can create a new Virtual Environment this way:
python -m venv env_3.9.18
source env_3.9.18/bin/activateIf you make some changes to this project, please write corresponding unit tests as much as possible. You can easily run all the tests by running the following scripts.
If this is your first time to run tests, although it may take a bit longer, running the following script is the easiest.
./scripts/install_and_run_tests.shTo simply install all the development dependencies for this project.
./scripts/install.shOnce you installed all the required dependencies, you can use the following.
./scripts/run_tests.sh
./scripts/run_tests.sh tests/scenario_test/test_get_hooks.pyTo format this project
./scripts/format.shTo lint this project
./scripts/lint.shThis project uses mypy to check and infers types for your Python code.
./scripts/run_mypy.shTo clean your virtual environment (useful when testing scripts in isolation):
./scripts/uninstall_all.shNote: Several scripts support a --no-install flag to prevent redundant dependency installation when scripts call other scripts internally.
If you want to test the package locally you can.
Build the package locally
Run
scripts/build_pypi_package.shThis will create a .whl file in the ./dist folder
Use the built package
Example /dist/slack_cli_hooks-1.2.3-py2.py3-none-any.whl was created
From anywhere on your machine you can install this package to a project with
pip install <project path>/dist/slack_cli_hooks-1.2.3-py2.py3-none-any.whlTestPyPI is a separate instance of the Python Package Index that allows you to try distribution tools and processes without affecting the real index. This is particularly useful when making changes related to the package configuration itself, for example, modifications to the pyproject.toml file.
You can deploy this project to TestPyPI using GitHub Actions.
To deploy using GitHub Actions:
Alternatively, you can deploy from your local machine with:
./scripts/deploy_to_test_pypi.shDeploying a new version of this library to PyPI is triggered by publishing a GitHub Release. Before creating a new release, ensure that everything on a stable branch has landed, then run the tests.
Deploying a new version of this library to PyPI is triggered by publishing a GitHub Release. Before creating a new release, ensure that everything on the main branch since the last tag is in a releasable state! At a minimum, run the tests.
This project uses Semantic Versioning, expressed through the numbering scheme of PEP-0440.
main is where active development occurs. Long running named feature branches are occasionally created for collaboration on a feature that has a large scope (because everyone cannot push commits to another person's open Pull Request). At some point in the future after a major version increment, there may be maintenance branches for older major versions.
Labels are used to run issues through an organized workflow. Here are the basic definitions:
Triage is the process of taking new issues that aren't yet "seen" and marking them with a basic level of information with labels. An issue should have one of the following labels applied: bug, enhancement, question, needs feedback, docs, tests, or discussion.
Issues are closed when a resolution has been reached. If for any reason a closed issue seems relevant once again, reopening is great and better than creating a duplicate issue.
When in doubt, find the other maintainers and ask.
| Back | FazBrowse Home | New Git URL |