Skip to content

Latest commit

 

History

History
141 lines (93 loc) · 8.01 KB

CONTRIBUTING.md

File metadata and controls

141 lines (93 loc) · 8.01 KB

Welcome to the contributing guidelines of Ensemble-Pytorch!

Ensemble-Pytorch is a community-driven project and your contributions are highly welcome. Feel free to raise an issue if you have any problem. Below is the table of contents in this contributing guidelines.

Where to contribute

Areas of contribution

We value all kinds of contributions - not just code. The following table gives an overview of key contribution areas.

Area Description
algorithm collect and report novel algorithms relevant to torchensemble, mainly from top-tier conferences and journals
code implement algorithms, improve or add functionality, fix bugs
documentation improve or add docstrings, user guide, introduction, and experiments
testing report bugs, improve or add unit tests, improve the coverage of unit tests
maintenance improve the development pipeline (continuous integration, Github bots), manage and view issues/pull-requests
api design design interfaces for estimators and other functionality

Roadmap

For a more detailed overview of current and future work, check out our development roadmap.

Acknowledging contributions

We follow the all-contributors specification and recognise various types of contributions. Take a look at our past and current contributors!

If you are a new contributor, please make sure we add you to our list of contributors. All contributions are recorded in .all-contributorsrc.

If we have missed anything, please raise an issue or create a pull request!

Installation

Please visit our installation instructions to resolve any package issues and dependency errors. Feel free to raise an issue if the problem still exists.

Reporting bugs

We use GitHub issues to track all bugs and feature requests; feel free to open an issue if you have found a bug or wish to see a feature implemented.

It is recommended to check that your issue complies with the following rules before submitting:

  • Verify that your issue is not being currently addressed by other issues or pull requests.
  • Please ensure all code snippets and error messages are formatted in appropriate code blocks. See Creating and highlighting code blocks.
  • Please be specific about what estimators and/or functions are involved and the shape of the data, as appropriate; please include a reproducible code snippet. If an exception is raised, please provide the traceback.

Continuous integration

We use continuous integration services on GitHub to automatically check if new pull requests do not break anything and meet code quality standards. Please visit our config files on continuous integration.

Unit testing

We use pytest for unit testing. To check if your code passes all tests locally, you need to install the development version of torchensemble and all extra dependencies.

  1. Install all extra requirements from the root directory of torchensemble:

    pip install -r build_tools/requirements.txt
  2. Install the development version of torchensemble:

    pip install -e .
  3. To run all unit tests, run the following commend from the root directory:

    pytest ./

Test coverage

We use coverage via the pytest-cov plugin and codecov to measure and compare test coverage of our code.

Coding style

We follow the PEP8 coding guidelines. A good example can be found here.

We use the pre-commit workflow together with black and flake8 to automatically apply consistent formatting and check whether your contribution complies with the PEP8 style. Besides, if you are using GitHub desktop on Windows, the following code snippet allows you to format and check the coding style manually.

black --skip-string-normalization --config pyproject.toml ./
flake8 --filename=*.py torchensemble/

API design

The general API design we use in torchensemble is similar to scikit-learn and skorch.

For docstrings, we use the numpy docstring standard.

Documentation

We use sphinx and readthedocs to build and deploy our online documentation. You can find our online documentation here.

The source files used to generate the online documentation can be found in docs/. For example, the main configuration file for sphinx is conf.py and the main page is index.rst. To add new pages, you need to add a new .rst file and include it in the index.rst file.

To build the documentation locally, you need to install a few extra dependencies listed in docs/requirements.txt.

  1. Install extra requirements from the root directory, run:

    pip install -r docs/requirements.txt
  2. To build the website locally, run:

    cd docs
    make html

You can find the generated files in the Ensemble-Pytorch/docs/_build/ folder. To view the website, open Ensemble-Pytorch/docs/_build/html/index.html with your preferred web browser.

Acknowledgement

This CONTRIBUTING file is adapted from the PyTorch and Sktime.