Skip to content

Commit 06deecd

Browse files
committed
Move project configuration to pyproject.toml
- Migrate configuration from setup.py, setup.cfg and .coveragerc to pyproject.toml - Replace flake8 with ruff (with E and F lints enabled)
1 parent 7c173b2 commit 06deecd

5 files changed

Lines changed: 94 additions & 78 deletions

File tree

‎.coveragerc‎

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎pyproject.toml‎

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
[build-system]
2+
build-backend = "setuptools.build_meta"
3+
requires = ["setuptools>=64"]
4+
5+
[project]
6+
authors = [
7+
{name = "Lourens Veen", email = "l.veen@esciencecenter.nl"},
8+
]
9+
classifiers = [
10+
"Development Status :: 4 - Beta",
11+
"Intended Audience :: Developers",
12+
"Natural Language :: English",
13+
"Programming Language :: Python :: 3",
14+
"Programming Language :: Python :: 3.9",
15+
"Programming Language :: Python :: 3.10",
16+
"Programming Language :: Python :: 3.11",
17+
"Programming Language :: Python :: 3.12",
18+
"Programming Language :: Python :: 3.13",
19+
"Programming Language :: Python :: 3.14",
20+
]
21+
dependencies = [
22+
"click>=6.5",
23+
"yatiml>=0.12.0,<0.13.0",
24+
# "yatiml @ git+https://github.com/yatiml/yatiml@develop#egg=yatiml",
25+
]
26+
description = "Python bindings for the YAML version of the Multiscale Modeling and Simulation Language"
27+
keywords = ["yMMSL", "multiscale", "modeling", "simulation", "YAML"]
28+
license = "Apache-2.0"
29+
license-files = ["LICENSE"]
30+
name = "ymmsl"
31+
readme = "README.rst"
32+
requires-python = ">=3.9, <4"
33+
version = "0.15.1-dev"
34+
35+
[project.urls]
36+
documentation = "https://ymmsl-python.readthedocs.io/"
37+
homepage = "https://github.com/multiscale/ymmsl-python"
38+
39+
[tool.setuptools]
40+
include-package-data = true
41+
42+
[tool.setuptools.packages.find]
43+
include = ["ymmsl", "ymmsl.*"]
44+
45+
[project.scripts]
46+
ymmsl = "ymmsl.command_line:ymmsl"
47+
48+
[tool.coverage.run]
49+
branch = true
50+
source = ["ymmsl"]
51+
52+
[tool.coverage.xml]
53+
output = "cobertura.xml"
54+
55+
[tool.pytest]
56+
addopts = [
57+
"--cov", "--cov-report", "xml", "--cov-report", "term-missing", "-vv",
58+
]
59+
testpaths = ["ymmsl"]
60+
61+
[tool.mypy]
62+
files = "ymmsl/**/*.py"
63+
# mypy_path = ymmsl
64+
disallow_incomplete_defs = true
65+
disallow_untyped_defs = true
66+
67+
[tool.ruff]
68+
exclude = [
69+
"docs",
70+
".git",
71+
]
72+
include = ["pyproject.toml", "ymmsl/**/*.py"]
73+
# Same as Black
74+
indent-width = 4
75+
line-length = 88
76+
77+
[tool.ruff.lint]
78+
select = [
79+
# pycodestyle
80+
"E",
81+
# Pyflakes
82+
"F",
83+
# TODO: enable these at some point?
84+
# pyupgrade
85+
# "UP",
86+
# flake8-bugbear
87+
#"B",
88+
# flake8-simplify
89+
#"SIM",
90+
# isort
91+
# "I",
92+
]

‎setup.cfg‎

Lines changed: 0 additions & 26 deletions
This file was deleted.

‎setup.py‎

Lines changed: 0 additions & 45 deletions
This file was deleted.

‎tox.ini‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ skip_missing_interpreters = true
55
[testenv]
66
deps =
77
mypy
8-
flake8
8+
ruff
99
pytest
1010
pytest-cov
1111
types-PyYAML
1212

1313
commands =
14+
ruff check
1415
mypy
1516
pytest {posargs}
16-
flake8 ymmsl
1717

1818
[gh-actions]
1919
python =

0 commit comments

Comments
 (0)