Skip to content

Commit

Permalink
Merge pull request #3 from mscheltienne/dev
Browse files Browse the repository at this point in the history
Add RawANT python object for MNE
  • Loading branch information
Mathieu Scheltienne authored Aug 14, 2024
2 parents e2b3155 + b57eb91 commit 1f84b72
Show file tree
Hide file tree
Showing 39 changed files with 955 additions and 1,018 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pypa/[email protected]
env:
CIBW_TEST_SKIP: "{*macosx*,*win*}"
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-native
name: cibw-wheels-${{ matrix.os }}-native-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

cibuildwheel_emulated_cross: # separate out because it's slower and not tested separately
Expand All @@ -42,23 +44,23 @@ jobs:
- os: ubuntu-latest
arch: aarch64
- os: windows-latest
arch: ARM64
arch: ARM64 # upper-case needed
name: build wheels on ${{ matrix.os }} ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Setup emulation on Linux
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
if: runner.os == 'Linux'
- uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.arch }}
# https://cibuildwheel.pypa.io/en/stable/faq/#windows-arm64
CIBW_TEST_SKIP: "*-win_arm64"
CIBW_BEFORE_BUILD_WINDOWS: bash ./.github/workflows/cibw_before_build_windows_cross.sh
CIBW_BEFORE_BUILD_WINDOWS: bash ./tools/cibw_before_build_windows_cross.sh
CIBW_BUILD_VERBOSITY: 3
CIBW_TEST_SKIP: "*-win_arm64"
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ strategy.job-index }}
Expand All @@ -72,7 +74,7 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-latest]
python: ["3.9", "3.12"]
name: test wheels on ${{ matrix.os }} ${{ matrix.python }}
name: test wheels on ${{ matrix.os }} - py${{ matrix.python }}
runs-on: ${{ matrix.os }}
defaults:
run:
Expand All @@ -89,8 +91,11 @@ jobs:
path: dist
- run: ls -alt . && ls -alt dist/
- run: pip install --only-binary antio antio[test] --find-links dist
- run: antio sys-info --developer
- run: pytest tests/ --cov=antio --cov-report=xml
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

sdist:
timeout-minutes: 10
Expand All @@ -111,7 +116,7 @@ jobs:
check:
needs: [cibuildwheel, cibuildwheel_emulated_cross, sdist]
timeout-minutes: 10
name: check dist/*
name: run twine check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![codecov](https://codecov.io/gh/mscheltienne/antio/graph/badge.svg?token=ebC07d0dyM)](https://codecov.io/gh/mscheltienne/antio)
[![unittests](https://github.com/mscheltienne/antio/actions/workflows/build.yaml/badge.svg?branch=main)](https://github.com/mscheltienne/antio/actions/workflows/build.yaml)
[![ci](https://github.com/mscheltienne/antio/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/mscheltienne/antio/actions/workflows/ci.yaml)

# ANT I/O

Expand Down
12 changes: 3 additions & 9 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,10 @@ version = '0.1.0'

[project.optional-dependencies]
all = [
'antio[build]',
'antio[mne]',
'antio[style]',
'antio[test]',
]
build = [
'build',
'cibuildwheel',
'setuptools>= 64.0.0',
'twine',
]
full = [
'antio[all]',
]
Expand All @@ -69,6 +62,7 @@ style = [
'yamllint',
]
test = [
'antio[mne]',
'pytest-cov',
'pytest>=8.0',
]
Expand All @@ -87,7 +81,7 @@ build = "cp312-*"
skip = "*musllinux*"
archs = "native"
test-command = "pytest {project}/tests"
test-extras = ["mne", "test"]
test-extras = ["test"]

[tool.cibuildwheel.linux]
repair-wheel-command = [
Expand Down Expand Up @@ -128,7 +122,6 @@ omit = [
'**/__init__.py',
'**/conftest.py',
'**/antio/_version.py',
'**/antio/utils/_fixes.py',
]

[tool.isort]
Expand All @@ -149,6 +142,7 @@ match-dir = '^.*antio.*'
addopts = ['--color=yes', '--cov-report=', '--durations=20', '--junit-xml=junit-results.xml', '--strict-config', '--tb=short', '-ra', '-v']
filterwarnings = [
"error",
"ignore:.*interactive_bk.*:matplotlib._api.deprecation.MatplotlibDeprecationWarning",
]
junit_family = 'xunit2'
minversion = '8.0'
Expand Down
24 changes: 12 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,24 +36,24 @@ def run(self):
# (no way to use before-build to inject env vars back to the env)
check_env = os.environ
if "GITHUB_ENV" in check_env:
print("Using GITHUB_ENV instead of os.environ:")
print("Using GITHUB_ENV instead of os.environ:") # noqa: T201
check_env = dict(
line.split("=", maxsplit=1)
for line in Path(
os.environ["GITHUB_ENV"]
).read_text("utf-8").splitlines()
for line in Path(os.environ["GITHUB_ENV"])
.read_text("utf-8")
.splitlines()
if "=" in line
)
pprint.pprint(check_env)
pprint.pprint(check_env) # noqa: T203
with TemporaryDirectory() as build_dir: # str
args = [
"cmake",
"-S",
str(src_dir),
"-B",
build_dir,
"-DCMAKE_BUILD_TYPE=Release",
f"-DPython3_EXECUTABLE={sys.executable}",
"cmake",
"-S",
str(src_dir),
"-B",
build_dir,
"-DCMAKE_BUILD_TYPE=Release",
f"-DPython3_EXECUTABLE={sys.executable}",
]
for key in (
"CMAKE_GENERATOR",
Expand Down
1 change: 0 additions & 1 deletion src/antio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from . import libeep, utils
from ._version import __version__
from .utils.config import sys_info
from .utils.logs import add_file_handler, set_log_level
Loading

0 comments on commit 1f84b72

Please sign in to comment.