Commit graph

12 commits

Author SHA1 Message Date
Joshua Lock
de1a3af019 build: more intentional about what's included in sdist
Our sdist has typically included everything from git apart from the CI
related files (.github/*, .fossa.yml, .readthedocs.yaml). Update our
MANIFEST.in and the check-manifest section of setup.cfg to be explicit
about this.

Signed-off-by: Joshua Lock <jlock@vmware.com>
2021-10-21 13:30:46 +01:00
Joshua Lock
52ad17a710 build: update check-manifest options
Signed-off-by: Joshua Lock <jlock@vmware.com>
2021-10-21 13:30:46 +01:00
Joshua Lock
38ea974674 build: convert to static setuptools metadata
This is preferred and removes the crutch of invoking setup.py as a CLI
tool for building dists.

Signed-off-by: Joshua Lock <jlock@vmware.com>
2021-10-21 13:30:46 +01:00
Joshua Lock
2ab518b3f0 build: cleanup setup.cfg
* List license files in a new metadata section
* Remove .travis.yml from check-manifest section's ignore entry

Signed-off-by: Joshua Lock <jlock@vmware.com>
2021-10-21 13:28:07 +01:00
Joshua Lock
24a11427a2 Don't build universal wheels
Signed-off-by: Joshua Lock <jlock@vmware.com>
2021-09-06 13:29:07 +01:00
Teodora Sechkova
191a1e5e3d
Add type annotations to download.py and fetcher.py
Add the stub for the requests package (types-requests)
to requirements-tests.txt.

Add urllib3 to the ignored imports. The project seems
to have added type annotations already but has not
released a version including them yet.

Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
2021-08-27 11:49:49 +03:00
Teodora Sechkova
38b85cb8db
Add ngclient to mypy
Extend mypy to include all files under ngclient.

Signed-off-by: Teodora Sechkova <tsechkova@vmware.com>
2021-08-27 11:49:46 +03:00
Jussi Kukkonen
f3d26552ed mypy: disallow untyped calls
report an error whenever a function with type annotations calls a
function defined without annotations.

Also include exceptions.py in mypy checks.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-06-23 10:51:33 +03:00
Jussi Kukkonen
e69f34ba89 mypy: Enable stricter configuration
We're quite close to being able to enable only "strict = True" but not
quite there. In the mean time enable some useful individual settings.

disallow_untyped_defs:
    report an error whenever code contains a function definition
    without type annotations
warn_redundant_casts:
    report an error whenever code uses an unnecessary cast
warn_unused_ignores:
    report an error whenever code uses an unnecessary # type: ignore
    comment
warn_unreachable:
    report an error whenever code is determined to be unreachable or
    redundant

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-06-23 10:51:33 +03:00
Jussi Kukkonen
ca5f2ddd9c Add initial mypy configuration
This is an initial setup: By default check only tuf/api/,
and ignore securesystemslib imports.

Change lint working directory to source root: This saves repeating a lot
of {toxinidir} in the command lines.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2021-05-19 14:29:42 +03:00
Lukas Puehringer
15d1e933a0 Restructure requirements files
* Use suffixed instead of prefixed sub-requirements files to group
  them alphabetically in the file tree.
* Layer requirements files akin to the in-toto project
  (see in-toto/in-toto#294). The hierarchy is:

  - *requirements.in*
    tuf runtime requirements, including optional requirements
    (pynacl and cyrptography)

  - *requirements-pinned.txt*
    pinned tuf runtime requirements, including optional
    and transitive (1 level deep) requirements and their hashes.

    The file is generated semi-automatically using pip-compile
    and a bash script (see document header), based off of
    requirements.in, combining requirements from all supported
    Python versions.

    This file should be auto-updated, by e.g. dependabot, and be used
    for ci/cd tests, to catch issues with new dependencies.

  - *requirements-test.txt*
    additional test runtime requirements

  - *requirements-tox.txt*
    combines requirements.txt, requirements-test.txt and additional
    test tools (for linting and coverage), i.e. everything that is
    needed in each tox environment to run the tests.

  - *requirements-dev.txt*
    lists tox for local development and testing, and also
    requirements-tox.txt and tuf in editable mode to run
    the test suite or individual tests directly.

  - *requirements.txt*
    requirements-pinned.txt with the hashes of the dependencies
    as reported by pip at the time of creating the file.
    NOTE: this is not used for testing or  dev-install because pip
    doesn't allow mixed (with and without hashes) installations.

    This file should also be auto-updated, by e.g. dependabot.

* Removes an obsolete version constraint on coverage

Signed-off-by: Lukas Puehringer <lukas.puehringer@nyu.edu>
2020-02-06 17:35:51 +01:00
Vladimir Diaz
c20fd4afa8 Update release files. 2014-07-16 12:51:35 -04:00