Skip to content

Commit

Permalink
Update tooling.
Browse files Browse the repository at this point in the history
  • Loading branch information
bcbnz committed Jan 26, 2025
1 parent 43d2a91 commit 5c58b71
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 40 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
pgfutils
========

[![SPEC 0 — Minimum Supported Dependencies](https://img.shields.io/badge/SPEC-0-green?labelColor=%23004811&color=%235CA038)](https://scientific-python.org/specs/spec-0000/)

The [Portable Graphics Format (PGF)][1] is a language for producing vector
graphics within TeX documents. There is also a higher-level language TikZ (TikZ
ist kein Zeichenprogramm -- TikZ is not a drawing program) which uses PGF.
Expand Down Expand Up @@ -54,15 +56,13 @@ save()
Requirements
------------

pgfutils follows [NEP29][3] when determining supported Python versions. Any minor
version of Python released within the 42 months prior to a pgfutils release is
supported, with a minimum of 2 minor versions. As of pgfutils 1.8.0, this means Python
3.8 or later.
pgfutils follows [SPEC0][3] when determining supported Python versions. Any minor
version of Python released within the 3 years prior to a pgfutils release is
supported. As of January 2025, this means Python 3.11 or later.

The only required external dependency is Matplotlib. Any minor version of Matplotlib
which was first released within the 24 months prior to a pgfutils release is supported,
with a minimum of 2 minor versions. As of pgfutils 1.8.0, this means Matplotlib 3.3.0 or
later.
which was first released within the 24 months prior to a pgfutils release is supported.
As of January 2025, this means Matplotlib 3.7.0 or later.

Older versions of Python or Matplotlib may work, but are not tested and are not
supported.
Expand Down Expand Up @@ -133,7 +133,7 @@ https://github.com/sebsan/Cotham

[1]: https://github.com/pgf-tikz/pgf
[2]: https://matplotlib.org/
[3]: https://numpy.org/neps/nep-0029-deprecation_policy.html
[3]: https://scientific-python.org/specs/spec-0000
[4]: https://codecov.io/gh/bcbnz/matplotlib-pgfutils
[5]: https://pytest.org/
[6]: https://coverage.readthedocs.io/
Expand Down
91 changes: 59 additions & 32 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,46 +1,73 @@
[build-system]
requires = ["flit_core"]
build-backend = "flit_core.buildapi"

[project]
name = "matplotlib-pgfutils"
description = "Utilities for generating PGF figures from Matplotlib"
license = {text = "BSD"}
authors = [
{name = "Blair Bonnett", email="[email protected]"}
]
readme = "README.md"
dependencies = ["matplotlib"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Topic :: Scientific/Engineering :: Visualization",
]
dynamic = ["version"]
readme = {file = "README.md", content-type="text/markdown"}
license = "BSD-3-Clause"
requires-python = ">=3.11"
dependencies = [
"matplotlib>=3.7.0"
]

[project.urls]
Documentation = "https://matplotlib-pgfutils.readthedocs.io/"
Repository = "https://github.com/bcbnz/matplotlib-pgfutils.git"
"Issue Tracker" = "https://github.com/bcbnz/matplotlib-pgfutils/issues"
Repository = "https://github.com/bcbnz/matplotlib-pgfutils/"
Issues = "https://github.com/bcbnz/matplotlib-pgfutils/issues"

[project.optional-dependencies]
dev = [
"matplotlib-pgfutils[doc]",
"matplotlib-pgfutils[test]",
"ruff",
]
doc = [
"mkdocs",
]
test = [
"pytest",
"pytest-cov",
]


[tool.flit.module]
name = "pgfutils"
dist-name = "matplotlib-pgfutils"
#
# Build tools.
#

[build-system]
requires = ["setuptools", "setuptools_scm"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
py-modules = ["pgfutils"]

[tool.setuptools_scm]
version_scheme = "guess-next-dev"


#
# Linting.
#

[tool.ruff]
target-version = "py311"

[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"F", # pyflakes
"I", # isort
"NPY", # NumPy-specific checks
"W", # pycodestyle warnings
]

[tool.flit.external-data]
directory = "data"
[tool.ruff.isort]
combine-as-imports = true
force-sort-within-sections = true

[tool.flit.sdist]
exclude = [".editorconfig", ".flake8", ".github", ".gitignore", "readthedocs.yml"]

[tool.isort]
profile = "black"
atomic = true
combine_as_imports = true
force_sort_within_sections = true
lines_after_imports = 2
#
# Testing
#

[tool.pytest.ini_options]
addopts = "-v --cov=pgfutils --cov-report html --cov-report term --cov-branch"
Expand Down

0 comments on commit 5c58b71

Please sign in to comment.