|
2 | 2 | requires = ["setuptools>=64", "setuptools_scm[toml]>=6.2", "wheel"] |
3 | 3 | build-backend = "setuptools.build_meta" |
4 | 4 |
|
| 5 | +[project] |
| 6 | +name = "python3-pip-skeleton" |
| 7 | +classifiers = [ |
| 8 | + "Development Status :: 3 - Alpha", |
| 9 | + "License :: OSI Approved :: Apache Software License", |
| 10 | + "Programming Language :: Python :: 3.8", |
| 11 | + "Programming Language :: Python :: 3.9", |
| 12 | + "Programming Language :: Python :: 3.10", |
| 13 | + "Programming Language :: Python :: 3.11", |
| 14 | +] |
| 15 | +description = "One line description of your module" |
| 16 | +dependencies = [] # Add project dependencies here, e.g. ["click", "numpy"] |
| 17 | +dynamic = ["version"] |
| 18 | +license.file = "LICENSE" |
| 19 | +readme = "README.rst" |
| 20 | +requires-python = ">=3.8" |
| 21 | + |
| 22 | +[project.optional-dependencies] |
| 23 | +dev = [ |
| 24 | + "black", |
| 25 | + "isort", |
| 26 | + "mypy", |
| 27 | + "flake8", |
| 28 | + "flake8-isort", |
| 29 | + "Flake8-pyproject", |
| 30 | + "pipdeptree", |
| 31 | + "pre-commit", |
| 32 | + "pydata-sphinx-theme", |
| 33 | + "pytest-cov", |
| 34 | + "setuptools_scm[toml]>=6.2", |
| 35 | + "sphinx-autobuild", |
| 36 | + "sphinx-copybutton", |
| 37 | + "sphinx-design", |
| 38 | + "tox", |
| 39 | + "tox-direct", |
| 40 | + "types-mock", |
| 41 | +] |
| 42 | + |
| 43 | +[project.scripts] |
| 44 | +python3-pip-skeleton = "python3_pip_skeleton.__main__:main" |
| 45 | + |
| 46 | +[project.urls] |
| 47 | +GitHub = "https://github.com/DiamondLightSource/python3-pip-skeleton" |
| 48 | + |
| 49 | +[[project.authors]] # Further authors may be added by duplicating this section |
| 50 | + |
| 51 | +name = "Firstname Lastname" |
| 52 | + |
| 53 | + |
5 | 54 | [tool.setuptools_scm] |
6 | 55 | write_to = "src/python3_pip_skeleton/_version.py" |
| 56 | + |
| 57 | +[tool.mypy] |
| 58 | +ignore_missing_imports = true # Ignore missing stubs in imported modules |
| 59 | + |
| 60 | +[tool.isort] |
| 61 | +float_to_top = true |
| 62 | +profile = "black" |
| 63 | + |
| 64 | +[tool.flake8] |
| 65 | +extend-ignore = [ |
| 66 | + "E203", # See https://github.com/PyCQA/pycodestyle/issues/373 |
| 67 | + "F811", # support typing.overload decorator |
| 68 | + "F722", # allow Annotated[typ, some_func("some string")] |
| 69 | +] |
| 70 | +max-line-length = 88 # Respect black's line length (default 88), |
| 71 | +exclude = [".tox", "venv"] |
| 72 | + |
| 73 | + |
| 74 | +[tool.pytest.ini_options] |
| 75 | +# Run pytest with all our checkers, and don't spam us with massive tracebacks on error |
| 76 | +addopts = """ |
| 77 | + --tb=native -vv --doctest-modules --doctest-glob="*.rst" |
| 78 | + --cov=python3_pip_skeleton --cov-report term --cov-report xml:cov.xml |
| 79 | + """ |
| 80 | +# https://iscinumpy.gitlab.io/post/bound-version-constraints/#watch-for-warnings |
| 81 | +filterwarnings = "error" |
| 82 | +# Doctest python code in docs, python code in src docstrings, test functions in tests |
| 83 | +testpaths = "docs src tests" |
| 84 | + |
| 85 | +[tool.coverage.run] |
| 86 | +data_file = "/tmp/python3_pip_skeleton.coverage" |
| 87 | + |
| 88 | +[tool.coverage.paths] |
| 89 | +# Tests are run from installed location, map back to the src directory |
| 90 | +source = ["src", "**/site-packages/"] |
| 91 | + |
| 92 | +# tox must currently be configured via an embedded ini string |
| 93 | +# See: https://github.com/tox-dev/tox/issues/999 |
| 94 | +[tool.tox] |
| 95 | +legacy_tox_ini = """ |
| 96 | +[tox] |
| 97 | +skipsdist=True |
| 98 | +
|
| 99 | +[testenv:{pre-commit,mypy,pytest,docs}] |
| 100 | +# Don't create a virtualenv for the command, requires tox-direct plugin |
| 101 | +direct = True |
| 102 | +passenv = * |
| 103 | +allowlist_externals = |
| 104 | + pytest |
| 105 | + pre-commit |
| 106 | + mypy |
| 107 | + sphinx-build |
| 108 | + sphinx-autobuild |
| 109 | +commands = |
| 110 | + pytest: pytest {posargs} |
| 111 | + mypy: mypy src tests {posargs} |
| 112 | + pre-commit: pre-commit run --all-files {posargs} |
| 113 | + docs: sphinx-{posargs:build -EW --keep-going} -T docs build/html |
| 114 | +""" |
0 commit comments