Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into replace_matmul_with_at
Browse files Browse the repository at this point in the history
  • Loading branch information
tsbinns committed Jun 12, 2024
2 parents f4d11b4 + 72598dd commit fc5b550
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 44 deletions.
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.

53 changes: 53 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build
on:
release:
types: [published]
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: read

jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[build]
- name: Build package
run: python -m build --sdist --wheel
- name: Check package
run: twine check --strict dist/*
- name: Check env vars
run: |
echo "Triggered by: ${{ github.event_name }}"
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist

# PyPI on release
pypi:
needs: package
runs-on: ubuntu-latest
if: github.event_name == 'release'
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repos:
# Ruff mne_connectivity
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.7
rev: v0.4.8
hooks:
- id: ruff
name: ruff lint mne_connectivity
Expand All @@ -10,7 +10,7 @@ repos:

# Ruff tutorials and examples
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.7
rev: v0.4.8
hooks:
- id: ruff
name: ruff lint tutorials and examples
Expand Down Expand Up @@ -52,4 +52,4 @@ repos:
- id: toml-sort-fix

ci:
autofix_prs: false
autofix_prs: true
2 changes: 2 additions & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ rules:
line-length: disable
document-start: disable
truthy: disable
new-lines:
type: platform
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

0 comments on commit fc5b550

Please sign in to comment.