Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into issue-514
Browse files Browse the repository at this point in the history
  • Loading branch information
d.a.bunin committed Feb 16, 2022
2 parents d7f0b6d + faafc15 commit 1402863
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 27 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Installation instruction ([#526](https://github.com/tinkoff-ai/etna/pull/526))
-
-
-
- Update CONTRIBUTING.md ([#536](https://github.com/tinkoff-ai/etna/pull/536))

### Fixed
- Fix `TSDataset._update_regressors` logic removing the regressors ([#489](https://github.com/tinkoff-ai/etna/pull/489))
Expand Down
74 changes: 48 additions & 26 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,81 @@ Every good PR usually consists of:
- feature implementation :)
- documentation to describe this feature to other people
- tests to ensure everything is implemented correctly


## Step-by-step guide

### Before the PR (NEED LINKS)
### Before the PR
Please ensure that you have read the following docs:
- [documentation and FAQ]()
- [minimal examples section]()
- [changelog](https://github.com/tinkoff-ai/etna/blob/master/CHANGELOG.md)
- [documentation](https://etna-docs.netlify.app/)
- [tutorials](https://github.com/tinkoff-ai/etna/tree/master/examples)

### Setting up your development environment

Before writing any code it is useful to set up a development environment.
1. Clone etna library to some folder and go inside:
```bash
git clone https://github.com/tinkoff-ai/etna.git etna/
cd etna
```
2. Run installation with `poetry` ([poetry installation guide](https://python-poetry.org/docs/#installation)):
```bash
poetry install -E all-dev
```
3. Activate virtual environment created by poetry:
```bash
poetry shell
```

To connect virtual environment interpreter to IDE use `which python` command.

### New feature

1. Make an issue with your feature description;
2. We shall discuss the design and its implementation details;
3. Once we agree that the plan looks good, go ahead and implement it.


### Bugfix

1. Goto [GitHub issues](https://github.com/tinkoff-ai/etna/issues);
2. Pick an issue and comment on the task that you want to work on this feature;
3. If you need more context on a specific issue, please ask, and we will discuss the details.

You can also join our [ETNA Support telegram chat](https://t.me/etna_support) to make it easier to discuss.
You can also join our [ETNA Community telegram chat](https://t.me/etna_support) 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:
- http://stackoverflow.com/questions/14680711/how-to-do-a-github-pull-request
- https://help.github.com/articles/creating-a-pull-request/
- [Creating a pull request](https://help.github.com/articles/creating-a-pull-request/);
- [Creating a pull request from a fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).

### Tests

Do not forget to check that your code passes the unit tests.
```bash
poetry install -E tests

pytest tests -v
pytest etna -v --doctest-modules
```

ETNA uses the [`black`](https://github.com/psf/black) and [`flake8`](https://github.com/pycqa/flake8) with several plugins
for coding style checks as well as [`mypy`](https://github.com/python/mypy) for type checks, and you must ensure that your code follows it.
```bash
poetry install -E style

make format
```

If any of checks fails, the CI will fail and your Pull Request won't be merged.

### Documentation

etna uses [Numpydoc style](https://numpydoc.readthedocs.io/en/latest/format.html) for formatting docstrings.
ETNA uses [Numpydoc style](https://numpydoc.readthedocs.io/en/latest/format.html) for formatting docstrings.
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:
```bash
cp examples/*.ipynb docs/source/tutorials
cd docs
make clean
make html
Expand All @@ -71,20 +110,3 @@ brew install pandoc
#Windows
choco install pandoc
```



### Tests

Do not forget to check that your code passes the unit tests:
```bash
poetry install -E tests

pytest tests/ -v
```
And code style tests:
```bash
poetry install -E style

make format
```

0 comments on commit 1402863

Please sign in to comment.