Skip to content

Commit

Permalink
Merge pull request #6 from FAIRmat-NFDI/use-multiformat-reader
Browse files Browse the repository at this point in the history
Use multiformat reader
  • Loading branch information
lukaspie authored Aug 14, 2024
2 parents c771ec9 + edf2caa commit 336ccd3
Show file tree
Hide file tree
Showing 13 changed files with 192 additions and 447 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,27 @@ name: linting

on: [push]

env:
UV_SYSTEM_PYTHON: true

jobs:
linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
git submodule sync --recursive
git submodule update --init --recursive --jobs=4
python -m pip install --upgrade pip
- name: Install package
run: |
python -m pip install --no-deps .
- name: Install requirements
run: |
python -m pip install -r dev-requirements.txt
- name: ruff
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install --no-deps .
uv pip install -r dev-requirements.txt
- name: ruff check
run: |
ruff pynxtools_mpes tests
- name: ruff formatting
ruff check pynxtools_mpes tests
- name: ruff format
run: |
ruff format --check pynxtools_mpes tests
- name: mypy
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
pull_request:
branches: [main]

env:
UV_SYSTEM_PYTHON: true

jobs:
pytest:
runs-on: ubuntu-latest
Expand All @@ -18,20 +21,15 @@ jobs:
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python_version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- name: Install package
run: |
pip install ".[dev]"
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install ".[dev]"
- name: Test with pytest
run: |
pytest tests
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.5
hooks:
# Run the linter.
- id: ruff
# Run the formatter.
- id: ruff-format
28 changes: 11 additions & 17 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --extra=dev --output-file=dev-requirements.txt pyproject.toml
#
# This file was autogenerated by uv via the following command:
# uv pip compile --extra=dev --output-file=dev-requirements.txt pyproject.toml
anytree==2.12.1
# via pynxtools
ase==3.22.1
Expand All @@ -27,8 +23,8 @@ fonttools==4.49.0
# via matplotlib
h5py==3.10.0
# via
# pynxtools
# pynxtools-mpes (pyproject.toml)
# pynxtools
importlib-metadata==7.0.1
# via pynxtools
iniconfig==2.0.0
Expand Down Expand Up @@ -67,11 +63,13 @@ pandas==2.2.0
# xarray
pillow==10.0.1
# via matplotlib
pip==24.1.2
# via pip-tools
pip-tools==7.4.0
# via pynxtools-mpes (pyproject.toml)
pluggy==1.4.0
# via pytest
pynxtools==0.4.0
pynxtools==0.6.0
# via pynxtools-mpes (pyproject.toml)
pyparsing==3.1.1
# via matplotlib
Expand All @@ -88,13 +86,13 @@ python-dateutil==2.8.2
pytz==2024.1
# via pandas
pyyaml==6.0.1
# via
# pynxtools
# pynxtools-mpes (pyproject.toml)
ruff==0.3.4
# via pynxtools
ruff==0.5.5
# via pynxtools-mpes (pyproject.toml)
scipy==1.12.0
# via ase
setuptools==71.1.0
# via pip-tools
six==1.16.0
# via
# anytree
Expand All @@ -116,11 +114,7 @@ wheel==0.42.0
# via pip-tools
xarray==2024.2.0
# via
# pynxtools
# pynxtools-mpes (pyproject.toml)
# pynxtools
zipp==3.17.0
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# pip
# setuptools
Loading

0 comments on commit 336ccd3

Please sign in to comment.