Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swap to pyproject.toml setup #507

Merged
merged 15 commits into from
Sep 17, 2024
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Upcoming

### Improvements
* Swapped setup approach to the modern `pyproject.toml` standard. [#507](https://github.com/NeurodataWithoutBorders/nwbinspector/issues/507)



# v0.5.2

### Deprecation (API)
Expand Down
23 changes: 23 additions & 0 deletions docs/.readthedocs.yaml
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied over these two RTD files to start a smooth transition to keeping the files there instead of the outer level to reduce clutter

It works fine as long as the settings on the RTD admin page are adjusted, which is why I will wait until after this PR is merged to do that and then remove the files still at the outer level (so it doesn't break on the other current PRs)

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-20.04
tools:
python: "3.9"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
fail_on_warning: true

# Python requirements required to build your docs
python:
install:
- requirements: requirements-rtd.txt
- method: pip
path: .
7 changes: 7 additions & 0 deletions docs/requirements-rtd.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
numpy
jsonschema==3.2.0
Jinja2>=3.1.3
sphinx==5.1.1
sphinx_rtd_theme==0.5.1
readthedocs-sphinx-search==0.3.2
sphinx-copybutton==0.5.0
64 changes: 64 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,67 @@
[build-system]
requires = ["setuptools>=64"]
build-backend = "setuptools.build_meta"

[project]
name = "nwbinspector"
version = "0.6.0"
CodyCBakerPhD marked this conversation as resolved.
Show resolved Hide resolved
description = "Tool to inspect NWB files for best practices compliance."
readme = "README.md"
authors = [
{name = "Cody Baker"},
{name = "Steph Prince"},
{name = "Szonja Weigl"},
{name = "Heberto Mayorquin"},
{name = "Paul Adkisson"},
{name = "Luiz Tauffer"},
{name = "Ben Dichter", email = "[email protected]"}
]
urls = { "Homepage" = "https://github.com/NeurodataWithoutBorders/nwbinspector" }
license = {file = "license.txt"}
keywords = ["nwb"]
classifiers = [
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
"License :: OSI Approved :: BSD License",
]
requires-python = ">=3.9"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also removes Python 3.8 support, which ends its security upgrades next month

dependencies = [
"pynwb",
CodyCBakerPhD marked this conversation as resolved.
Show resolved Hide resolved
"hdmf-zarr",
"fsspec",
"s3fs",
"requests",
"aiohttp",
"PyYAML",
"jsonschema",
"packaging",
"natsort",
"click",
"tqdm",
"isodate",
"numpy>=1.22.0,<2.0.0" # TODO: remove 2.0 bound when HDMF supports
CodyCBakerPhD marked this conversation as resolved.
Show resolved Hide resolved
]

[project.optional-dependencies]
dandi = [
"dandi",
"remfile",
]

[tool.setuptools.packages.find]
where = ["src"]

[project.scripts]
nwbinspector = "nwbinspector._nwbinspector_cli:_nwbinspector_cli"



[tool.black]
line-length = 120
target-version = ['py37']
Expand Down
15 changes: 0 additions & 15 deletions requirements.txt

This file was deleted.

13 changes: 0 additions & 13 deletions setup.cfg

This file was deleted.

49 changes: 0 additions & 49 deletions setup.py

This file was deleted.

5 changes: 5 additions & 0 deletions src/nwbinspector/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import importlib.metadata

from ._version import __version__
from ._registration import available_checks, register_check
from ._types import Importance, Severity, InspectorMessage
Expand All @@ -23,6 +25,9 @@

default_check_registry = {check.__name__: check for check in available_checks}

# Still keeping the legacy magic version attribute requested by some users
__version__ = importlib.metadata.version(distribution_name="nwbinspector")

__all__ = [
"available_checks",
"default_check_registry",
Expand Down
1 change: 0 additions & 1 deletion src/nwbinspector/_version.py

This file was deleted.

Loading