diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..9b2834b6 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,12 @@ +[run] +omit = + sunkit_iamge/cython_version* + sunkit_iamge/extern/* + sunkit_iamge/version* + sunkit_iamge/data/sample.py + sunkit_iamge/data/_sample.py + */sunkit_iamge/cython_version* + */sunkit_iamge/extern/* + */sunkit_iamge/version* + */sunkit_iamge/data/sample.py + */sunkit_iamge/data/_sample.py diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44a3bb5d..b94a82c6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,8 @@ jobs: posargs: -n auto envs: | - linux: py312 + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} test: needs: [core] @@ -42,6 +44,8 @@ jobs: - macos: py310 - windows: py311 - linux: py310-oldestdeps + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} docs: needs: [test] @@ -69,6 +73,8 @@ jobs: posargs: -n auto --dist loadgroup envs: | - linux: py312-online + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} devdeps: needs: [online] @@ -80,6 +86,8 @@ jobs: posargs: -n auto envs: | - linux: py312-devdeps + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} conda: needs: [online] diff --git a/.codecov.yaml b/codecov.yml similarity index 51% rename from .codecov.yaml rename to codecov.yml index a5d2a77f..0ea8c111 100644 --- a/.codecov.yaml +++ b/codecov.yml @@ -1,8 +1,10 @@ -codecov: - token: c78028e5-8778-47c6-97af-94b0bb99fc9a -comment: off +comment: false coverage: status: project: default: threshold: 0.2% +codecov: + require_ci_to_pass: false + notify: + wait_for_ci: true diff --git a/pytest.ini b/pytest.ini index 2707ccdd..b4e0f99f 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,4 +1,5 @@ [pytest] +minversion = 7.0 testpaths = "sunkit_image" "docs" norecursedirs = ".tox" "build" "docs[\/]_build" "docs[\/]generated" "*.egg-info" "examples" "sunkit_image[/\]_dev" ".jupyter" ".history" "tools" "sunkit_image[\/]extern" doctest_plus = enabled @@ -11,8 +12,6 @@ markers = online: marks this test function as needing online connectivity. mpl_image_compare: marks this test function as using hash-based Matplotlib figure verification. This mark is not meant to be directly applied, but is instead automatically applied when a test function uses the @sunpy.tests.helpers.figure_test decorator. remote_data_strict = True -# Pin junit behaviour; we might want to update this to xunit2 at some point -junit_family=xunit1 filterwarnings = error # Do not fail on pytest config issues (i.e. missing plugins) but do show them diff --git a/tox.ini b/tox.ini index 04e4231c..0ca8c87a 100644 --- a/tox.ini +++ b/tox.ini @@ -23,13 +23,8 @@ description = setenv = MPLBACKEND = agg COLUMNS = 180 - PYTEST_COMMAND = pytest -vvv -ra --pyargs sunkit_image --cov-report=xml --cov=sunkit_image {toxinidir}/docs + PYTEST_COMMAND = pytest -vvv -r fEs --pyargs sunkit_image --cov-report=xml --cov=sunkit_image --cov-config={toxinidir}/.coveragerc {toxinidir}/docs SUNPY_SAMPLEDIR = {env:SUNPY_SAMPLEDIR:{toxinidir}/.tox/{envname}/sample_data/} -passenv = - HTTP_PROXY - HTTPS_PROXY - NO_PROXY - CIRCLECI deps = devdeps: git+https://github.com/scikit-image/scikit-image.git devdeps: git+https://github.com/sunpy/sunpy.git @@ -37,8 +32,6 @@ deps = oldestdeps: scikit-image<0.20.0 oldestdeps: scipy<1.19.0 oldestdeps: numpy<1.23.0 - online: pytest-rerunfailures - online: pytest-timeout figure-!devdeps: astropy==5.3.1 figure-!devdeps: matplotlib==3.7.2 figure-!devdeps: sunpy==5.0.0 @@ -51,7 +44,7 @@ commands = !figure: pip freeze --all --no-input # We have online figure tests we don't want to run. !online-!figure: {env:PYTEST_COMMAND} {posargs} - online: {env:PYTEST_COMMAND} --reruns 2 --timeout=180 --remote-data=any {posargs} + online: {env:PYTEST_COMMAND} --remote-data=any {posargs} figure: /bin/bash -c "mkdir -p ./figure_test_images; python -c 'import matplotlib as mpl; print(mpl.ft2font.__file__, mpl.ft2font.__freetype_version__, mpl.ft2font.__freetype_build_type__)' > ./figure_test_images/figure_version_info.txt" figure: /bin/bash -c "pip freeze --all --no-input >> ./figure_test_images/figure_version_info.txt" figure: /bin/bash -c "cat ./figure_test_images/figure_version_info.txt"