diff --git a/pyproject.toml b/pyproject.toml index 2b90ddd..8feb95b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,25 +1,114 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "ndx-microscopy" +version = "0.1.0" +authors = [ + { name="Alessandra Trapani", email="alessandra.trapani@catalystneuro.com" }, + { name="Cody Baker", email="cody.baker@catalystneuro.com" }, +] +description = "An NWB extension to demonstrate the TAB proposal for enhancements to optical physiology neurodata types." +readme = "README.md" +# requires-python = ">=3.8" +license = {text = "BSD-3"} +classifiers = [ + # TODO: add classifiers before release + # "Programming Language :: Python", + # "Programming Language :: Python :: 3.8", + # "Programming Language :: Python :: 3.9", + # "Programming Language :: Python :: 3.10", + # "Programming Language :: Python :: 3.11", + # "Programming Language :: Python :: 3.12", + # "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: BSD License", +] +keywords = [ + 'NeurodataWithoutBorders', + 'NWB', + 'nwb-extension', + 'ndx-extension', +] +dependencies = [ + "pynwb>=2.8.0", + "hdmf>=3.14.1", + "ndx-ophys-devices>=0.1.0" +] + +# TODO: add URLs before release +# [project.urls] +# "Homepage" = "https://github.com/organization/package" +# "Documentation" = "https://package.readthedocs.io/" +# "Bug Tracker" = "https://github.com/organization/package/issues" +# "Discussions" = "https://github.com/organization/package/discussions" +# "Changelog" = "https://github.com/organization/package/blob/main/CHANGELOG.md" + +# Include only the source code under `src/pynwb/ndx_microscopy` and the spec files under `spec` +# in the wheel. +[tool.hatch.build.targets.wheel] +packages = [ + "src/pynwb/ndx_microscopy", + "spec" +] + +# Rewrite the path to the `spec` directory to `ndx_microscopy/spec`. +# `ndx_microscopy/__init__.py` will look there first for the spec files. +# The resulting directory structure within the wheel will be: +# ndx_microscopy/ +# ├── __init__.py +# ├── spec +# └── widgets +[tool.hatch.build.targets.wheel.sources] +"spec" = "ndx_microscopy/spec" + +# The source distribution includes everything in the package except for the `src/matnwb` directory and +# git and github-related files. +[tool.hatch.build.targets.sdist] +exclude = [ + ".git*", + "src/matnwb", +] + +[tool.pytest.ini_options] +# uncomment below to run pytest always with code coverage reporting. NOTE: breakpoints may not work +# addopts = "--cov --cov-report html" + +[tool.codespell] +skip = "htmlcov,.git,.mypy_cache,.pytest_cache,.coverage,*.pdf,*.svg,venvs,.tox,hdmf-common-schema,./docs/_build/*,*.ipynb" + +[tool.coverage.run] +branch = true +source = ["ndx_microscopy"] + +[tool.coverage.report] +exclude_lines = [ + "pragma: no cover", + "@abstract" +] + [tool.black] line-length = 120 -target-version = ['py39', 'py310', 'py311', 'py312'] -include = '\.pyi?$' -extend-exclude = ''' -/( - \.toml - |\.yml - |\.txt - |\.sh - |\.git - |\.ini - | \.hg - | \.mypy_cache - | \.tox - | \.venv - | build - | dist -)/ -''' - -[tool.isort] -profile = "black" -reverse_relative = true -known_first_party = ["ndx_microscopy"] +preview = true +exclude = ".git|.mypy_cache|.tox|.venv|venv|.ipynb_checkpoints|_build/|dist/|__pypackages__|.ipynb|docs/" + +[tool.ruff] +lint.select = ["E", "F", "T100", "T201", "T203"] +exclude = [ + ".git", + ".tox", + "__pycache__", + "build/", + "dist/", + "docs/source/conf.py", +] +line-length = 120 + +[tool.ruff.lint.per-file-ignores] +"src/pynwb/ndx_microscopy/__init__.py" = ["E402", "F401"] +"src/spec/create_extension_spec.py" = ["T201"] + +[tool.ruff.lint.mccabe] +max-complexity = 17 diff --git a/requirements-min.txt b/requirements-min.txt index b99b50e..e104c04 100644 --- a/requirements-min.txt +++ b/requirements-min.txt @@ -1,3 +1,6 @@ -pynwb -git+https://github.com/catalystneuro/ndx-ophys-devices.git@main#egg=ndx-ophys-devices - +# minimum versions of package dependencies for installation +# these should match the minimum versions specified in pyproject.toml +# NOTE: it may be possible to relax these minimum requirements +pynwb==2.8.0 +hdmf==3.14.1 +ndx-ophys-devices==0.1.0