Skip to content

Commit

Permalink
[skip ci] Add PULL_REQUEST_TEMPLATE.md (#5340)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
kan-bayashi and pre-commit-ci[bot] committed Jul 22, 2023
1 parent 353c01f commit fcc1c01
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## What?

<!-- Please write what you changed. -->

## Why?

<!-- Please write why you changed. -->

## See also

<!-- Write additional information if necessary (e.g., referecne, related PRs or Issues). -->
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ have the format `def test_yyy(...)`. [Pytest](https://docs.pytest.org/en/latest
Technically, a test file should only cover methods from one file (e.g.: `test_transformer_utils.py` to test `transformer_utils.py`).
- To monitor the test coverage and avoid the overlapping test, we recommend using `pytest --cov-report term-missing <test_file|dir>`
to highlight covered and missed lines. For more details, please refer to [coverage-test](https://pytest-cov.readthedocs.io/en/latest/readme.html).
- We limit test running time to 2.0 seconds (see: [pytest-timeouts](https://pypi.org/project/pytest-timeouts/)) for each trial. As such, we recommend using small model parameters and avoiding dynamic imports, file access, and unnecessary loops.
- We limit test running time to 2.0 seconds (see: [pytest-timeouts](https://pypi.org/project/pytest-timeouts/)) for each trial. As such, we recommend using small model parameters and avoiding dynamic imports, file access, and unnecessary loops.
If a unit test needs more running time, you can annotate your test with `@pytest.mark.execution_timeout(sec)`.
- For test initialization (parameters, modules, etc), you can use pytest fixtures. Refer to [pytest fixtures](https://docs.pytest.org/en/latest/fixture.html#using-fixtures-from-classes-modules-or-projects) for more information.

Expand Down

0 comments on commit fcc1c01

Please sign in to comment.