Skip to content

Commit

Permalink
intersphinx_registry, tomlsort, bump py min
Browse files Browse the repository at this point in the history
  • Loading branch information
sappelhoff committed Nov 18, 2024
1 parent 1649639 commit 9379d40
Show file tree
Hide file tree
Showing 12 changed files with 96 additions and 76 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/python_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
branches: [main]
pull_request:
branches: [main]
create:
branches: [main]
tags: ['**']
schedule:
- cron: "0 4 1 * *"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
branches: [main]
pull_request:
branches: [main]
create:
branches: [main]
tags: ['**']
schedule:
- cron: "0 4 1 * *"

Expand All @@ -21,8 +18,16 @@ jobs:
strategy:
fail-fast: false
matrix:
platform: [ubuntu-22.04, ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.12"]
mne-version: [mne-stable]

include:
# special test runs running only on single CI systems to save resources
# Test development versions
- platform: ubuntu-latest
python-version: "3.12"
mne-version: mne-main

env:
TZ: Europe/Berlin
Expand All @@ -44,9 +49,9 @@ jobs:
python -m pip install -e .[dev]
- name: install MNE-Python main
if: "matrix.platform == 'ubuntu-22.04'"
if: matrix.mne-version == 'mne-main'
run: |
pip install -U git+https://github.com/mne-tools/mne-python
pip install -U https://github.com/mne-tools/mne-python/archive/refs/heads/main.zip
- name: Display versions and environment information
run: |
Expand All @@ -57,10 +62,9 @@ jobs:
mne sys_info
- name: Check formatting
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.python-version == '3.11' }}
run: |
make check-manifest
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 )
pre-commit run --all-files
- name: Test with pytest
run: |
Expand All @@ -71,14 +75,13 @@ jobs:
make build-doc
- name: Upload artifacts
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.python-version == '3.11' }}
if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12' }}
uses: actions/upload-artifact@v4
with:
name: docs-artifact
path: docs/_build/html

- name: Upload coverage report
if: ${{ matrix.platform == 'ubuntu-22.04' && matrix.python-version == '3.11' }}
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,9 @@ repos:
- id: ruff
args: [ --fix ]
- id: ruff-format

- repo: https://github.com/pappasam/toml-sort
rev: v0.23.1
hooks:
- id: toml-sort-fix
files: pyproject.toml
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
version: 2

build:
os: ubuntu-22.04
os: ubuntu-lts-latest
tools:
python: "3.11"
python: "3.12"

sphinx:
configuration: docs/conf.py
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2018-2023, pybv developers
Copyright (c) 2018, pybv developers
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ as hosted by Brain Products.
Installation
============

``pybv`` runs on Python version 3.8 or higher.
``pybv`` runs on Python version 3.9 or higher.

``pybv``'s only dependency is ``numpy``.
However, we currently recommend that you install MNE-Python for reading BrainVision data.
Expand Down
10 changes: 10 additions & 0 deletions docs/authors.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _Adam Li: https://adam2392.github.io/
.. _Aniket Pradhan: http://home.iiitd.edu.in/~aniket17133/
.. _Chris Holdgraf: https://bids.berkeley.edu/people/chris-holdgraf
.. _Clemens Brunner: https://cbrnr.github.io/
.. _Felix Klotzsche: https://github.com/eioe
.. _Phillip Alday: https://palday.bitbucket.io/
.. _Pierre Cutellic: https://github.com/compmonks
.. _Richard Höchenberger: https://hoechenberger.net/
.. _Stefan Appelhoff: http://stefanappelhoff.com/
.. _Tristan Stenner: https://github.com/tstenner
13 changes: 2 additions & 11 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,6 @@ People who contributed to this software across releases (in **alphabetical order
- `Stefan Appelhoff`_
- `Tristan Stenner`_

.. _Chris Holdgraf: https://bids.berkeley.edu/people/chris-holdgraf
.. _Stefan Appelhoff: http://stefanappelhoff.com/
.. _Tristan Stenner: https://github.com/tstenner
.. _Phillip Alday: https://palday.bitbucket.io/
.. _Clemens Brunner: https://cbrnr.github.io/
.. _Richard Höchenberger: https://hoechenberger.net/
.. _Adam Li: https://adam2392.github.io/
.. _Aniket Pradhan: http://home.iiitd.edu.in/~aniket17133/
.. _Pierre Cutellic: https://github.com/compmonks
.. _Felix Klotzsche: https://github.com/eioe

.. _changelog:

=========
Expand Down Expand Up @@ -186,3 +175,5 @@ Changelog
~~~~~~~~~
- Initial import from `philistine <https://pypi.org/project/philistine/>`_ package by `Phillip Alday`_
and removing dependency on MNE-Python, by `Chris Holdgraf`_, and `Stefan Appelhoff`_

.. include:: authors.rst
18 changes: 12 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import sys
from datetime import date

from intersphinx_registry import get_intersphinx_mapping

import pybv

curdir = os.path.dirname(__file__)
Expand Down Expand Up @@ -45,7 +47,8 @@

# General information about the project.
project = "pybv"
copyright = f"2018-{date.today().year}, pybv developers" # noqa:A001
today = date.today().isoformat()
copyright = f"2018, pybv developers. Last updated on {today}" # noqa: A001
author = "pybv developers"
version = pybv.__version__
release = version
Expand Down Expand Up @@ -78,9 +81,12 @@
}

# When functions from other packages are mentioned, link to them
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"mne": ("https://mne.tools/dev/", None),
"numpy": ("https://numpy.org/devdocs", None),
}
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = get_intersphinx_mapping(
packages={
"python",
"mne",
"numpy",
}
)
intersphinx_timeout = 10
3 changes: 2 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
:hidden:
:glob:

*
api.rst
changelog.rst
84 changes: 45 additions & 39 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,67 +1,73 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
requires = ["setuptools"]

[project]
name = "pybv"
authors = [
{name = "pybv developers"},
{name = "pybv developers"},
]
maintainers = [
{name = "Stefan Appelhoff", email = "[email protected]"},
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering",
"Topic :: Software Development",
]
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",
"numpy >= 1.18.1",
]
description = "pybv - a lightweight I/O utility for the BrainVision data format"
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",
keywords = ["Brain Products", "BrainVision", "eeg", "vhdr", "vmrk"]
license = {file = "LICENSE"}
maintainers = [
{email = "[email protected]", name = "Stefan Appelhoff"},
]
name = "pybv"
readme = "README.rst"
requires-python = ">=3.9"

[project.optional-dependencies]
dev = [
"check-manifest",
"mne",
"numpydoc",
"pre-commit",
"pytest",
"pytest-cov",
"pytest-sugar",
"ruff",
"sphinx",
"sphinx-copybutton",
"check-manifest",
"intersphinx_registry",
"mne",
"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"
Repository = "https://github.com/bids-standard/pybv"

[tool.ruff.lint]
select = ["A", "B006", "D", "E", "F", "I", "W", "UP"]
ignore = ["D203", "D213"]
select = ["A", "B006", "D", "E", "F", "I", "UP", "W"]

[tool.setuptools.dynamic]
version = {attr = "pybv.__version__"}

[tool.setuptools.packages.find]
exclude = ["docs", "specification"]

[tool.tomlsort]
all = true
ignore_case = true
spaces_before_inline_comment = 2
trailing_comma_inline_array = true

0 comments on commit 9379d40

Please sign in to comment.