-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathpyproject.toml
124 lines (116 loc) · 4.09 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
[project]
name = "contentful"
dynamic = ["version"]
description = "Contentful Delivery API Client"
readme = "README.rst"
authors = [{name = "Contentful GmbH", email="[email protected]"}]
dependencies = [
"requests>=2.31.0,<3.0",
"python-dateutil>=2.8.2"
]
requires-python = ">=3.9"
license = {text = "MIT"}
keywords = ["contentful", "cms", "content"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Libraries :: Python Modules"
]
[project.urls]
Homepage = "https://github.com/contentful/contentful.py"
Documentation = "https://contentful.github.io/contentful.py"
Repository = "https://github.com/contentful/contentful.py"
Issues = "https://github.com/contentful/contentful.py/issues"
[project.optional-dependencies]
test = [
"vcrpy>=4.3.1",
"coverage>=6.5.0",
"flake8>=6.1.0",
"requests-mock>=1.11.0",
"PyYAML>=6.0.1",
"tox>=4.23.2",
]
docs = [
"Sphinx>=6.2.1",
"sphinxcontrib-websupport>=1.2.4",
"tox",
]
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm]
version = {source = "file", path = "contentful/__init__.py"}
includes = ["contentful"]
python = {version = ">=3.9,<4.0"}
[tool.pdm.scripts]
clean = {composite = ["clean-build", "clean-pyc", "clean-test"], help = "Remove all build, test, coverage and Python artifacts"}
clean-build = {shell = "rm -rf build/ dist/ *.egg-info", help = "Remove build artifacts"}
clean-pyc = {shell = """
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
""", help = "Remove Python file artifacts"}
clean-test = {shell = """
rm -fr .tox/
rm -f .coverage
rm -fr htmlcov/
""", help = "Remove test and coverage artifacts"}
lint = {cmd = "flake8 .", help = "Run flake8 linter"}
test = { cmd = "python -m unittest discover", help = "Run tests with unittest" }
test-all = {shell = "tox", help = "Run tests on all Python versions with tox"}
coverage = { cmd = "coverage run --source contentful runtests.py", help = "Run tests with coverage"}
docs = {shell = """
rm -f _docs/contentful.rst
rm -f _docs/modules.rst
rm -rf _docs/_build/*
sphinx-apidoc -o _docs/ contentful
make -C _docs html
cp _docs/LICENSE _docs/_build/html/
rm -rf docs
cp -r _docs/_build/html docs
open docs/index.html
""", help = "Generate Sphinx HTML documentation, including API docs", env = {SPHINXOPTS = "", SPHINXBUILD = "sphinx-build", PAPER = "", BUILDDIR = "_build",PAPEROPT_a4 = "-D latex_paper_size=a4", PAPEROPT_letter = "-D latex_paper_size=letter", ALLSPHINXOPTS = "-d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .", I18NSPHINXOPTS="$(PAPEROPT_$(PAPER)) $(SPHINXOPTS) ."}}
git-docs = {composite = ["docs", "git add docs", "git commit --amend -C HEAD"], help = "Generate and commit documentation"}
push-tags = {shell = """
VERSION=$(pdm show --version)
git tag -a $VERSION -m "version $VERSION"
git push --tags
git push
""", help = "Push version tags to GitHub"}
release = {composite = ["clean", "git-docs", "pdm publish", "push-tags"], help = "Package and upload a release"}
[tool.coverage.run]
source = ["contentful"]
branch = true
command_line = "-m unittest discover"
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"pass",
"raise ImportError"
]
[tool.pdm.dev-dependencies]
test = [
"vcrpy>=4.3.1",
"coverage>=6.5.0",
"flake8>=6.1.0",
"requests-mock>=1.11.0",
"PyYAML>=6.0.1",
"tox>=4.23.2",
]
docs = [
"Sphinx>=6.2.1",
"sphinxcontrib-websupport>=1.2.4",
"tox",
]