Skip to content

Updates cicd + Raman Reader #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
12 changes: 5 additions & 7 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
- name: Install uv
run: |
git submodule sync --recursive
git submodule update --init --recursive --jobs=4
python -m pip install --upgrade pip
curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install package
run: |
python -m pip install --no-deps .
- name: Install requirements
uv pip install --system --no-deps .
- name: Install dev requirements
run: |
python -m pip install -r dev-requirements.txt
uv pip install --system -r dev-requirements.txt
- name: ruff
run: |
ruff pynxtools_raman tests
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: pytest

on:
Expand Down Expand Up @@ -25,10 +28,11 @@ jobs:
python-version: ${{ matrix.python_version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install --system coverage coveralls
- name: Install package
run: |
pip install ".[dev]"
uv pip install --system ".[dev]"
- name: Test with pytest
run: |
pytest tests
pytest -sv --show-capture=no tests
126 changes: 126 additions & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
# This file was autogenerated by uv via the following command:
# uv pip compile --extra dev pyproject.toml --output-file dev-requirements.txt
anytree==2.12.1
# via pynxtools
ase==3.23.0
# via pynxtools
build==1.2.1
# via pip-tools
cfgv==3.4.0
# via pre-commit
click==8.1.7
# via
# click-default-group
# pip-tools
# pynxtools
click-default-group==1.2.4
# via pynxtools
contourpy==1.2.1
# via matplotlib
cycler==0.12.1
# via matplotlib
distlib==0.3.8
# via virtualenv
exceptiongroup==1.2.1
# via pytest
filelock==3.15.4
# via virtualenv
fonttools==4.53.0
# via matplotlib
h5py==3.11.0
# via pynxtools
identify==2.5.36
# via pre-commit
importlib-metadata==8.0.0
# via pynxtools
iniconfig==2.0.0
# via pytest
kiwisolver==1.4.5
# via matplotlib
lxml==5.2.2
# via pynxtools
matplotlib==3.9.0
# via ase
mergedeep==1.3.4
# via pynxtools
mypy==1.10.1
mypy-extensions==1.0.0
# via mypy
nodeenv==1.9.1
# via pre-commit
numpy==2.0.0
# via
# ase
# contourpy
# h5py
# matplotlib
# pandas
# pynxtools
# scipy
# xarray
packaging==24.1
# via
# build
# matplotlib
# pytest
# xarray
pandas==2.2.2
# via
# pynxtools
# xarray
pillow==10.4.0
# via matplotlib
pip==24.1.1
# via pip-tools
pip-tools==7.4.1
platformdirs==4.2.2
# via virtualenv
pluggy==1.5.0
# via pytest
pre-commit==3.7.1
pynxtools==0.3.2
pyparsing==3.1.2
# via matplotlib
pyproject-hooks==1.1.0
# via
# build
# pip-tools
pytest==8.2.2
python-dateutil==2.9.0.post0
# via
# matplotlib
# pandas
pytz==2024.1
# via pandas
pyyaml==6.0.1
# via
# pre-commit
# pynxtools
ruff==0.3.4
scipy==1.14.0
# via ase
setuptools==70.2.0
# via pip-tools
six==1.16.0
# via
# anytree
# python-dateutil
tomli==2.0.1
# via
# build
# mypy
# pip-tools
# pytest
types-pyyaml==6.0.12.20240311
typing-extensions==4.12.2
# via mypy
tzdata==2024.1
# via pandas
virtualenv==20.26.3
# via pre-commit
wheel==0.43.0
# via pip-tools
xarray==2024.6.0
# via pynxtools
zipp==3.19.2
# via importlib-metadata
1 change: 1 addition & 0 deletions pynxtools_raman/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from pynxtools.dataconverter.readers.base.reader import BaseReader


class RamanReader(BaseReader):
"""
Reader for my method....
Expand Down
6 changes: 4 additions & 2 deletions tests/test_reader.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Basic example based test for the stm reader
"""

import os
import xml.etree.ElementTree as ET
from glob import glob
Expand All @@ -10,7 +11,8 @@
validate_data_dict,
)
from pynxtools.dataconverter.template import Template
from pynxtools.nexus.nxdl_utils import get_nexus_definitions_path
from pynxtools.definitions.dev_tools.utils.nxdl_utils import get_nexus_definitions_path

from pynxtools_raman.reader import RamanReader


Expand Down Expand Up @@ -40,4 +42,4 @@ def test_example_data():
)

assert isinstance(read_data, Template)
assert validate_data_dict(template, read_data, root)
assert validate_data_dict(template, read_data, root)
Loading