|
1 | 1 | [](https://circleci.com/gh/HumanCompatibleAI/imitation) |
2 | 2 | [](https://imitation.readthedocs.io/en/latest/?badge=latest) |
3 | 3 | [](https://codecov.io/gh/HumanCompatibleAI/imitation) |
| 4 | +[](https://badge.fury.io/py/imitation) |
| 5 | + |
4 | 6 |
|
5 | 7 | # Imitation Learning Baseline Implementations |
6 | 8 |
|
@@ -30,13 +32,23 @@ View Tensorboard with `tensorboard --logdir output/`. |
30 | 32 |
|
31 | 33 |
|
32 | 34 | # Contributing |
33 | | - * Follow the [Google Python Style Guide](http://google.github.io/styleguide/pyguide.html). Examples of Google-style |
34 | | -docstrings can be found [here](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html). |
35 | | - * Add units tests covering any new features, or bugs that are being fixed. |
36 | | - * PEP8 guidelines with line width 80 and 2-space indents are enforced by `ci/lint.sh`, |
37 | | -which is automatically run by Travis CI. |
38 | | - * Static type checking via `pytype` is automatically run in `ci/type_check.sh`. |
39 | | - * Code coverage is automatically enforced by CodeCov. |
40 | | - The exact coverage required by CodeCov depends on the previous |
41 | | - code coverage %. Files in `imitation/{examples,scripts}/` have no |
42 | | - coverage requirements. |
| 35 | + |
| 36 | +Please follow a coding style of: |
| 37 | + * PEP8, with line width 88. |
| 38 | + * Use the `black` autoformatter. |
| 39 | + * Follow the [Google Python Style Guide](http://google.github.io/styleguide/pyguide.html) unless |
| 40 | + it conflicts with the above. Examples of Google-style docstrings can be found |
| 41 | + [here](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html). |
| 42 | + |
| 43 | +PRs should include unit tests for any new features, and add type annotations where possible. |
| 44 | +It is OK to omit annotations when it would make the code significantly more complex. |
| 45 | + |
| 46 | +We use `pytest` for unit testing: run `pytest tests/` to run the test suite. |
| 47 | +We use `pytype` for static type analysis. |
| 48 | +You should run `ci/code_checks.sh` to run linting and static type checks, and may wish |
| 49 | +to configure this as a Git pre-commit hook. |
| 50 | + |
| 51 | +These checks are run on CircleCI and are required to pass before merging. |
| 52 | +Additionally, we track test coverage by CodeCov, and mandate that code coverage |
| 53 | +should not decrease. This can be overridden by maintainers in exceptional cases. |
| 54 | +Files in `imitation/{examples,scripts}/` have no coverage requirements. |
0 commit comments