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

Switch build backend to hatchling #825

Merged
merged 4 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- run:
name: Get Python running
command: |
pip install --upgrade --progress-bar off pip setuptools
pip install --upgrade --progress-bar off pip
pip install --upgrade --progress-bar off "autoreject @ https://api.github.com/repos/autoreject/autoreject/zipball/master" "mne[hdf5] @ git+https://github.com/mne-tools/mne-python@main" "mne-bids[full] @ https://api.github.com/repos/mne-tools/mne-bids/zipball/main" numba
pip install -ve .[tests]
pip install "PyQt6!=6.6.1" "PyQt6-Qt6!=6.6.1"
Expand Down
4 changes: 4 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
4 changes: 2 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- run: pip install --upgrade setuptools[toml] pip
- run: pip install --no-build-isolation -ve .[tests]
- run: pip install --upgrade pip
- run: pip install -ve .[tests]
- run: pytest mne_bids_pipeline -m "not dataset_test"
- uses: codecov/codecov-action@v3
if: success()
Expand Down
2 changes: 2 additions & 0 deletions docs/source/changes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{% include-markdown "./v1.6.md.inc" %}

{% include-markdown "./v1.5.md.inc" %}

{% include-markdown "./v1.4.md.inc" %}
Expand Down
23 changes: 23 additions & 0 deletions docs/source/v1.6.md.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[//]: # (Don't forget to add this to changes.md as an include!)

## vX.Y.0 (unreleased)

[//]: # (### :new: New features & enhancements)

[//]: # (- Whatever (#000 by @whoever))

[//]: # (### :warning: Behavior changes)

[//]: # (- Whatever (#000 by @whoever))

### :package: Requirements

- MNE-BIDS-Pipeline now requires Python 3.9 or newer. (#825 by @hoechenberger)

[//]: # (### :bug: Bug fixes)

[//]: # (- Whatever (#000 by @whoever))

### :medical_symbol: Code health

- The package build backend has been switched from `setuptools` to `hatchling`. (#825 by @hoechenberger)
6 changes: 5 additions & 1 deletion docs/source/vX.Y.md.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@

[//]: # (- Whatever (#000 by @whoever))

[//]: # (### :medical_symbol: Code health)
[//]: # (### :package: Requirements)

[//]: # (- Whatever (#000 by @whoever))

[//]: # (### :bug: Bug fixes)

[//]: # (- Whatever (#000 by @whoever))

[//]: # (### :medical_symbol: Code health)

[//]: # (- Whatever (#000 by @whoever))
150 changes: 76 additions & 74 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,78 +1,79 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "mne-bids-pipeline"
# Keep in sync with README.md:
description = "A full-flegded processing pipeline for your MEG and EEG data"
readme = "README.md"
requires-python = ">=3.8"
license = {file = "LICENSE.txt"}
requires-python = ">=3.9"
license = { file = "LICENSE.txt" }
keywords = ["science", "neuroscience", "psychology"]
authors = [
{name = "Eric Larson"},
{name = "Alexandre Gramfort"},
{name = "Mainak Jas"},
{name = "Richard Höchenberger", email = "[email protected]"},
{ name = "Eric Larson" },
{ name = "Alexandre Gramfort" },
{ name = "Mainak Jas" },
{ name = "Richard Höchenberger", email = "[email protected]" },
]
classifiers = [
"Intended Audience :: Science/Research",
"Programming Language :: Python"
"Programming Language :: Python",
]
dependencies = [
"typing_extensions; python_version < '3.8'",
"importlib_metadata; python_version < '3.8'",
"psutil", # for joblib
"packaging",
"numpy",
"scipy",
"matplotlib",
"nibabel",
"joblib >= 0.14",
"threadpoolctl",
"dask[distributed]",
"bokeh < 3", # for distributed dashboard
"jupyter-server-proxy", # to have dask and jupyter working together
"scikit-learn",
"pandas",
"seaborn",
"json_tricks",
"pydantic >= 2.0.0",
"rich",
"python-picard",
"qtpy",
"pyvista",
"pyvistaqt",
"openpyxl",
"autoreject",
"mne[hdf5] >=1.2",
"mne-bids[full]",
"filelock",
"setuptools >=65",
"psutil", # for joblib
"packaging",
"numpy",
"scipy",
"matplotlib",
"nibabel",
"joblib >= 0.14",
"threadpoolctl",
"dask[distributed]",
"bokeh < 3", # for distributed dashboard
"jupyter-server-proxy", # to have dask and jupyter working together
"scikit-learn",
"pandas",
"seaborn",
"json_tricks",
"pydantic >= 2.0.0",
"rich",
"python-picard",
"qtpy",
"pyvista",
"pyvistaqt",
"openpyxl",
"autoreject",
"mne[hdf5] >=1.2",
"mne-bids[full]",
"filelock",
]
dynamic = ["version"]

[project.optional-dependencies]
tests = [
"pytest",
"pytest-cov",
"pooch",
"psutil",
"datalad",
"ruff",
"mkdocs",
"mkdocs-material >= 9.0.4",
"mkdocs-material-extensions",
"mkdocs-macros-plugin",
"mkdocs-include-markdown-plugin",
"mkdocs-exclude",
"mkdocstrings-python",
"mike",
"jinja2",
"black", # function signature formatting
"livereload",
"openneuro-py >= 2022.2.0",
"httpx >= 0.20",
"tqdm",
"Pygments",
"pyyaml",
"pytest",
"pytest-cov",
"pooch",
"psutil",
"datalad",
"ruff",
"mkdocs",
"mkdocs-material >= 9.0.4",
"mkdocs-material-extensions",
"mkdocs-macros-plugin",
"mkdocs-include-markdown-plugin",
"mkdocs-exclude",
"mkdocstrings-python",
"mike",
"jinja2",
"black", # function signature formatting
"livereload",
"openneuro-py >= 2022.2.0",
"httpx >= 0.20",
"tqdm",
"Pygments",
"pyyaml",
]

[project.scripts]
Expand All @@ -83,19 +84,22 @@ homepage = "https://mne.tools/mne-bids-pipeline"
repository = "https://github.com/mne-tools/mne-bids-pipeline"
changelog = "http://mne.tools/mne-bids-pipeline/changes.html"

[build-system]
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
tag_regex = "^(?P<prefix>v)?(?P<version>[0-9.]+)(?P<suffix>.*)?$"
version_scheme = "release-branch-semver"
[tool.hatch.version]
source = "vcs"
raw-options = { version_scheme = "release-branch-semver" }

[tool.setuptools.packages.find]
exclude = ["false"] # on CircleCI this folder appears during pip install -ve. for an unknown reason

[tool.setuptools.package-data]
"mne_bids_pipeline.steps.freesurfer.contrib" = ["version"]
[tool.hatch.build]
exclude = [
"/.*",
"/codecov.yml",
"**/tests",
"/docs",
"/docs/source/examples/gen_examples.py", # specify explicitly because its exclusion is negated in .gitignore
"/Makefile",
"/BUILDING.md",
"/CONTRIBUTING.md",
"ignore_words.txt",
]

[tool.codespell]
skip = "docs/site/*,*.html,steps/freesurfer/contrib/*"
Expand All @@ -108,13 +112,11 @@ count = ""

[tool.pytest.ini_options]
addopts = "-ra -vv --tb=short --cov=mne_bids_pipeline --cov-report= --junit-xml=junit-results.xml --durations=10"
testpaths = [
"mne_bids_pipeline",
]
testpaths = ["mne_bids_pipeline"]
junit_family = "xunit2"

[tool.ruff]
exclude = ["**/freesurfer/contrib", "dist/" , "build/"]
exclude = ["**/freesurfer/contrib", "dist/", "build/"]

[tool.black]
exclude = "(.*/freesurfer/contrib/.*)|(dist/)|(build/)"
Loading