154 lines
5.0 KiB
TOML
154 lines
5.0 KiB
TOML
# ---- Project Info and Dependencies ----
|
|
|
|
[project.urls]
|
|
Repository = "https://github.com/changeme/minibutler"
|
|
# Homepage = "https://..."
|
|
# Documentation = "https://..."
|
|
|
|
[project]
|
|
name = "minibutler"
|
|
description = "A minimal automatic SLURM submission tool."
|
|
authors = [
|
|
{ name="Alexander Steppke", email="alexander.steppke@psi.ch" },
|
|
]
|
|
readme = "README.md"
|
|
license = "MIT"
|
|
requires-python = ">=3.11,<4.0"
|
|
dynamic = ["version"]
|
|
|
|
# ---- Main dependencies ----
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
|
|
# ---- Dev dependencies ----
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=8.3.5",
|
|
"pytest-sugar>=1.0.0",
|
|
"ruff>=0.11.9",
|
|
"codespell>=2.4.1",
|
|
"rich>=14.0.0",
|
|
"basedpyright>=1.29.1",
|
|
"funlog>=0.2.1",
|
|
]
|
|
|
|
[project.scripts]
|
|
# Add script entry points here:
|
|
minibutler = "minibutler.butler:main"
|
|
|
|
|
|
# ---- Build system ----
|
|
|
|
# Dynamic versioning from:
|
|
# https://github.com/ninoseki/uv-dynamic-versioning/
|
|
|
|
[build-system]
|
|
requires = ["hatchling", "uv-dynamic-versioning"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.version]
|
|
source = "uv-dynamic-versioning"
|
|
# Note JSON schemas don't seem to be right for tool.hatch.version.source so
|
|
# this may cause false warnings in IDEs.
|
|
# https://github.com/ninoseki/uv-dynamic-versioning/issues/21
|
|
|
|
[tool.uv-dynamic-versioning]
|
|
vcs = "git"
|
|
style = "pep440"
|
|
bump = true
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
# The source location for the package.
|
|
packages = ["src/minibutler"]
|
|
|
|
|
|
# ---- Settings ----
|
|
|
|
[tool.ruff]
|
|
# Set as desired, typically 88 (black standard) or 100 (wide).
|
|
line-length = 100
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
# See: https://docs.astral.sh/ruff/rules/
|
|
# Basic list from: https://docs.astral.sh/ruff/linter/#rule-selection
|
|
"E", # https://docs.astral.sh/ruff/rules/#error-e
|
|
"F", # https://docs.astral.sh/ruff/rules/#pyflakes-f
|
|
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
|
|
"B", # https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
|
|
"I", # https://docs.astral.sh/ruff/rules/#isort-i
|
|
# Other possibilities:
|
|
# "D" # https://docs.astral.sh/ruff/rules/#pydocstyle-d
|
|
# "Q" # https://docs.astral.sh/ruff/rules/#flake8-quotes-q
|
|
# "COM" # https://docs.astral.sh/ruff/rules/#flake8-commas-com
|
|
# "SIM", # https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
|
|
|
|
]
|
|
ignore = [
|
|
# Disable some rules that are overly pedantic. Add/remove as desired:
|
|
"E501", # https://docs.astral.sh/ruff/rules/line-too-long/
|
|
"E402", # https://docs.astral.sh/ruff/rules/module-import-not-at-top-of-file/
|
|
"E731", # https://docs.astral.sh/ruff/rules/lambda-assignment/
|
|
# We use both ruff formatter and linter so some rules should always be disabled.
|
|
# See: https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
|
|
"W191", # https://docs.astral.sh/ruff/rules/tab-indentation/
|
|
"E111", # https://docs.astral.sh/ruff/rules/indentation-with-invalid-multiple/
|
|
"E114", # https://docs.astral.sh/ruff/rules/indentation-with-invalid-multiple-comment/
|
|
"E117", # https://docs.astral.sh/ruff/rules/over-indented/
|
|
"D206", # https://docs.astral.sh/ruff/rules/docstring-tab-indentation/
|
|
"D300", # https://docs.astral.sh/ruff/rules/triple-single-quotes/
|
|
"Q000", # https://docs.astral.sh/ruff/rules/bad-quotes-inline-string/
|
|
"Q001", # https://docs.astral.sh/ruff/rules/bad-quotes-multiline-string/
|
|
"Q002", # https://docs.astral.sh/ruff/rules/bad-quotes-docstring/
|
|
"Q003", # https://docs.astral.sh/ruff/rules/avoidable-escaped-quote/
|
|
"COM812", # https://docs.astral.sh/ruff/rules/missing-trailing-comma/
|
|
"COM819", # https://docs.astral.sh/ruff/rules/prohibited-trailing-comma/
|
|
"ISC002", # https://docs.astral.sh/ruff/rules/multi-line-implicit-string-concatenation/
|
|
]
|
|
|
|
[tool.basedpyright]
|
|
# BasedPyright currently seems like the best type checker option, much faster
|
|
# than mypy and with a good extension for VSCode/Cursor.
|
|
# https://marketplace.visualstudio.com/items?itemName=detachhead.basedpyright
|
|
# https://docs.basedpyright.com/latest/configuration/config-files/#sample-pyprojecttoml-file
|
|
include = ["src", "tests", "devtools"]
|
|
# By default BasedPyright is very strict, so you almost certainly want to disable
|
|
# some of the rules.
|
|
# First, these turn off warnings about (yes) how you ignore warnings:
|
|
reportIgnoreCommentWithoutRule = false
|
|
reportUnnecessaryTypeIgnoreComment = false
|
|
# A few typically noisy warnings are next.
|
|
# How many you enable is up to you. The first few are off by default, but you can
|
|
# comment/uncomment these as desired:
|
|
reportMissingTypeStubs = false
|
|
reportUnusedCallResult = false
|
|
reportAny = false
|
|
reportExplicitAny = false
|
|
reportImplicitStringConcatenation = false
|
|
reportUnreachable = false
|
|
# reportPrivateImportUsage = false
|
|
# reportPrivateLocalImportUsage = false
|
|
# reportMissingImports = false
|
|
# reportUnnecessaryIsInstance = false
|
|
# reportUnknownVariableType = false
|
|
# reportUnknownArgumentType = false
|
|
|
|
[tool.codespell]
|
|
# Add here as needed:
|
|
# ignore-words-list = "foo,bar"
|
|
# skip = "foo.py,bar.py"
|
|
|
|
[tool.pytest.ini_options]
|
|
python_files = ["*.py"]
|
|
python_classes = ["Test*"]
|
|
python_functions = ["test_*"]
|
|
testpaths = [
|
|
"src",
|
|
"tests",
|
|
]
|
|
norecursedirs = []
|
|
filterwarnings = []
|