Skip to content

Latest commit

 

History

History
112 lines (70 loc) · 3.23 KB

CONTRIBUTING.rst

File metadata and controls

112 lines (70 loc) · 3.23 KB

How to contribute

All contributions are greatly appreciated!

How to report issues

Facilitating the work of potential contributors is recommended since it increases the likelihood of your issue being solved quickly. The few extra steps listed below will help clarify problems you might be facing:

  • Include a minimal reproducible example when possible.
  • Describe the expected behavior and what actually happened including a full trace-back in case of exceptions.
  • Make sure to list details about your environment, such as your platform, versions of pytest, pytest-flask and python release.

Also, it's important to check the current open issues for similar reports in order to avoid duplicates.

Setting up your development environment

  • Fork pytest-flask to your GitHub account by clicking the Fork button.

  • Clone the main repository (not your fork) to your local machine.

    $ git clone https://github.com/pytest-dev/pytest-flask
    $ cd pytest-flask
    
  • Add your fork as a remote to push your contributions.Replace {username} with your username.

    $ git remote add fork https://github.com/{username}/pytest-flask
    
  • Using Tox, create a virtual environment and install pytest-flask in editable mode with development dependencies.

    $ tox -e dev
    $ source venv/bin/activate
    
  • Install pre-commit hooks

    $ pre-commit install
    

Start Coding

  • Create a new branch to identify what feature you are working on.

    $ git fetch origin
    $ git checkout -b your-branch-name origin/master
    
  • Make your changes

  • Include tests that cover any code changes you make and run them as described below.

  • Push your changes to your fork. create a pull request describing your changes.

    $ git push --set-upstream fork your-branch-name
    

How to run tests

You can run the test suite for the current environment with

$ pytest

To run the full test suite for all supported python versions

$ tox

Obs. CI will run tox when you submit your pull request, so this is optional.

Checking Test Coverage

To get a complete report of code sections not being touched by the test suite run pytest using coverage.

$ coverage run --concurrency=multiprocessing -m pytest
$ coverage combine
$ coverage html

Open htmlcov/index.html in your browser.

More about coverage here.