Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Latest commit

 

History

History
117 lines (72 loc) · 2.9 KB

CONTRIBUTING.rst

File metadata and controls

117 lines (72 loc) · 2.9 KB

Contributing

Setup

  • Download and install the latest version of git.

  • Configure git with your username and email.

    $ git config --global user.name 'your name'
    $ git config --global user.email 'your email'
    
  • Make sure you have a GitHub account.

  • Fork cytominer-transport to your GitHub account by clicking the Fork button.

  • Clone the main repository locally.

    $ git clone https://github.com/cytomining/cytominer-transport
    $ cd cytominer-transport
    
  • Add your fork as a remote to push your work to. Replace {username} with your username. This names the remote "fork", the default Pallets remote is "origin".

    git remote add fork https://github.com/{username}/flask
    
  • Create a virtualenv.

    .. tabs::
    
       .. group-tab:: Linux/macOS
    
          .. code-block:: text
    
             $ python3 -m venv env
             $ . env/bin/activate
    
       .. group-tab:: Windows
    
          .. code-block:: text
    
             > py -3 -m venv env
             > env\Scripts\activate
    
    
  • Install the development dependencies, then install cytominer-transport in editable mode.

    $ pip install -r requirements/dev.txt && pip install -e .
    
  • Install the pre-commit hooks.

    $ pre-commit install
    

Tests

Run the basic test suite with pytest.

$ pytest

This runs the tests for the current environment, which is usually sufficient. CI will run the full suite when you submit your pull request. You can run the full test suite with tox if you don't want to wait.

$ tox

Code coverage

Generating a report of lines that do not have test coverage can indicate where to start contributing. Run pytest using coverage and generate a report.

$ pip install coverage
$ coverage run -m pytest
$ coverage html

Open htmlcov/index.html in your browser to explore the report.

Read more about coverage.

Documentation

Build the docs in the docs directory using Sphinx.

$ cd docs
$ make html

Open _build/html/index.html in your browser to view the docs.

Read more about Sphinx.