Skip to content
Merged

Dev #14

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/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ body:
label: Existing GitHub issues
options:
- label: I have searched existing GitHub issues to make sure the issue does not already exist.
required: true
required: true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ body:
attributes:
label: Additional information
description: |
Please provide any additional information here. Include potential alternative solutions, or workarounds, as well as references, if any.
Please provide any additional information here. Include potential alternative solutions, or workarounds, as well as references, if any.
3 changes: 3 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Please complete the following checklist when submitting a PR. The PR will not be

- [ ] The code is formatted using Black.
You can do this by running `black src tests`.
-
- [ ] The imports are sorted using isort.
You can do this by running `isort src tests`.

- [ ] The code is type-checked using Mypy.
You can do this by running `mypy src tests`.
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,15 @@ jobs:
run: |
. ./venv/bin/activate
black src tests --check --diff
isort src tests --check-only --diff
- name: Test Typing
run: |
. ./venv/bin/activate
mypy src tests
- name: Test Notebooks
run: |
. ./venv/bin/activate
pytest --nbmake notebooks --nbmake-timeout=600 # 10 minutes timeout
pytest --nbmake notebooks -n=auto --nbmake-kernel=python3 --nbmake-timeout=600 # 10 minutes timeout

- name: Test Unittests with pytest
run: |
Expand Down
57 changes: 56 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ nbmake = "^1.5.5"
wheel = "^0.45.1"
build = "^1.2.2.post1"
twine = "^6.1.0"
pytest-xdist = "^3.7.0"
isort = "^6.0.1"


[tool.poetry.group.docs.dependencies]
Expand Down
1 change: 1 addition & 0 deletions run_pytests.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ def main():
f"--cov-report={args.cov_report}",
f"--cov-report=term-missing",
f"--durations={args.durations}",
f"-n=auto",
]
pytest.main(pytest_main_args, plugins=[json_plugin])
json_path = os.path.join(args.tests_folder, ".tmp", f"tests_report_rn{configs.N_RANDOM_TESTS_PER_CASE}.json")
Expand Down
3 changes: 2 additions & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pytest
import numpy as np
import pytest

from .configs import TEST_SEED

np.random.seed(TEST_SEED)
Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from .configs import RUN_SLOW_TESTS

RUN_SLOW_ARG_NAME = "run_slow"
Expand Down
5 changes: 3 additions & 2 deletions tests/test_dummy.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import argparse
import runpy

import pytest

import python_template
from python_template.__main__ import main, get_args_parser
import runpy
from python_template.__main__ import get_args_parser, main


@pytest.mark.parametrize("dummy", list(range(10)))
Expand Down