Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
with:
python-version: '3.7'
- run: |
python -m pip install autopep8 black "isort==4.3.21"
python -m pip install autopep8 "black==19.10b0" "isort==4.3.21"
isort -rc .
autopep8 --recursive --in-place --aggressive --aggressive .
black .
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- stage: Lint check
python: "3.7"
before_install: # Nothing to do
install: pip install flake8 black "isort==4.3.21"
install: pip install flake8 "black==19.10b0" "isort==4.3.21"
script:
- flake8 .
- black --check .
Expand Down
42 changes: 25 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,38 @@ If you modify the code, you will most probably also need to code some tests to e
New code should be compatible with Python 3.X versions. Once you finish implementing a feature or bugfix and tests,
please run lint checking and tests:

#### Formatting Code without pre-commit
If you choose not to use pre-commit, you can take advantage of IDE extensions configured to black format or invoke black manually to format files and commit them.
#### Formatting Code

To ensure the codebase complies with a style guide, we use [flake8](https://flake8.pycqa.org/en/latest/),
[black](https://black.readthedocs.io/en/stable/) and [isort](https://pycqa.github.io/isort/) tools to
format and check codebase for compliance with PEP8. To install those tools with pip, please run

```bash
pip install flake8 "black==19.10b0" "isort==4.3.21"
```

##### Formatting without pre-commit

If you choose not to use pre-commit, you can take advantage of IDE extensions configured to black format or invoke
black manually to format files and commit them.

```bash
pip install black
black .
# This should autoformat the files
isort -rc .
black .
# Run lint checking
flake8 ignite/ tests/ examples/
# If everything is OK, then commit
git add .
git commit -m "....."
git commit -m "Added awesome feature"
```

#### with pre-commit

To ensure the codebase complies with a style guide, we use [black](https://black.readthedocs.io/en/stable/) and [flake8](https://flake8.pycqa.org/en/latest/) to format and check codebase for compliance with PEP8.
#### Formatting with pre-commit

To automate the process, we have configured the repo with [pre-commit hooks](https://pre-commit.com/) to use black to autoformat the staged files to ensure every commit complies with a style guide. This requires some setup, which is described below:

1. Install pre-commit in your python environment.
2. Run pre-commit install that configures a virtual environment to invoke black and flake8 on commits.
2. Run pre-commit install that configures a virtual environment to invoke black, isort and flake8 on commits.

```bash
pip install pre-commit
Expand All @@ -67,20 +80,15 @@ pre-commit install
git add .
git commit -m "Added awesome feature"
# DONT'T WORRY IF ERRORS ARE RAISED.
# YOUR CODE IS NOT COMPLIANT WITH FLAKE8 or BLACK
# YOUR CODE IS NOT COMPLIANT WITH flake8, isort or black
# Fix any flake8 errors by following their suggestions
# black will automatically format the files so they might look different, but you'll need to stage the files again for committing
# isort and black will automatically format the files so they might look different, but you'll need to stage the files
# again for committing
# After fixing any flake8 errors
git add .
git commit -m "Added feature"
```


#### Run lint checking
```bash
flake8 ignite/ tests/ examples/
```

#### Run tests:

To run a specific test, for example `test_terminate` from `test_engine.py`
Expand Down
10 changes: 5 additions & 5 deletions docs/source/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ The following people are currently core contributors to PyTorch-Ignite’s devel
- Victor Fomin `@vfdev-5 <https://github.com/vfdev-5>`_
- Anmol Joshi `@anmolsjoshi <https://github.com/anmolsjoshi>`_
- Sylvain Desroziers `@sdesrozis <https://github.com/sdesrozis>`_
- Elijah Rippeth `@erip <https://github.com/erip>`_


Emeritus Core Developers
Expand All @@ -45,7 +44,8 @@ Join Core Team

We are looking for motivated contributors to become collaborators and help out with the project.
We can start considering a candidate after several successfully merged Github pull requests.
If you are interested, for more details, please, contact Victor (@vfdev-5) on `PyTorch Slack <https://pytorch.slack.com>`_ or via email `vfdev.5` at `gmail.com`.
If you are interested, for more details, please, contact Victor (@vfdev-5) on `PyTorch Slack <https://pytorch.slack.com>`_
or via email `vfdev.5` at `gmail.com`.


Citing PyTorch-Ignite
Expand All @@ -56,7 +56,7 @@ If you use pytorch-ignite in a scientific publication, we would appreciate citat
.. code-block:: text

@misc{pytorch-ignite,
author = {V. Fomin, J. Anmol, S. Desroziers, J. Kriss, A. Tejani and E. Rippeth},
author = {V. Fomin, J. Anmol, S. Desroziers, J. Kriss and A. Tejani},
title = {High-level library to help with training neural networks in PyTorch},
year = {2020},
publisher = {GitHub},
Expand All @@ -74,8 +74,8 @@ We are also grateful to Soumith Chintala `@soumith <https://github.com/soumith>`
from Facebook for their help and to `PyTorch group <https://github.com/pytorch>`_ for infrastructure support
(GPU CI and hosting of conda releases and our documentation).

In particular, Victor Fomin `@vfdev-5 <https://github.com/vfdev-5>`_ acknowledges `Magellium <https://www.magellium.com/>`_ for supporting project's development.

In particular, Victor Fomin `@vfdev-5 <https://github.com/vfdev-5>`_ acknowledges `Magellium <https://www.magellium.com/>`_
and `Quansight <https://www.quansight.com/>`_ for supporting project's development.

We also acknowledge `scikit-learn project <https://scikit-learn.org>`_'s documentation on governance, author's presentation etc
from which this project is highly inspired.