Skip to content

Commit f899127

Browse files
committed
merge lock file
2 parents 78e28f4 + c137756 commit f899127

File tree

4 files changed

+69
-4
lines changed

4 files changed

+69
-4
lines changed

.github/workflows/testing.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: pytest
2+
3+
# Triggers the workflow on push for all branches
4+
on: [push]
5+
6+
jobs:
7+
pytest:
8+
runs-on: ubuntu-latest
9+
steps:
10+
# Check out repo and set up Python
11+
- name: Check out the repository
12+
uses: actions/checkout@v4
13+
with:
14+
lfs: true
15+
16+
# Use cached python and dependencies, install poetry
17+
- name: "Setup Python, Poetry and Dependencies"
18+
uses: packetcoders/action-setup-cache-python-poetry@main
19+
with:
20+
python-version: 3.8
21+
poetry-version: 1.2.2
22+
23+
# Run pytest with coverage report and upload results to coveralls
24+
- name: Run tests on python 3.8
25+
run: |
26+
poetry run pytest --cov --cov-report xml:cobertura.xml --full-trace --show-capture=no -sv -n auto tests/
27+
28+
- name: Coveralls
29+
uses: coverallsapp/github-action@v2
30+
with:
31+
github-token: ${{ secrets.GITHUB_TOKEN }}
32+
file: ./cobertura.xml
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: update docs/requirements.txt for readthedocs
2+
3+
on:
4+
# Triggers the workflow on push but only for the main branch
5+
# and only for changes to the poetry.lock file
6+
push:
7+
branches: [ main ]
8+
paths: [poetry.lock]
9+
10+
jobs:
11+
pytest:
12+
runs-on: ubuntu-latest
13+
steps:
14+
# Check out repo and set up Python
15+
- name: Check out the repository
16+
uses: actions/checkout@v4
17+
with:
18+
lfs: true
19+
20+
# Use cached python and dependencies, install poetry
21+
- name: "Setup Python, Poetry and Dependencies"
22+
uses: packetcoders/action-setup-cache-python-poetry@main
23+
with:
24+
python-version: 3.8
25+
poetry-version: 1.2.2
26+
27+
# Generates and commits a requirements.txt used by readthedocs
28+
- name: Export requirements.txt
29+
run: poetry export --without-hashes --format=requirements.txt -o docs/requirements.txt -E docs -E notebook
30+
31+
- name: Commit changes
32+
uses: EndBug/add-and-commit@v9
33+
with:
34+
default_author: github_actions
35+
message: 'Updating requirements for docs'
36+
add: 'docs/requirements.txt'

poetry.lock

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/test_processor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,7 @@ def test_compute():
667667
metadata["user0"]["email"] = "email"
668668
# NXinstrument
669669
metadata["instrument"] = {}
670+
metadata["instrument"] = {}
670671
# analyzer
671672
metadata["instrument"]["analyzer"] = {}
672673
metadata["instrument"]["analyzer"]["energy_resolution"] = 110.0

0 commit comments

Comments
 (0)