diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 40624ab..c46d5b0 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -20,8 +20,7 @@ Then, in your Python environment follow these steps: ```Shell git clone https://github.com/USERNAME/pybv cd pybv -pip install -r requirements-dev.txt -pip install -e . +pip install -e ".[dev]" pre-commit install ``` diff --git a/.github/workflows/python_tests.yml b/.github/workflows/python_tests.yml index 400b777..acfe8ba 100644 --- a/.github/workflows/python_tests.yml +++ b/.github/workflows/python_tests.yml @@ -41,8 +41,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install -r requirements-dev.txt - python -m pip install -e . + python -m pip install -e ".[dev]"" - name: install MNE-Python main if: "matrix.platform == 'ubuntu-22.04'" diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 2cf2516..839e9da 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -16,5 +16,4 @@ python: - method: pip path: . extra_requirements: - - export - - requirements: docs/requirements-rtd.txt + - dev diff --git a/MANIFEST.in b/MANIFEST.in index e9d5940..4a2f8ad 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,6 @@ include MANIFEST.in include README.rst include LICENSE -include requirements-dev.txt include CITATION.cff include .mailmap diff --git a/docs/requirements-rtd.txt b/docs/requirements-rtd.txt deleted file mode 100644 index e0a8f5e..0000000 --- a/docs/requirements-rtd.txt +++ /dev/null @@ -1 +0,0 @@ --r ../requirements-dev.txt diff --git a/pyproject.toml b/pyproject.toml index e4b728b..2e412a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,71 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "pybv" +authors = [ + {name = "pybv developers"}, +] +maintainers = [ + {name = "Stefan Appelhoff", email = "stefan.appelhoff@mailbox.org"}, +] +description = "pybv – a lightweight I/O utility for the BrainVision data format" +keywords = ["Brain Products", "BrainVision", "vhdr", "vmrk", "eeg"] +readme = "README.rst" +license = {file = "LICENSE"} +requires-python = ">=3.8" +dependencies = [ + "numpy >= 1.18.1", +] +dynamic = ["version"] +classifiers = [ + "Topic :: Scientific/Engineering", + "Intended Audience :: Science/Research", + "Intended Audience :: Developers", + "License :: OSI Approved", + "Topic :: Software Development", + "Topic :: Scientific/Engineering", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX :: Linux", + "Operating System :: MacOS", + "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", +] + +[project.optional-dependencies] +full = [ + "mne >= 1.0", +] + +dev = [ + "pybv[full]", + "check-manifest", + "numpydoc", + "pre-commit", + "pytest", + "pytest-cov", + "pytest-sugar", + "ruff", + "sphinx", + "sphinx-copybutton", +] + +[project.urls] +Documentation = "https://pybv.readthedocs.io" +Repository = "https://github.com/bids-standard/pybv" +Issues = "https://github.com/bids-standard/pybv/issues" + [tool.ruff.lint] select = ["A", "B006", "D", "E", "F", "I", "W", "UP"] ignore = ["D203", "D213"] + +[tool.setuptools.dynamic] +version = {attr = "pybv.__version__"} + +[tool.setuptools.packages.find] +exclude = ["docs", "specification"] diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 14bebf7..0000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,11 +0,0 @@ -numpy>=1.18.1 -mne>=1.0 -check-manifest -pytest -pytest-cov -pytest-sugar -ruff -sphinx -sphinx-copybutton -numpydoc -pre-commit diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 3bbbd3f..0000000 --- a/setup.cfg +++ /dev/null @@ -1,56 +0,0 @@ -[metadata] -name = pybv -url = https://github.com/bids-standard/pybv -download_url = https://github.com/bids-standard/pybv -author = pybv developers -maintainer = Stefan Appelhoff -maintainer_email = stefan.appelhoff@mailbox.org -description = pybv -- A lightweight I/O utility for the BrainVision data format. -keywords = Brain Products, BrainVision, vhdr, vmrk, eeg -long_description = file: README.rst -long_description_content_type = text/x-rst -license = BSD-3-Clause -license_files = LICENSE -platforms = any -classifiers = - Topic :: Scientific/Engineering - Intended Audience :: Science/Research - Intended Audience :: Developers - License :: OSI Approved - Topic :: Software Development - Topic :: Scientific/Engineering - Operating System :: Microsoft :: Windows - Operating System :: POSIX :: Linux - Operating System :: MacOS - 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 -project_urls = - Documentation = https://pybv.readthedocs.io - Bug Reports = https://github.com/bids-standard/pybv/issues - Source = https://github.com/bids-standard/pybv - -[options] -python_requires = ~= 3.8 -install_requires = - numpy >= 1.18.1 -packages = find: -include_package_data = True - -[options.packages.find] -include = - pybv - pybv.tests -exclude = - specification - docs - -[options.extras_require] -export = - mne >= 1.0 - -[bdist_wheel] -universal = true diff --git a/setup.py b/setup.py deleted file mode 100644 index 0803ccc..0000000 --- a/setup.py +++ /dev/null @@ -1,29 +0,0 @@ -"""Setup pybv.""" - -import os -import sys - -from setuptools import setup - -# Give setuptools a hint to complain if it's too old a version -SETUP_REQUIRES = ["setuptools >= 46.4.0"] -# This enables setuptools to install wheel on-the-fly -SETUP_REQUIRES += ["wheel"] if "bdist_wheel" in sys.argv else [] - -# get the version -version = None -with open(os.path.join("pybv", "__init__.py")) as fid: - for line in (line.strip() for line in fid): - if line.startswith("__version__"): - version_str = line.split("=")[1].strip() - # strip " or ', depending on what was used - version = version_str.strip(version_str[0]) - break -if version is None: - raise RuntimeError("Could not determine version from __init__.py") - -if __name__ == "__main__": - setup( - version=version, - setup_requires=SETUP_REQUIRES, - )