Contribution guide

Any contributions you make are greatly appreciated. If you plan to:

  • Fix a bug, please do so without any further discussion;

  • Close one of open issues, please do so if no one has been assigned to it;

  • Contribute new features, utility functions or extensions, please create GitHub Issue and discuss your idea.

Style

We follow Google Python Style Guide for code, Google Python Style Docstrings for documentation and commitizen style for commit messages.

We ran flake-8, mypy, pytest and SonarCloud during CI pipeline to enforce those requirements.

You can run them locally in project folder:

  1. flake-8

    pip install flake8
    flake8 .
    
  2. pytest (additional libraries are used during checks)

    pip install pytest tensorflow libsvm pybrisque scikit-image pandas tqdm
    pytest -x tests/
    
  3. mypy

    python3 -m pip install mypy
    python3 -m mypy piq/ --allow-redefinition
    
  4. pre-commit

python3 -m pip install pre-commit
pre-commit install

Developing PIQ

Contributions are what make the open source community such an amazing place to learn, inspire, and create.

  1. Fork the Project

  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)

  3. Commit your Changes (git commit -m 'Add some AmazingFeature')

  4. Push to the Branch (git push origin feature/AmazingFeature)

  5. Open a Pull Request

  6. Get your PR reviewed, polished and approved

  7. Enjoy making a good open source project even better :wink:

Documentation

PIQ uses reStructuredText file format to write the documentation, Sphinx to build it and readthedocs to host it.

To build the documentation locally:

  1. Install PIQ

  2. Install prerequisites

    cd docs
    pip install -r requirements.txt
    
  3. Generate the documentation HTML files. The generated files will be in docs/build/html.

    make html
    
  4. Preview changes in your web browser.

    open your_piq_folder/docs/build/html/index.html
    

When changing documentation (adding formulas, tables, etc.), provide a rendered version of the result as part of your PR (e.g. add screenshot). Limit line length in docstrings to 80 characters, so that it fits into Jupyter documentation popups.

Get in Touch

Feel free to reach out to one of maintainers if you have any questions.