mirror of
https://github.com/Cian-H/read_aconity_layers.git
synced 2025-12-22 18:31:56 +00:00
206 lines
4.2 KiB
TOML
206 lines
4.2 KiB
TOML
[project]
|
|
name = "read-aconity-layers"
|
|
requires-python = ">=3.11"
|
|
classifiers = [
|
|
"Programming Language :: Rust",
|
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
]
|
|
dynamic = ["version"]
|
|
|
|
[tool.poetry]
|
|
name = "read-aconity-layers"
|
|
version = "0.2.0"
|
|
description = "A utility for fast reading of layer data from the aconity mini powder bed fusion machine"
|
|
urls = { github = "https://github.com/Cian-H/read_aconity_layers" }
|
|
authors = ["Cian Hughes <chughes000@gmail.com>"]
|
|
license = "MIT"
|
|
readme = "README.md"
|
|
|
|
[tool.poetry.dependencies]
|
|
python = "^3.11"
|
|
maturin = "^1.7.4"
|
|
numpy = ">=2.0.0,<3.0.0"
|
|
|
|
[tool.poetry.group.dev.dependencies]
|
|
ruff = "^0.7.1"
|
|
mypy = "^1.13.0"
|
|
|
|
[build-system]
|
|
requires = ["maturin>=1.7,<2.0"]
|
|
build-backend = "maturin"
|
|
|
|
[tool.maturin]
|
|
features = ["pyo3/extension-module"]
|
|
|
|
[tool.ruff]
|
|
# Same as Black.
|
|
line-length = 100
|
|
# Assume Python 3.11
|
|
target-version = "py311"
|
|
exclude = ["docs/", "tests/"]
|
|
|
|
[tool.ruff.lint]
|
|
# Configure ruff to be *heavily* opinionated. We want to enforce a consistent style across all code.
|
|
# Enable checks for pydocstyle (`D`), pycodestyle (`E`, `W`), Pyflakes (`F`), McCabe Complexity (C90)
|
|
# isort (`I`), pep8 naming (`N`), flake8 (`A`, `ANN`, `B`, `C4`, `EM`, `FBT`, `ICN`, `INT`, `ISC`, `PT`,
|
|
# `PTH`, `RET`, `SIM`, `TCH`, and `TID`), perflint (`PERF`), numpy rules (`NPY`), pandas
|
|
# rules (`PD`), pylint (`PL`), ruff rules (`RUF`).
|
|
select = [
|
|
"D",
|
|
"E",
|
|
"W",
|
|
"F",
|
|
"C90",
|
|
"I",
|
|
"N",
|
|
"A",
|
|
"ANN",
|
|
"B",
|
|
"C4",
|
|
"EM",
|
|
"FBT",
|
|
"ICN",
|
|
"INT",
|
|
"ISC",
|
|
"PT",
|
|
"PTH",
|
|
"RET",
|
|
"SIM",
|
|
"TCH",
|
|
"TID",
|
|
"PERF",
|
|
"NPY",
|
|
"PD",
|
|
"PL",
|
|
"RUF",
|
|
]
|
|
# Reasons for disabling certain rules:
|
|
# - PD002: despite its problems we need to use inplace operations for performance reasons.
|
|
# - ANN002: as much as i'd like to enforce this using `TypedDict`s and a `__kwargs__`
|
|
# dunder, it would tightly couple us to external libraries.
|
|
# - ANN003: same as above.
|
|
# - PLR0913: as nice as smaller functions are for maintenance and readability, this rule
|
|
# is unenforceable in such a data-heavy library.
|
|
# - PLR0914: same as above.
|
|
# - PLR0917: same as above.
|
|
# - TCH001: the `TYPE_CHECKING` blocks either don't work or i'm too stupid to get them to work.
|
|
# - TCH002: same as above.
|
|
# - TCH003: same as above.
|
|
# - ISC001: Personally, i really like this rule but apparently it can cause issues with the ruff formatter.
|
|
ignore = [
|
|
"PD002",
|
|
"ANN002",
|
|
"ANN003",
|
|
"PLR0913",
|
|
# "PLR0914",
|
|
# "PLR0917",
|
|
"TCH001",
|
|
"TCH002",
|
|
"TCH003",
|
|
"ISC001",
|
|
]
|
|
# Allow autofix for all enabled rules (when `--fix`) is provided.
|
|
fixable = [
|
|
"A",
|
|
"B",
|
|
"C",
|
|
"D",
|
|
"E",
|
|
"F",
|
|
"G",
|
|
"I",
|
|
"N",
|
|
"Q",
|
|
"S",
|
|
"T",
|
|
"W",
|
|
"ANN",
|
|
"ARG",
|
|
"BLE",
|
|
"COM",
|
|
"DJ",
|
|
"DTZ",
|
|
"EM",
|
|
"ERA",
|
|
"EXE",
|
|
"FBT",
|
|
"ICN",
|
|
"INP",
|
|
"ISC",
|
|
"NPY",
|
|
"PD",
|
|
"PGH",
|
|
"PIE",
|
|
"PL",
|
|
"PT",
|
|
"PTH",
|
|
"PYI",
|
|
"RET",
|
|
"RSE",
|
|
"RUF",
|
|
"SIM",
|
|
"SLF",
|
|
"TCH",
|
|
"TID",
|
|
"TRY",
|
|
"UP",
|
|
"YTT",
|
|
]
|
|
unfixable = []
|
|
exclude = [
|
|
".bzr",
|
|
".direnv",
|
|
".eggs",
|
|
".git",
|
|
".hg",
|
|
".mypy_cache",
|
|
".nox",
|
|
".pants.d",
|
|
".pytype",
|
|
".ruff_cache",
|
|
".svn",
|
|
".tox",
|
|
".venv",
|
|
"__pypackages__",
|
|
"_build",
|
|
"buck-out",
|
|
"build",
|
|
"dist",
|
|
"node_modules",
|
|
"venv",
|
|
".vscode",
|
|
"docs",
|
|
]
|
|
# Allow unused variables when underscore-prefixed.
|
|
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
|
extend-select = ["I"]
|
|
|
|
[tool.ruff.lint.isort]
|
|
force-sort-within-sections = true
|
|
lines-after-imports = -1
|
|
|
|
[tool.ruff.lint.pydocstyle]
|
|
convention = "google"
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "double"
|
|
indent-style = "space"
|
|
line-ending = "auto"
|
|
|
|
[tool.ruff.lint.mccabe]
|
|
# Unlike Flake8, default to a complexity level of 10.
|
|
max-complexity = 10
|
|
|
|
[tool.ruff.lint.flake8-annotations]
|
|
mypy-init-return = true
|
|
|
|
[tool.mypy]
|
|
check_untyped_defs = true
|
|
ignore_missing_imports = true
|
|
exclude = ["docs/", "tests/"]
|
|
|
|
[[tool.mypy.overrides]]
|
|
module = ["flet.*", "flet_core.*", "fsspec.*"]
|
|
ignore_missing_imports = true
|