Skip to content
Open
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
48 changes: 48 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Publish to PyPI

# Workflow runs a release job on every published tag.
on:
release:
types: [published]

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "release"
cancel-in-progress: false

env:
UV_SYSTEM_PYTHON: true

jobs:
release:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/mpes
permissions:
id-token: write

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

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

- name: Install dependencies
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install build
- name: Build package
run: |
git reset --hard HEAD
python -m build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
File renamed without changes.
6 changes: 4 additions & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
include README.md
include requirements.txt
prune *
exclude *
recursive-include mpes *.py
include pyproject.toml README.md
15 changes: 5 additions & 10 deletions mpes/fprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from .visualization import grid_histogram
from . import utils as u, bandstructure as bs, base as b
from . import dask_tps as tpsd
import igor.igorpy as igor
import pandas as pd
import os
import re
Expand Down Expand Up @@ -330,11 +329,7 @@ def readIgorBinFile(fdir, **kwds):
errmsg = "Error in file loading, please check the file format."

if ftype == 'pxp':

try:
igfile = igor.load(fdir)
except IOError:
print(errmsg)
raise NotImplementedError("PXP file format is not supported.")

elif ftype == 'ibw':

Expand Down Expand Up @@ -970,11 +965,11 @@ def saveDict(dct={}, processor=None, dictname='', form='h5', save_addr='./histog
raise NotImplementedError('The output format is undefined for data \
with higher than three dimensions!')

elif form == 'ibw': # Save as Igor wave
# elif form == 'ibw': # Save as Igor wave

from igorwriter import IgorWave
wave = IgorWave(dct[bdn], name=bdn)
wave.save(save_addr)
# from igorwriter import IgorWave
# wave = IgorWave(dct[bdn], name=bdn)
# wave.save(save_addr)

else:
raise NotImplementedError('Not implemented output format!')
Expand Down
107 changes: 107 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
[build-system]
requires = ["setuptools>=64.0.1", "setuptools-scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
packages = ["mpes"]

[tool.setuptools_scm]

[project]
name = "mpes"
dynamic = ["version"]
authors = [
{name = "R. Patrick Xian, Laurenz Rettig"},
]
description = "Distributed data processing routines for multidimensional photoemission spectroscopy (MPES)"
readme = "README.md"
license-files = ["LICENSE"]
requires-python = ">=3.9,<3.13"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
]
dependencies = [
"numpy<2.0",
"pandas",
"scipy",
"matplotlib",
"bokeh<3.0.0",
"scikit-image",
"nose",
"lmfit",
"h5py>=2.9.0",
"dask[dataframe]",
"fastparquet",
"tqdm",
"natsort",
"funcy",
"imageio",
"numba",
"opencv-python",
"xarray",
"astropy",
"photutils<2.0",
"symmetrize",
"silx",
"deepdish",
"fastdtw",
"threadpoolctl",
]

[project.urls]
Homepage = "https://github.com/mpes-kit/mpes"

[project.optional-dependencies]
dev = [
"ruff>=0.1.7",
"mypy>=1.6.0",
"pre-commit>=3.0.0",
"coverage",
"sphinx",
]

examples = [
"ipywidgets",
"ipykernel",
]

[tool.pydocstyle]
convention = "google"

[tool.coverage.report]
exclude_lines = [
"raise NotImplementedError",
"pragma: no cover",
]

[tool.ruff]
include = ["src/*.py", "tests/*.py"]
lint.select = [
"E", # pycodestyle
"W", # pycodestyle
"PL", # pylint
"F841", # unused variable
"F401", # unused imports
"ARG", # unused arguments
]
lint.ignore = [
"E701", # Multiple statements on one line (colon)
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0913", # Too many arguments in function definition
"PLR0915", # Too many statements
"PLR2004", # Magic value used instead of constant
"PLR5501", # else-if-used
"PLW2901", # redefined-loop-name
]
lint.fixable = ["ALL"]
line-length = 120 # change the default line length number or characters.

[tool.mypy]
strict = false
ignore_missing_imports = true
follow_imports = "silent"
no_strict_optional = true
disable_error_code = "import, annotation-unchecked"
30 changes: 0 additions & 30 deletions requirements.txt

This file was deleted.

6 changes: 0 additions & 6 deletions setup.cfg

This file was deleted.

41 changes: 0 additions & 41 deletions setup.py

This file was deleted.