-
Notifications
You must be signed in to change notification settings - Fork 1
101 lines (84 loc) · 2.67 KB
/
test-converter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Test Converter Function
on: workflow_call
permissions:
contents: read
jobs:
rust-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: cache poetry install
uses: actions/cache@v2
with:
path: ~/.local
key: poetry-1.2.2-0
- uses: snok/install-poetry@v1
with:
version: 1.2.2
virtualenvs-create: true
virtualenvs-in-project: true
- name: cache deps
id: cache-deps
uses: actions/cache@v2
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}
- name: Download hdf5
run: |
sudo apt-get update && sudo apt-get install -y hdf5-tools libhdf5-dev
- name: Run rust test
run: cargo test
hdf5-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: cache poetry install
uses: actions/cache@v2
with:
path: ~/.local
key: poetry-1.2.2-0
- uses: snok/install-poetry@v1
with:
version: 1.2.2
virtualenvs-create: true
virtualenvs-in-project: true
- name: cache deps
id: cache-deps
uses: actions/cache@v2
with:
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}
- name: Download hdf5
run: |
sudo apt-get update && sudo apt-get install -y hdf5-tools libhdf5-dev
- name: Install dependencies
run: |
poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'
- name: Install project
run: poetry install --no-interaction
- name: Build Lstrs
run: make build_rs
- name: Run Converter Function
run: |
poetry run python new_aglae_data_converter/main.py --extraction-types standards lst globals --data-path ./test_assets/data --output-path . --log=DEBUG
- name: Save HDF5
uses: actions/upload-artifact@v3
with:
name: hdf5
path: |
*.hdf5
- name: Compare Standard & Globals HDF5 Files
run: |
h5diff std.hdf5 ./test_assets/out/std.hdf5
h5diff globals.hdf5 ./test_assets/out/globals.hdf5
- name: Compare LST HDF5 Files
run: |
h5diff 20230227_0002_Std_SASHI_IBA.hdf5 ./test_assets/out/20230227_0002_Std_SASHI_IBA.hdf5
h5diff 20230510_0001_Std_COLORSOURCES_IBA.hdf5 ./test_assets/out/20230510_0001_Std_COLORSOURCES_IBA.hdf5