-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
78 lines (66 loc) · 2.03 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
[project]
name = "markov-chain"
dynamic = ["version"] # Version is managed by git tags
description = "Solver for Markov chains"
readme = "README.md"
requires-python = ">=3.9"
authors = [
{name = "Miguel Pereira", email = "[email protected]"},
]
dependencies = [
"sympy>=1.14.0",
]
[dependency-groups]
dev = [
"pre-commit>=4.2.0", # Git hooks for code quality
"pyright>=1.1.400", # Static type checker
"pytest>=8.3.5", # Testing framework
"pytest-cov>=6.1.1", # Test coverage reporting
"ruff>=0.11.7", # Linter and formatter
]
# ------------------------------------------------------------------------------
# Build
# ------------------------------------------------------------------------------
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/markov_chain"]
# Version management using git tags
[tool.hatch.version]
source = "vcs"
# https://docs.astral.sh/uv/concepts/projects/config/#project-packaging
# will force a project to be built and installed into the project environment
[tool.uv]
package = true
# ------------------------------------------------------------------------------
# Linting
# ------------------------------------------------------------------------------
[tool.ruff]
target-version = "py39"
line-length = 120
ignore = [
"E741", # ambiguous variable name
]
# Set of rules taken from https://docs.astral.sh/ruff/linter/#rule-selection
[tool.ruff.lint]
select = [
"E", # pycodestyle - Python style guide
"F", # Pyflakes - Python linter
"I", # isort - Import sorting
"B", # flake8-bugbear - Bug detection
"UP", # pyupgrade - Python upgrade tool
"SIM", # flake8-simplify - Code simplification
]
[tool.ruff.lint.isort]
known-first-party = ["markov_chain"]
[tool.pyright]
venvPath = "."
venv = ".venv"
basic = ["**/*.py"]
pythonVersion = "3.9"
# Ignore lines in the main block for coverage purposes
[tool.coverage.report]
exclude_also = [
"if __name__ == .__main__.:",
]