diff --git a/.gitignore b/.gitignore index 493cb2c..6d2c0cb 100644 --- a/.gitignore +++ b/.gitignore @@ -35,15 +35,11 @@ var/ pip-log.txt pip-delete-this-directory.txt -# Unit test / coverage reports +# Unit test reports htmlcov/ .tox/ -.coverage -.coverage.* .cache nosetests.xml -coverage.xml -*,cover .hypothesis/ # Translations diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 897c7c1..ad831d8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/asottile/pyupgrade - rev: v3.15.0 + rev: v3.21.2 hooks: - id: pyupgrade args: [--py310-plus] diff --git a/.readthedocs.yaml b/.readthedocs.yaml index fc9e76e..8d1ee6e 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -7,6 +7,10 @@ build: os: ubuntu-24.04 tools: python: "3.10" + jobs: + pre_build: + - rm -f docs/multicodec.rst docs/modules.rst + - python -m sphinx.ext.apidoc -o docs/ multicodec sphinx: configuration: docs/conf.py diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index d7a71df..86300df 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -118,9 +118,6 @@ The project provides several ``make`` targets to help with development: run linting, type checking, and tests. This is the recommended command to run before submitting a pull request. -* ``make coverage`` - Run tests with coverage reporting and open the HTML report - in your browser. - For a full list of available commands, run ``make help``. 7. Commit your changes and push your branch to GitHub:: @@ -150,7 +147,3 @@ Tips To run a subset of tests:: $ pytest tests/test_multicodec.py - -To run tests with coverage:: - - $ make coverage diff --git a/Makefile b/Makefile index f74052e..86d65ad 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,6 @@ help: @echo "lint - run pre-commit hooks on all files" @echo "typecheck - run mypy type checking" @echo "test - run tests quickly with the default Python" - @echo "coverage - run tests with coverage report" @echo "docs-ci - generate docs for CI" @echo "docs - generate docs and open in browser" @echo "servedocs - serve docs with live reload" @@ -48,7 +47,6 @@ clean-test: rm -fr .tox/ rm -fr .mypy_cache rm -fr .ruff_cache - rm -f .coverage rm -fr htmlcov/ setup: @@ -66,12 +64,6 @@ typecheck: test: python -m pytest tests -coverage: - coverage run --source multicodec -m pytest tests - coverage report -m - coverage html - $(BROWSER) htmlcov/index.html - docs-ci: rm -f docs/multicodec.rst rm -f docs/modules.rst diff --git a/README.rst b/README.rst index 0c10b98..51b6882 100644 --- a/README.rst +++ b/README.rst @@ -7,9 +7,6 @@ py-multicodec .. image:: https://github.com/multiformats/py-multicodec/actions/workflows/tox.yml/badge.svg?branch=master :target: https://github.com/multiformats/py-multicodec/actions/workflows/tox.yml -.. image:: https://codecov.io/gh/multiformats/py-multicodec/branch/master/graph/badge.svg - :target: https://codecov.io/gh/multiformats/py-multicodec - .. image:: https://readthedocs.org/projects/py-multicodec/badge/?version=stable :target: https://py-multicodec.readthedocs.io/en/stable/?badge=stable :alt: Documentation Status diff --git a/codecov.yaml b/codecov.yaml deleted file mode 100644 index 66dde9e..0000000 --- a/codecov.yaml +++ /dev/null @@ -1,2 +0,0 @@ -comment: - layout: header, changes, diff, uncovered diff --git a/docs/conf.py b/docs/conf.py index f2fd116..fc019b9 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -45,13 +45,13 @@ templates_path = ['_templates'] # The suffix of source filenames. -source_suffix = '.rst' +source_suffix = {'.rst': 'restructuredtext'} # The encoding of source files. # source_encoding = 'utf-8-sig' -# The master toctree document. -master_doc = 'index' +# The root toctree document. +root_doc = 'index' # General information about the project. project = 'py-multicodec' diff --git a/newsfragments/29.docs.rst b/newsfragments/29.docs.rst new file mode 100644 index 0000000..c1e8cf2 --- /dev/null +++ b/newsfragments/29.docs.rst @@ -0,0 +1 @@ +Fixed Read the Docs build failures by updating deprecated Sphinx settings and adding API documentation generation. diff --git a/newsfragments/29.internal.rst b/newsfragments/29.internal.rst new file mode 100644 index 0000000..4b33e77 --- /dev/null +++ b/newsfragments/29.internal.rst @@ -0,0 +1 @@ +Dropped ``coverage`` and ``codecov`` references, no longer using it. diff --git a/pyproject.toml b/pyproject.toml index 8fbc7cd..1c46e79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,12 +36,9 @@ dev = [ "Sphinx>=5.0.0", "build>=0.9.0", "bump-my-version>=1.2.0", - "codecov", - "coverage>=6.5.0", "mypy", "pre-commit", "pytest", - "pytest-cov", "pytest-runner", "ruff", "towncrier>=24,<25", @@ -63,21 +60,6 @@ include = ["multicodec*"] testpaths = ["tests"] python_classes = "*TestCase" -[tool.coverage.run] -source = ["multicodec"] - -[tool.coverage.report] -exclude_lines = [ - "pragma: no cover", - "def __repr__", - "if self.debug:", - "if settings.DEBUG", - "raise AssertionError", - "raise NotImplementedError", - "if 0:", - "if __name__ == .__main__.:", -] - [tool.towncrier] # Read https://github.com/multiformats/py-multicodec/blob/master/newsfragments/README.md for instructions directory = "newsfragments"