Contributing is quite easy: suggest ideas and make them done. We use GitHub issues for bug reports and feature requests.
Every good PR usually consists of:
- feature implementation :)
- documentation to describe this feature to other people
- tests to ensure everything is implemented correctly
Please ensure that you have read the following docs:
Before writing any code it is useful to set up a development environment.
- Clone etna library to some folder and go inside:
git clone https://github.com/tinkoff-ai/etna.git etna/
cd etna
- Run installation with
poetry
(poetry installation guide):
poetry install -E all-dev
- Activate virtual environment created by poetry:
poetry shell
To connect virtual environment interpreter to IDE use which python
command.
- Make an issue with your feature description;
- We shall discuss the design and its implementation details;
- Once we agree that the plan looks good, go ahead and implement it.
- Goto GitHub issues;
- Pick an issue and comment on the task that you want to work on this feature;
- If you need more context on a specific issue, please ask, and we will discuss the details.
You can also join our ETNA Community telegram chat to make it easier to discuss. Once you finish implementing a feature or bugfix, please send a Pull Request.
If you are not familiar with creating a Pull Request, here are some guides:
Do not forget to check that your code passes the unit tests.
poetry install -E tests
pytest tests -v
pytest etna -v --doctest-modules
ETNA uses the black
and flake8
with several plugins
for coding style checks as well as mypy
for type checks, and you must ensure that your code follows it.
poetry install -E style
make format
If any of checks fails, the CI will fail and your Pull Request won't be merged.
ETNA uses Numpydoc style for formatting docstrings. The documentation is written in ReST. Length of a line inside docstrings block must be limited to 100 characters to fit into Jupyter documentation popups.
You could check the docs with:
cp examples/*.ipynb docs/source/tutorials
cd docs
make clean
make html
Now you could open them into your browser, for example with
open ./build/html/index.html
If you have some issues with building docs - please make sure that you installed the required packages.
poetry install -E docs
You also may need to install pandoc package (pandoc installation guide):
# Ubuntu
apt-get update && apt-get install -y pandoc
# Mac OS
brew install pandoc
#Windows
choco install pandoc
During creation of Pull Request make sure that your documentation looks good, check:
Parameters
andReturns
sections have correct names and types;- Sections should be
- divided correctly without artefacts,
- consistent by meaning with Numpydoc Style Guide;
- Lists are rendered correctly;
- Listings of code, e.g. variable names, are typed with monospaced font;
- Mathematical formulas are rendered correctly;
- Links to external sources are active;
- References to python objects should be active if library is listed in
intersphinx_mapping
Useful links: