Tool to check the completeness of MANIFEST.in for Python packages https://pypi.org/p/check-manifest
 
 
Go to file
Marius Gedminas a35f2605f8 Ignore coveralls upload failures
I am once again seeing

    Submitting coverage to coveralls.io...
    Could not submit coverage: 422 Client Error: Unprocessable Entity for url: https://coveralls.io/api/v1/jobs
    resubmitting with id None
    Traceback (most recent call last):
      File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/coveralls/api.py", line 290, in submit_report
        response.raise_for_status()
      File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
        raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 422 Client Error: Unprocessable Entity for url: https://coveralls.io/api/v1/jobs

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/coveralls/cli.py", line 95, in main
        result = coverallz.wear()
      File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/coveralls/api.py", line 257, in wear
        return self.submit_report(json_string)
      File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/coveralls/api.py", line 293, in submit_report
        raise CoverallsException(
    coveralls.exception.CoverallsException: Could not submit coverage: 422 Client Error: Unprocessable Entity for url: https://coveralls.io/api/v1/jobsSubmitting coverage to coveralls.io...
    Could not submit coverage: 422 Client Error: Unprocessable Entity for url: https://coveralls.io/api/v1/jobs
    resubmitting with id None
    Traceback (most recent call last):
      File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/coveralls/api.py", line 290, in submit_report
        response.raise_for_status()
      File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
        raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 422 Client Error: Unprocessable Entity for url: https://coveralls.io/api/v1/jobs

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/coveralls/cli.py", line 95, in main
        result = coverallz.wear()
      File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/coveralls/api.py", line 257, in wear
        return self.submit_report(json_string)
      File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/coveralls/api.py", line 293, in submit_report
        raise CoverallsException(
    coveralls.exception.CoverallsException: Could not submit coverage: 422 Client Error: Unprocessable Entity for url: https://coveralls.io/api/v1/jobs

when nothing has changed in my repo or configuration.

I've had enough of coveralls.  If the numbers fail to upload, so be it.
2023-05-02 17:06:24 +03:00
.github Ignore coveralls upload failures 2023-05-02 17:06:24 +03:00
.coveragerc Refactor UI code to avoid global state 2020-05-02 20:12:31 +03:00
.gitignore Rewrite the IgnoreList logic to be more distutils-like 2020-05-03 15:38:08 +03:00
.pre-commit-hooks.yaml Add 'language_version: python3' to .pre-commit-hooks.yaml 2020-12-20 16:48:01 -08:00
CHANGES.rst Back to development: 0.50 2022-12-05 10:15:12 +02:00
LICENSE.rst Rename LICENCE to LICENSE 2016-09-22 11:34:34 +03:00
MANIFEST.in Remove unused .travis.yml 2020-12-20 16:25:52 -08:00
Makefile Automate the version update in the README 2020-11-30 08:53:41 +02:00
README.rst Preparing release 0.49 2022-12-05 10:11:53 +02:00
appveyor.yml Support Python 3.11 2022-10-27 10:10:03 +03:00
check_manifest.py Back to development: 0.50 2022-12-05 10:15:12 +02:00
release.mk Update to newer release.mk 2021-04-22 22:51:21 +03:00
setup.cfg Workaround for mypy 0.800 ignoring setup.cfg 2021-01-27 12:19:52 +02:00
setup.py Support Python 3.11 2022-10-27 10:10:03 +03:00
tests.py Use type annotations on class attributes 2022-11-24 13:01:11 +02:00
tox.ini tox 4 requires passenv to be newline (or comma) separated 2022-12-11 19:58:01 +02:00

README.rst

check-manifest

buildstatus_ appveyor_ coverage_

Are you a Python developer? Have you uploaded packages to the Python Package Index? Have you accidentally uploaded broken packages with some files missing? If so, check-manifest is for you.

Quick start

$ pip install check-manifest

$ cd ~/src/mygreatpackage
$ check-manifest

You can ask the script to help you update your MANIFEST.in:

$ check-manifest -u -v
listing source files under version control: 6 files and directories
building an sdist: check-manifest-0.7.tar.gz: 4 files and directories
lists of files in version control and sdist do not match!
missing from sdist:
  tests.py
  tox.ini
suggested MANIFEST.in rules:
  include *.py
  include tox.ini
updating MANIFEST.in

$ cat MANIFEST.in
include *.rst

# added by check_manifest.py
include *.py
include tox.ini

Command-line reference

$ check-manifest --help
usage: check-manifest [-h] [--version] [-v] [-c] [-u] [-p PYTHON]
                      [--ignore patterns]
                      [source_tree]

Check a Python MANIFEST.in file for completeness

positional arguments:
  source_tree           location for the source tree (default: .)

optional arguments:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  -v, --verbose         more verbose output (default: False)
  -c, --create          create a MANIFEST.in if missing (default: False)
  -u, --update          append suggestions to MANIFEST.in (implies --create)
                        (default: False)
  -p PYTHON, --python PYTHON
                        use this Python interpreter for running setup.py sdist
                        (default: /home/mg/.venv/bin/python)
  --ignore patterns     ignore files/directories matching these comma-
                        separated patterns (default: None)
  --ignore-bad-ideas patterns
                        ignore bad idea files/directories matching these
                        comma-separated patterns (default: [])

Configuration

You can configure check-manifest to ignore certain file patterns using a [tool.check-manifest] section in your pyproject.toml file or a [check-manifest] section in either setup.cfg or tox.ini. Examples:

# pyproject.toml
[tool.check-manifest]
ignore = [".travis.yml"]

# setup.cfg or tox.ini
[check-manifest]
ignore =
    .travis.yml

Note that lists are newline separated in the setup.cfg and tox.ini files.

The following options are recognized:

ignore

A list of filename patterns that will be ignored by check-manifest. Use this if you want to keep files in your version control system that shouldn't be included in your source distributions. The default ignore list is :

PKG-INFO
*.egg-info
*.egg-info/*
setup.cfg
.hgtags
.hgsigs
.hgignore
.gitignore
.bzrignore
.gitattributes
.github/*
.travis.yml
Jenkinsfile
*.mo
ignore-default-rules

If set to true, your ignore patterns will replace the default ignore list instead of adding to it.

ignore-bad-ideas

A list of filename patterns that will be ignored by check-manifest's generated files check. Use this if you want to keep generated files in your version control system, even though it is generally a bad idea.

Version control integration

With pre-commit, check-manifest can be part of your git-workflow. Add the following to your .pre-commit-config.yaml.

repos:
-   repo: https://github.com/mgedmin/check-manifest
    rev: "0.49"
    hooks:
    -   id: check-manifest

If you are running pre-commit without a network, you can utilize args: [--no-build-isolation] to prevent a pip install reaching out to PyPI. If you have additional build-system.requires outside of pip / setuptools / wheel you will want to list those in additional_dependencies.

repos:
-   repo: https://github.com/mgedmin/check-manifest
    rev: ...  # pick a valid tag / revision
    hooks:
    -   id: check-manifest
        args: [--no-build-isolation]
        additional_dependencies: [setuptools-scm]