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

MAINT: Switch to setuptools_scm for version #200

Merged
merged 2 commits into from
Jun 12, 2024
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
3 changes: 3 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
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
32 changes: 0 additions & 32 deletions .github/workflows/publish_release.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
needs: package
runs-on: ubuntu-latest
if: github.event_name == 'release'
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,4 @@ repos:
- id: toml-sort-fix

ci:
autofix_prs: false
autofix_prs: true
8 changes: 7 additions & 1 deletion mne_connectivity/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
#
# License: BSD (3-clause)

from ._version import __version__ # noqa: F401
try:
from importlib.metadata import version

__version__ = version("mne")
except Exception:
__version__ = "0.0.0"

from .base import (
Connectivity,
EpochConnectivity,
Expand Down
5 changes: 0 additions & 5 deletions mne_connectivity/_version.py

This file was deleted.

8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2", "wheel"]
requires = ["setuptools>=64", "setuptools_scm[toml]>=8", "wheel"]

[project]
classifiers = [
Expand Down Expand Up @@ -29,6 +29,7 @@ dependencies = [
'xarray >= 2023.11.0',
]
description = 'mne-connectivity: A module for connectivity data analysis with MNE.'
dynamic = ["version"]
keywords = [
'connectivity',
'eeg',
Expand All @@ -43,7 +44,6 @@ maintainers = [
name = 'mne-connectivity'
readme = {content-type = "text/x-rst", file = 'README.rst'}
requires-python = '>=3.9'
version = "0.7.0"

[project.optional-dependencies]
all = [
Expand Down Expand Up @@ -136,7 +136,6 @@ branch = true
cover_pylib = false
omit = [
'**/__init__.py',
'**/mne_connectivity/_version.py',
'**/mne_connectivity/conftest.py',
'**/tests/**',
]
Expand Down Expand Up @@ -252,6 +251,9 @@ include-package-data = true
exclude = ['mne_connectivity*tests']
include = ['mne_connectivity*']

[tool.setuptools_scm]
version_scheme = "release-branch-semver"

[tool.tomlsort]
all = true
ignore_case = true
Expand Down
Loading