summaryrefslogtreecommitdiffstats
path: root/pyproject.toml
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:27:32 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:27:32 +0000
commit88857376d837c86ee4cbbe6ff3c9a22ab2113ffe (patch)
treeefe8d5d117c400fef855ba85e3c181cd0d4bd501 /pyproject.toml
parentInitial commit. (diff)
downloadpython-tomli-w-88857376d837c86ee4cbbe6ff3c9a22ab2113ffe.tar.xz
python-tomli-w-88857376d837c86ee4cbbe6ff3c9a22ab2113ffe.zip
Adding upstream version 1.0.0.upstream/1.0.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'pyproject.toml')
-rw-r--r--pyproject.toml155
1 files changed, 155 insertions, 0 deletions
diff --git a/pyproject.toml b/pyproject.toml
new file mode 100644
index 0000000..1882bc2
--- /dev/null
+++ b/pyproject.toml
@@ -0,0 +1,155 @@
+[build-system]
+requires = ["flit_core>=3.2.0,<4"]
+build-backend = "flit_core.buildapi"
+
+[project]
+name = "tomli_w"
+version = "1.0.0" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT
+description = "A lil' TOML writer"
+authors = [
+ { name = "Taneli Hukkinen", email = "hukkin@users.noreply.github.com" },
+]
+license = { file = "LICENSE" }
+requires-python = ">=3.7"
+readme = "README.md"
+classifiers = [
+ "License :: OSI Approved :: MIT License",
+ "Operating System :: MacOS",
+ "Operating System :: Microsoft :: Windows",
+ "Operating System :: POSIX :: Linux",
+ "Programming Language :: Python :: 3 :: Only",
+ "Programming Language :: Python :: 3.7",
+ "Programming Language :: Python :: 3.8",
+ "Programming Language :: Python :: 3.9",
+ "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: Implementation :: CPython",
+ "Programming Language :: Python :: Implementation :: PyPy",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+ "Typing :: Typed",
+]
+keywords = ["toml", "tomli"]
+
+[project.urls]
+"Homepage" = "https://github.com/hukkin/tomli-w"
+"Changelog" = "https://github.com/hukkin/tomli-w/blob/master/CHANGELOG.md"
+
+
+[tool.isort]
+# Force imports to be sorted by module, independent of import type
+force_sort_within_sections = true
+# Group first party and local folder imports together
+no_lines_before = ["LOCALFOLDER"]
+
+# Configure isort to work without access to site-packages
+known_first_party = ["tomli_w", "tests"]
+
+# Settings for Black compatibility
+profile = "black"
+
+
+[tool.pytest.ini_options]
+addopts = "--strict-markers --strict-config"
+xfail_strict = true
+
+
+[tool.tox]
+legacy_tox_ini = '''
+[tox]
+# Only run pytest envs when no args given to tox
+envlist = py{37,38,39,310}
+isolated_build = True
+
+[testenv:py{37,38,39,310}]
+description = run tests against unpackaged source
+skip_install = True
+deps = -r tests/requirements.txt
+commands =
+ pytest {posargs}
+
+[testenv:py{37,38,39,310}-package]
+description = run tests against a built package
+deps = -r tests/requirements.txt
+commands =
+ pytest --import-mode=append {posargs}
+
+[testenv:pre-commit]
+description = run linters
+skip_install = True
+deps = pre-commit
+commands = pre-commit run {posargs:--all}
+
+[testenv:benchmark]
+description = run the benchmark script against a local Tomli-W version
+deps =
+ -r benchmark/requirements.txt
+commands =
+ python -c 'import datetime; print(datetime.date.today())'
+ python --version
+ python benchmark/run.py
+
+[testenv:benchmark-pypi]
+description = run the benchmark script against the latest Tomli-W in PyPI
+skip_install = True
+deps =
+ tomli-w
+ -r benchmark/requirements.txt
+commands =
+ python -c 'import datetime; print(datetime.date.today())'
+ python --version
+ python benchmark/run.py
+
+[testenv:profile]
+description = run profiler (use e.g. `firefox .tox/prof/combined.svg` to open)
+skip_install = True
+setenv =
+ PROFILER_ITERATIONS=1000
+deps =
+ -r tests/requirements.txt
+ pytest-profiling
+commands =
+ pytest tests/test_for_profiler.py --profile-svg --pstats-dir "{toxworkdir}/prof"
+ python -c 'import pathlib; print("profiler svg output under file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "prof" / "combined.svg"))'
+'''
+
+
+[tool.coverage.run]
+branch = true
+omit = ["tests/*", "*/site-packages/*"]
+
+[tool.coverage.report]
+# Regexes for lines to exclude from consideration
+exclude_lines = [
+ # Have to re-enable the standard pragma
+ "pragma: no cover",
+ # Code for static type checkers
+ "if TYPE_CHECKING:",
+ # Scripts
+ 'if __name__ == .__main__.:',
+ # Unfinished implementations
+ 'raise NotImplementedError',
+]
+
+
+[tool.mypy]
+show_error_codes = true
+warn_unreachable = true
+warn_unused_ignores = true
+warn_redundant_casts = true
+warn_unused_configs = true
+# Disabling incremental mode is required for `warn_unused_configs = true` to work
+incremental = false
+disallow_untyped_defs = true
+check_untyped_defs = true
+strict_equality = true
+implicit_reexport = false
+no_implicit_optional = true
+
+[[tool.mypy.overrides]]
+module = "tests.*"
+disallow_untyped_defs = false
+
+[[tool.mypy.overrides]]
+# This matches `benchmark/run.py`. Since benchmark/ is
+# not a package, we use the module name here.
+module = "run"
+ignore_errors = true