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
1,180 changes: 0 additions & 1,180 deletions .github/spc-format-updated.md

This file was deleted.

44 changes: 44 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish to PyPI

on:
push:
tags:
- "v*"

jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install build/test tooling
run: |
python -m pip install --upgrade pip
python -m pip install build pytest

- name: Run tests
run: pytest

- name: Build distributions
run: python -m build

- name: Check distributions
run: |
python -m pip install --upgrade twine
python -m twine check dist/*

- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
32 changes: 30 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,48 @@
[build-system]
requires = ["hatchling"]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "spcfile"
version = "0.1.0"
dynamic = ["version"]
description = "GRAMS SPC file reader for Python"
readme = "README.md"
license = { file = "LICENSE" }
classifiers = [
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Intended Audience :: Science/Research",
"Topic :: Scientific/Engineering",
]
requires-python = ">=3.9"
dependencies = ["numpy"]
keywords = ["spc", "spectroscopy", "GRAMS", "file-format"]
authors = [
{ name = "Nikolaj Langemark", email = "nikolaj@longcreek.me" },
]

[project.optional-dependencies]
test = ["pytest"]
dev = [
"build",
"ruff",
"twine",
"pytest",
]

[project.urls]
homepage = "https://github.com/kogens/spcfile"
repository = "https://github.com/kogens/spcfile"

[tool.hatch.build.targets.wheel]
packages = ["spcfile"]

[tool.hatch.version]
source = "vcs"

[tool.ruff]
line-length = 120
Binary file removed tests/data/4d_map.spc
Binary file not shown.
Binary file removed tests/data/ft-ir.spc
Binary file not shown.
Binary file removed tests/data/m_evenz.spc
Binary file not shown.
Binary file removed tests/data/m_ordz.spc
Binary file not shown.
Binary file removed tests/data/m_xyxy.spc
Binary file not shown.
Binary file removed tests/data/ms.spc
Binary file not shown.
Binary file removed tests/data/nir.spc
Binary file not shown.
Binary file removed tests/data/s_evenx.spc
Binary file not shown.
Binary file removed tests/data/s_xy.spc
Binary file not shown.
Loading