diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 334c8d0..c14dde1 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -23,6 +23,8 @@ jobs: defaults: run: shell: bash -l {0} + env: + PIP_BREAK_SYSTEM_PACKAGES: 1 steps: - name: Checkout uses: actions/checkout@v2 @@ -42,6 +44,8 @@ jobs: run: python3 -m pip install --upgrade pip - name: Install Package run: python3 -m pip install -e .[test] -e ./extras[test] + - name: MyPy + run: mypy --install-types --non-interactive . - name: Pytest run: pytest -vvs --cov fileformats --cov-config .coveragerc --cov-report xml . - name: Upload coverage to Codecov diff --git a/pyproject.toml b/pyproject.toml index 9d0b398..9438d64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,20 +7,11 @@ name = "fileformats-CHANGEME" description = "Classes for representing different file formats in Python classes for use in type hinting in data workflows" readme = "README.rst" requires-python = ">=3.8" -dependencies = [ - "fileformats >= 0.4" -] -license = {file = "LICENSE"} -authors = [ - {name = "", email = ""}, -] -maintainers = [ - {name = "", email = ""}, -] -keywords = [ - "file formats", - "data", -] +dependencies = ["fileformats >= 0.4"] +license = { file = "LICENSE" } +authors = [{ name = "", email = "" }] +maintainers = [{ name = "", email = "" }] +keywords = ["file formats", "data"] classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Console", @@ -38,18 +29,13 @@ classifiers = [ dynamic = ["version"] [project.optional-dependencies] -dev = [ - "black", - "pre-commit", - "codespell", - "flake8", - "flake8-pyproject", -] +dev = ["black", "pre-commit", "codespell", "flake8", "flake8-pyproject"] test = [ "pytest >=6.2.5", "pytest-env>=0.6.2", "pytest-cov>=2.12.1", "codecov", + "mypy >=1.5.1", ] [project.urls] @@ -73,9 +59,15 @@ ignore-words = ".codespell-ignorewords" [tool.flake8] doctests = true -per-file-ignores = [ - "__init__.py:F401" -] +per-file-ignores = ["__init__.py:F401"] max-line-length = 88 select = "C,E,F,W,B,B950" extend-ignore = ['E203', 'E501', 'E129'] + +[tool.mypy] +python_version = "3.8" +ignore_missing_imports = true +strict = true +namespace_packages = true +explicit_package_bases = true +exclude = ["tests", "build", "dist"]