Skip to content

Commit

Permalink
Switch build to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
bcbnz committed Jan 26, 2025
1 parent f402e4b commit ef97fef
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 79 deletions.
2 changes: 2 additions & 0 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
76 changes: 70 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,73 @@
[tool.isort]
profile = "black"
atomic = true
combine_as_imports = true
force_sort_within_sections = true
lines_after_imports = 2
[project]
name = "matplotlib-pgfutils"
description = "Utilities for generating PGF figures from Matplotlib"
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/"
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",
]


#
# 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.ruff.isort]
combine-as-imports = true
force-sort-within-sections = true


#
# Testing
#

[tool.pytest.ini_options]
addopts = "-v --cov=pgfutils --cov-report html --cov-report term --cov-branch"
Expand Down
73 changes: 0 additions & 73 deletions setup.py

This file was deleted.

0 comments on commit ef97fef

Please sign in to comment.