Skip to content

Commit

Permalink
Improve pyproject setup according scientific-python/cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
oshadura committed Dec 7, 2023
1 parent 69d085e commit 04a47aa
Showing 1 changed file with 32 additions and 42 deletions.
74 changes: 32 additions & 42 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
[build-system]
requires = [
"setuptools>=65",
"wheel>=0.37.0",
"setuptools_scm>=6.0",
]
build-backend = "setuptools.build_meta"
requires = ["hatchling", "hatch-vcs", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"

[project]
name = "coffea-casa"
dynamic = ["version", "dependencies", "readme"]
dynamic = ["version", "readme"]
dependencies = ["distributed","dask-jobqueue"]
requires-python = ">=3.8"
license = {file = "LICENSE"}
description = "Wrappers for Dask clusters to be used from coffea-casa AF"
Expand Down Expand Up @@ -38,20 +35,24 @@ Documentation = "https://coffea-casa.readthedocs.io/en/latest/"
Repository = "https://github.com/CoffeaTeam/coffea-casa/issues"
"Bug Tracker" = "https://github.com/CoffeaTeam/coffea-casa/issues"

[tool.setuptools.packages.find]
where = ["."] # list of folders that contain the packages (["."] by default)
include = ["coffea_casa"] # package names should match these glob patterns (["*"] by default)
exclude = [] # exclude packages matching these glob patterns (empty by default)
namespaces = false # to disable scanning PEP 420 namespaces (true by default)
[project.optional-dependencies]
test = [
"pytest >=7",
]
dev = [
"pytest >=7",
]

[tool.hatch]
version.source = "vcs"
build.hooks.vcs.version-file = "coffea_casa/_version.py"

[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"

[tool.setuptools_scm]
fallback_version = "0.0.0"
write_to = "coffea_casa/_version.py"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.md"

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
readme = {file = ["README.md"], content-type = "text/markdown"}

[tool.flake8]
ignore = ["E203", "E266", "E501", "W503"]
Expand All @@ -71,34 +72,23 @@ exclude = '''
)/
'''


[tool.mypy]
files = "coffea_casa"
pretty = true
strict = true
strict_equality = true
files = ["coffe_casa", "tests"]
python_version = "3.10"
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
disallow_untyped_decorators = true
check_untyped_defs = true
disallow_any_generics = true
disallow_subclassing_any = true
warn_return_any = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_unused_configs = true
warn_unreachable = true
show_error_codes = true
show_error_context = true
no_implicit_optional = true
ignore_missing_imports = true
strict = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
warn_unreachable = true
disallow_untyped_defs = false

[tool.pytest.ini_options]
minversion = "6.0"
testpaths = [
"tests",]
log_cli_level = "INFO"
minversion = "7.0"
addopts = ["-ra", "--strict-markers", "--strict-config"]
xfail_strict = true
filterwarnings = ['error']
log_cli_level = "INFO"
filterwarnings = [
'error',
]
norecursedirs = ["coffe_casa"]
testpaths = ["tests"]

0 comments on commit 04a47aa

Please sign in to comment.