Here's how to set up exec-wrappers for local development:
- Fork the exec-wrappers repo on GitHub.
- Clone your fork locally and install flake8 pre-commit hook
git clone https://github.com/your_name_here/exec-wrappers.git
cd exec-wrappers
flake8 --install-hook=git
git config --local flake8.strict true
- Create a new virtualenv environment for developing
virtualenv -p python2.7 venv
source venv/bin/activate # If using bash, otherwise use the appropriate activate script
pip install -r requirements.txt
- Create a branch for local development
git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
- After each change make sure the tests still pass
pytest tests
- Commit your changes and push your branch to GitHub
black .
git add .
git commit -m "Your detailed description of your changes."
git push origin name-of-your-bugfix-or-feature
- Submit a pull request through the GitHub website.
To run a specific test:
pytest tests -k test_name
Sometimes is very useful to see a coverage report to check if you are forgetting to test something. To generate an html report:
pytest --cov exec_wrappers --cov-config .coveragerc --cov-report html tests