diff --git a/RELEASE.md b/RELEASE.md index e221882e36..3e71110b71 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -20,6 +20,7 @@ * Relaxed the bounds on the `plotly` requirement for `plotly.PlotlyDataSet`. * `kedro pipeline package ` now raises an error if the `` argument doesn't look like a valid Python module path (e.g. has `/` instead of `.`). * Fixed slow startup because of catalog processing by reducing the exponential growth of extra processing during `_FrozenDatasets` creations. +* Removed `.coveragerc` from the Kedro project template. `coverage` settings are now given in `pyproject.toml`. * Fixed a bug where packaging or pulling a modular pipeline with the same name as the project's package name would throw an error (or silently pass without including the pipeline source code in the wheel file). ## Minor breaking changes to the API diff --git a/docs/source/03_tutorial/02_tutorial_template.md b/docs/source/03_tutorial/02_tutorial_template.md index ded3e58015..96b702382b 100644 --- a/docs/source/03_tutorial/02_tutorial_template.md +++ b/docs/source/03_tutorial/02_tutorial_template.md @@ -42,7 +42,7 @@ jupyter_client>=5.1.0, <7.0 # Used to open a Kedro-session in Jupyter Notebook & jupyterlab~=3.0 # Used to open a Kedro-session in Jupyter Lab kedro==0.17.5 nbstripout~=0.4 # Strips the output of a Jupyter Notebook and writes the outputless version to the original file -pytest-cov~=2.5 # Produces test coverage reports +pytest-cov~=3.0 # Produces test coverage reports pytest-mock>=1.7.1, <2.0 # Wrapper around the mock package for easier use with pytest pytest~=6.2 # Testing framework for Python code wheel>=0.35, <0.37 # The reference implementation of the Python wheel packaging standard diff --git a/features/steps/test_starter/{{ cookiecutter.repo_name }}/.coveragerc b/features/steps/test_starter/{{ cookiecutter.repo_name }}/.coveragerc deleted file mode 100644 index 003c131200..0000000000 --- a/features/steps/test_starter/{{ cookiecutter.repo_name }}/.coveragerc +++ /dev/null @@ -1,6 +0,0 @@ -[report] -fail_under=0 -show_missing=True -exclude_lines = - pragma: no cover - raise NotImplementedError diff --git a/features/steps/test_starter/{{ cookiecutter.repo_name }}/pyproject.toml b/features/steps/test_starter/{{ cookiecutter.repo_name }}/pyproject.toml index ab5d8cdbae..4009d0c909 100644 --- a/features/steps/test_starter/{{ cookiecutter.repo_name }}/pyproject.toml +++ b/features/steps/test_starter/{{ cookiecutter.repo_name }}/pyproject.toml @@ -15,3 +15,8 @@ known_third_party = "kedro" addopts = """ --cov-report term-missing \ --cov src/{{ cookiecutter.python_package }} -ra""" + +[tool.coverage.report] +fail_under = 0 +show_missing = true +exclude_lines = ["pragma: no cover", "raise NotImplementedError"] diff --git a/features/steps/test_starter/{{ cookiecutter.repo_name }}/src/requirements.txt b/features/steps/test_starter/{{ cookiecutter.repo_name }}/src/requirements.txt index a9940fa0f4..0833d99f63 100644 --- a/features/steps/test_starter/{{ cookiecutter.repo_name }}/src/requirements.txt +++ b/features/steps/test_starter/{{ cookiecutter.repo_name }}/src/requirements.txt @@ -8,7 +8,7 @@ jupyterlab~=3.0 kedro[pandas.CSVDataSet]=={{ cookiecutter.kedro_version }} kedro-telemetry~=0.1.0 nbstripout~=0.4 -pytest-cov~=2.5 +pytest-cov~=3.0 pytest-mock>=1.7.1, <2.0 pytest~=6.2 wheel>=0.35, <0.37 diff --git a/kedro/templates/project/{{ cookiecutter.repo_name }}/.coveragerc b/kedro/templates/project/{{ cookiecutter.repo_name }}/.coveragerc deleted file mode 100644 index 003c131200..0000000000 --- a/kedro/templates/project/{{ cookiecutter.repo_name }}/.coveragerc +++ /dev/null @@ -1,6 +0,0 @@ -[report] -fail_under=0 -show_missing=True -exclude_lines = - pragma: no cover - raise NotImplementedError diff --git a/kedro/templates/project/{{ cookiecutter.repo_name }}/pyproject.toml b/kedro/templates/project/{{ cookiecutter.repo_name }}/pyproject.toml index bf58e6fac0..2901bf019a 100644 --- a/kedro/templates/project/{{ cookiecutter.repo_name }}/pyproject.toml +++ b/kedro/templates/project/{{ cookiecutter.repo_name }}/pyproject.toml @@ -15,3 +15,8 @@ known_third_party = "kedro" addopts = """ --cov-report term-missing \ --cov src/{{ cookiecutter.python_package }} -ra""" + +[tool.coverage.report] +fail_under = 0 +show_missing = true +exclude_lines = ["pragma: no cover", "raise NotImplementedError"] diff --git a/kedro/templates/project/{{ cookiecutter.repo_name }}/src/requirements.txt b/kedro/templates/project/{{ cookiecutter.repo_name }}/src/requirements.txt index c66089d7e3..48e23902e9 100644 --- a/kedro/templates/project/{{ cookiecutter.repo_name }}/src/requirements.txt +++ b/kedro/templates/project/{{ cookiecutter.repo_name }}/src/requirements.txt @@ -8,7 +8,7 @@ jupyterlab~=3.0 kedro=={{ cookiecutter.kedro_version }} kedro-telemetry~=0.1.0 nbstripout~=0.4 -pytest-cov~=2.5 +pytest-cov~=3.0 pytest-mock>=1.7.1, <2.0 pytest~=6.2 wheel>=0.35, <0.37 diff --git a/test_requirements.txt b/test_requirements.txt index 3cd681b911..50e6c1aa1e 100644 --- a/test_requirements.txt +++ b/test_requirements.txt @@ -6,7 +6,6 @@ biopython~=1.73 black==21.5b1 blacken-docs==1.9.2 compress-pickle[lz4]~=1.2.0 -coverage[toml] dask[complete]~=2.6 dill~=0.3.1 gcsfs>=2021.04, <2022.01 # Upper bound set arbitrarily, to be reassessed in early 2022 @@ -33,7 +32,7 @@ pyarrow>=0.12.0, <4.0 pylint>=2.5.2, <3.0 pyproj>=2.2.0, <3.0 # pyproj 3.0 requires proj>=7.2 but that conflicts with fiona which requires proj<7.2. pyspark>=2.2, <4.0 -pytest-cov~=2.5 +pytest-cov~=3.0 pytest-mock>=1.7.1, <2.0 pytest-xdist[psutil]~=2.2.1 pytest~=6.2 diff --git a/tests/framework/cli/test_starters.py b/tests/framework/cli/test_starters.py index 0399dbdfed..a022b90a0f 100644 --- a/tests/framework/cli/test_starters.py +++ b/tests/framework/cli/test_starters.py @@ -42,7 +42,7 @@ from kedro import __version__ as version from kedro.framework.cli.starters import _STARTER_ALIASES, TEMPLATE_PATH -FILES_IN_TEMPLATE = 36 +FILES_IN_TEMPLATE = 35 @pytest.fixture