Skip to content
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
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Upload a Python Package using Twine when a release is created

name: Build
on: # yamllint disable-line rule:truthy
release:
types: [published]
push:
branches: ["main"]
pull_request:
branches: ["main"]

permissions:
contents: read

jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-python@v5
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- run: python -m build --sdist --wheel
- run: twine check --strict dist/*
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist

pypi-upload:
needs: package
runs-on: ubuntu-latest
if: github.event_name == 'release'
permissions:
id-token: write # for trusted publishing
environment:
name: pypi
url: https://pypi.org/p/curryreader
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
if: github.event_name == 'release'
71 changes: 71 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
[build-system]
build-backend = "hatchling.build"
requires = ["hatch-vcs", "hatchling"]

[project]
authors = [
{email = "fgasca@neuroscan.com", name = "Fernando Gasca"},
]
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved",
'Topic :: Software Development',
'Topic :: Scientific/Engineering',
"Operating System :: OS Independent",
]
dependencies = [
"certifi>=2020.6.20",
"cycler>=0.10.0",
"kiwisolver>=1.2.0",
"matplotlib>=3.3.2",
"numpy>=1.19.2",
"Pillow>=8.0.1",
"pip>=21.0.1",
"pyparsing>=2.4.7",
"python-dateutil>=2.8.1",
"setuptools>=50.3.2",
"six>=1.15.0",
]
description = "File reader for Compumedics Neuroscan data formats (.cdt, .dat)."
dynamic = ["version"]
keywords = [
"brain",
"EEG",
"MEG",
"neuroimaging",
"neuroscience",
]
license = {text = "BSD-3-Clause"}
maintainers = [{email = "dan@mccloy.info", name = "Dan McCloy"}]
name = "curryreader"
readme = {content-type = "text/markdown", file = "README.md"}
requires-python = ">= 3.7"

[project.urls]
"Bug Tracker" = "https://github.com/mne-tools/curry-python-reader/issues/"
Documentation = "https://github.com/mne-tools/curry-python-reader/README.md"
Download = "https://pypi.org/project/curryreader/#files"
Forum = "https://mne.discourse.group/"
"Source Code" = "https://github.com/mne-tools/curry-python-reader/"

[tool.hatch.build]
exclude = [
"/*.pyproj",
"/*.sln",
"/*.toml",
"/*.txt",
"/.*",
"/test_data",
"/setup.py",
"/curryreader_test.py",
] # tracked by git, but we don't want to ship those files

[tool.hatch.version]
raw-options = {version_scheme = "release-branch-semver"}
source = "vcs"

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