mirror of
https://github.com/Cian-H/read_aconity_layers.git
synced 2025-12-22 18:31:56 +00:00
First commit. Separated project out from MTPy.
This commit is contained in:
204
pyproject.toml
Normal file
204
pyproject.toml
Normal file
@@ -0,0 +1,204 @@
|
||||
[tool.poetry]
|
||||
name = "read-aconity-layers"
|
||||
version = "0.1.0"
|
||||
description = "A utility for fast reading of layer data from the aconity mini powder bed fusion machine"
|
||||
authors = ["Cian Hughes <chughes000@gmail.com>"]
|
||||
license = "MIT"
|
||||
readme = "README.md"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.11"
|
||||
maturin = "^1.5.1"
|
||||
numpy = "^1.26.4"
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
ruff = "^0.4.2"
|
||||
mypy = "^1.10.0"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "mason"
|
||||
|
||||
[tool.maturin]
|
||||
# Bindings type
|
||||
bindings = "pyo3"
|
||||
# Don't check for manylinux compliance
|
||||
skip-auditwheel = false
|
||||
# Python source directory
|
||||
# python-source = "src/mtpy"
|
||||
# Strip the library for minimum file size
|
||||
strip = true
|
||||
# Source distribution generator,
|
||||
# supports cargo (default) and git.
|
||||
sdist-generator = "cargo"
|
||||
|
||||
[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
|
||||
Reference in New Issue
Block a user