Skip to content

Commit

Permalink
Add pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
cmalinmayor committed Feb 14, 2024
1 parent a18738b commit 9f9b59f
Showing 1 changed file with 157 additions and 0 deletions.
157 changes: 157 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# https://peps.python.org/pep-0517/
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

# https://peps.python.org/pep-0621/
[project]
name = "dacapo-ml"
description = "Framework for easy composition of volumetric machine learning jobs."
readme = "README.md"
requires-python = ">=3.8"
# license = { text = "BSD 3-Clause License" }
authors = [
{ email = "[email protected]", name = "Jeff Rhoades" },
{ email = "[email protected]", name = "Will Patton" },
{ email = "[email protected]", name = "Marwan Zouinkhi" },
{ email = "[email protected]", name = "Jan Funke" },
]
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Typing :: Typed",
]
dynamic = ["version"]
dependencies = [
"numpy==1.22.3",
"pyyaml",
"zarr",
"cattrs",
"pymongo",
"tqdm",
"simpleitk",
"lazy-property",
"neuroglancer",
"torch",
"fibsem_tools",
"attrs",
"bokeh",
"numpy-indexed>=0.3.7",
"daisy>=1.0",
"funlib.math>=0.1",
"funlib.geometry>=0.2",
"mwatershed>=0.1",
"funlib.persistence @ git+https://github.com/janelia-cellmap/funlib.persistence",
"funlib.evaluate @ git+https://github.com/pattonw/funlib.evaluate",
"gunpowder>=1.3",
# "lsds>=0.1.3",
"lsds @ git+https://github.com/funkelab/lsd",
"xarray",
"cattrs",
"numpy-indexed",
"click",]

# extras
# https://peps.python.org/pep-0621/#dependencies-optional-dependencies
[project.optional-dependencies]
test = ["pytest==7.4.4", "pytest-cov", "pytest-lazy-fixture"]
dev = [
"black",
"ipython",
"mypy",
"pdbpp",
"pre-commit",
"pytest-cov",
"pytest",
"rich",
"ruff",
]

[project.urls]
homepage = "https://github.com/janelia-cellmap/dacapo"
repository = "https://github.com/janelia-cellmap/dacapo"

# https://hatch.pypa.io/latest/config/metadata/
[tool.hatch.version]
source = "vcs"

# https://hatch.pypa.io/latest/config/build/#file-selection
# [tool.hatch.build.targets.sdist]
# include = ["/src", "/tests"]
[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.build.targets.wheel]
only-include = ["dacapo"]
sources = ["dacapo"]

# https://github.com/charliermarsh/ruff
[tool.ruff]
line-length = 88
target-version = "py38"
src = ["dacapo"]
# https://beta.ruff.rs/docs/rules/
select = [
"E", # style errors
"W", # style warnings
"F", # flakes
"D", # pydocstyle
"I", # isort
"UP", # pyupgrade
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"A001", # flake8-builtins
"RUF", # ruff-specific rules
]

[tool.ruff.per-file-ignores]
"tests/*.py" = ["D", "S"]

# https://docs.pytest.org/en/6.2.x/customize.html
[tool.pytest.ini_options]
minversion = "6.0"
testpaths = ["tests"]
filterwarnings = ["error"]

# https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
files = "dacapo/**/"
strict = true
disallow_any_generics = false
disallow_subclassing_any = false
show_error_codes = true
pretty = true

# # module specific overrides
# [[tool.mypy.overrides]]
# module = ["numpy.*",]
# ignore_errors = true


# https://coverage.readthedocs.io/en/6.4/config.html
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"@overload",
"except ImportError",
"\\.\\.\\.",
"raise NotImplementedError()",
]
[tool.coverage.run]
source = ["dacapo"]

# https://github.com/mgedmin/check-manifest#configuration
[tool.check-manifest]
ignore = [
".github_changelog_generator",
".pre-commit-config.yaml",
".ruff_cache/**/*",
"tests/**/*",
]

0 comments on commit 9f9b59f

Please sign in to comment.