Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
150 lines (137 loc) · 5.36 KB
/
Copy pathpyproject.toml
File metadata and controls
150 lines (137 loc) · 5.36 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
[build-system]
requires = ["hatchling", "patchelf; sys_platform == 'linux'"]
build-backend = "hatchling.build"
[tool.hatch.build.hooks.custom]
path = "buildUtil/build.py"
[tool.hatch.build.targets.sdist.force-include]
"mikecore/bin" = "mikecore/bin"
[tool.hatch.build.targets.wheel]
packages = ["mikecore", "miketools"]
[tool.hatch.build.targets.wheel.force-include]
"mikecore/bin" = "mikecore/bin"
[project]
name = "mikecore"
version = "0.3.0a1"
description = "MIKE Core contains core libraries, like DFS (Data File System), EUM and more."
readme = "README.md"
license = { file = "LICENSE.txt" }
authors = [
{ name = "DHI", email = "mike@dhigroup.com" }
]
# Only CPython versions that have not reached end of life; see docs/adr/0001-python-version-support.md
requires-python = ">=3.11"
dependencies = [
"numpy"
]
classifiers = [
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
[project.urls]
Homepage = "https://github.com/DHI/mikecore-python"
[dependency-groups]
dev = [
# Pinned: new releases can add errors and warnings. Bump deliberately and
# update MAX_WARNINGS in .github/workflows/type_check.yml to match.
"pyrefly==1.3.2",
"pytest>=6.1.2",
]
[tool.pyrefly]
project-includes = ["mikecore", "miketools", "tests"]
python-version = "3.11"
[tool.pyrefly.errors]
# Many attributes (e.g. FileInfo, TimeAxis, X/Y/Z) start as None and are set
# later, so most accesses trip missing-attribute. Kept as warnings so real None
# dereferences stay visible; make them errors once those attributes are typed.
missing-attribute = "warn"
# Existing violations need the same typing work (values from those attributes
# passed on, indexed or sized). Kept visible as warnings for now.
bad-argument-type = "warn"
unsupported-operation = "warn"
read-only = "warn"
[tool.ruff.format]
line-ending = "lf"
# ruff takes its target version from requires-python.
[tool.ruff.lint]
select = [
"E4", "E7", "E9", "F", "UP", "B",
# The other stable rules ruff tags correctness, complexity or performance
# (the "category" field of `ruff rule --all --output-format json`). F, UP, B and
# E9 already hold theirs. Rules for frameworks mikecore does not use (FastAPI,
# pandas) are left out. TID255 joins once CI's ruff has it as stable.
# flake8-comprehensions
"C400", "C401", "C402", "C403", "C404", "C405", "C406", "C408", "C409", "C410",
"C411", "C413", "C414", "C415", "C417", "C418", "C419", "C420",
# flake8-executable
"EXE002", "EXE004",
# flake8-future-annotations
"FA102",
# flynt
"FLY002",
# refurb
"FURB105", "FURB110", "FURB122", "FURB129", "FURB132", "FURB136", "FURB157",
"FURB161", "FURB162", "FURB163", "FURB166", "FURB168", "FURB169", "FURB171",
"FURB177", "FURB181", "FURB188", "FURB192",
# flake8-logging-format
"G101", "G201",
# flake8-logging
"LOG001",
# Perflint
"PERF101", "PERF102", "PERF402",
# flake8-pie
"PIE794", "PIE800", "PIE807", "PIE808", "PIE810",
# Pylint
"PLC0131", "PLC0206", "PLC0207", "PLC0208", "PLC0414", "PLC3002", "PLE0100",
"PLE0101", "PLE0115", "PLE0116", "PLE0117", "PLE0118", "PLE0241", "PLE0604",
"PLE0605", "PLE0643", "PLE1132", "PLE1142", "PLE1205", "PLE1206", "PLE1300",
"PLE1307", "PLE1310", "PLE1507", "PLE1700", "PLR0133", "PLR0206", "PLR0402",
"PLR1708", "PLR1711", "PLR1730", "PLR1733", "PLR1736", "PLW0128", "PLW0129",
"PLW0131", "PLW0133", "PLW0177", "PLW0245", "PLW0604", "PLW1501", "PLW1507",
"PLW2101",
# flake8-pytest-style
"PT008", "PT010", "PT014", "PT024", "PT025", "PT026",
# flake8-use-pathlib
"PTH210",
# flake8-pyi
"PYI010", "PYI012", "PYI013", "PYI016", "PYI019", "PYI030", "PYI035", "PYI041",
"PYI044", "PYI045", "PYI048", "PYI055", "PYI059", "PYI064",
# Ruff-specific rules
"RUF007", "RUF010", "RUF015", "RUF016", "RUF017", "RUF019", "RUF020", "RUF026",
"RUF030", "RUF034", "RUF037", "RUF046", "RUF049", "RUF051", "RUF053", "RUF057",
"RUF058", "RUF060", "RUF068", "RUF200",
# flake8-simplify
"SIM101", "SIM102", "SIM103", "SIM107", "SIM110", "SIM113", "SIM117", "SIM118",
"SIM201", "SIM202", "SIM208", "SIM210", "SIM211", "SIM220", "SIM221", "SIM222",
"SIM223", "SIM401", "SIM905", "SIM911",
# flake8-debugger
"T100",
# flake8-type-checking
"TC004", "TC007", "TC010",
# tryceratops
"TRY201", "TRY203", "TRY401",
# pycodestyle
"W605",
]
# The C#-style API is re-exported through star imports throughout.
ignore = [
"F403", "F405",
# Pending cleanup: these need case-by-case review rather than autofixing.
"E711", # `== None` can't blindly become `is None` where numpy arrays flow through
"E722", # bare except
"E731", # lambda assignment
"E741", # ambiguous variable name
"F811", # duplicated test helpers whose bodies differ
# Defaults like DfsParameters() and np.float32(...) are never mutated.
"B008",
]
[tool.ruff.lint.per-file-ignores]
# Manual test runners that import modules for their side effects.
"tests/Test.py" = ["F401", "E402"]
"tests/test_run_all.py" = ["F401"]
# Imports follow the native library path setup.
"mikecore/__init__.py" = ["E402"]