File tree Expand file tree Collapse file tree 6 files changed +46
-3
lines changed Expand file tree Collapse file tree 6 files changed +46
-3
lines changed Original file line number Diff line number Diff line change 3131 os-variant : ${{ matrix.os }}
3232 python-version : ${{ matrix.python.version }}
3333 tox-env : ${{ matrix.python.tox-env }}
34+ test-artifacts-name : ' essreflectometry-test-artifacts-latest'
3435 secrets : inherit
Original file line number Diff line number Diff line change 3838 python-version : ${{ matrix.python.version }}
3939 tox-env : ${{ matrix.python.tox-env }}
4040 checkout_ref : ${{ needs.setup.outputs.release_tag }}
41+ test-artifacts-name : ' essreflectometry-test-artifacts-stable'
4142 secrets : inherit
Original file line number Diff line number Diff line change 2020 checkout_ref :
2121 default : ' '
2222 type : string
23+ test-artifacts-name :
24+ default : ' '
25+ type : string
2326 workflow_call :
2427 inputs :
2528 os-variant :
3942 checkout_ref :
4043 default : ' '
4144 type : string
45+ test-artifacts-name :
46+ default : ' '
47+ type : string
4248
4349jobs :
4450 package-test :
7177 python-version : ${{ inputs.python-version }}
7278 - run : python -m pip install --upgrade pip
7379 - run : python -m pip install -r ${{ inputs.pip-recipe }}
74- - run : tox -e ${{ inputs.tox-env }}
80+ - run : tox -e ${{ inputs.tox-env }} -- --file-output="tests_outputs"
7581 - uses : actions/upload-artifact@v4
7682 if : ${{ inputs.coverage-report }}
7783 with :
7884 name : CoverageReport
7985 path : coverage_html/
86+ - uses : actions/upload-artifact@v4
87+ if : ${{ inputs.test-artifacts-name != '' }}
88+ with :
89+ name : ${{ inputs.test-artifacts-name }}
90+ path : tests_outputs/
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ def _make_pooch():
1212 return pooch .create (
1313 path = pooch .os_cache ("ess/amor" ),
1414 env = "ESS_AMOR_DATA_DIR" ,
15- base_url = "https://fileserver-cache.johanneskasimir.workers.dev /groups/scipp/ess/amor/{version}/" ,
15+ base_url = "https://public.esss.dk /groups/scipp/ess/amor/{version}/" ,
1616 version = _version ,
1717 registry = {
1818 "reference.nxs" : "md5:56d493c8051e1c5c86fb7a95f8ec643b" ,
Original file line number Diff line number Diff line change 11# SPDX-License-Identifier: BSD-3-Clause
22# Copyright (c) 2024 Scipp contributors (https://github.com/scipp)
3- # flake8: noqa: F403, F405
3+ from pathlib import Path
44
55import numpy as np
66import pytest
@@ -103,6 +103,17 @@ def test_orso_pipeline(amor_pipeline: sciline.Pipeline):
103103 assert np .isfinite (res .data ).all ()
104104
105105
106+ @pytest .mark .filterwarnings ("ignore:Failed to convert .* into a transformation" )
107+ @pytest .mark .filterwarnings ("ignore:Invalid transformation, missing attribute" )
108+ def test_save_reduced_orso_file (amor_pipeline : sciline .Pipeline , output_folder : Path ):
109+ from orsopy import fileio
110+
111+ amor_pipeline [SampleRotation [SampleRun ]] = sc .scalar (0.85 , unit = "deg" )
112+ amor_pipeline [Filename [SampleRun ]] = amor .data .amor_sample_run (608 )
113+ res = amor_pipeline .compute (orso .OrsoIofQDataset )
114+ fileio .orso .save_orso (datasets = [res ], fname = output_folder / 'amor_reduced_iofq.ort' )
115+
116+
106117@pytest .mark .filterwarnings ("ignore:Failed to convert .* into a transformation" )
107118@pytest .mark .filterwarnings ("ignore:Invalid transformation, missing attribute" )
108119def test_pipeline_can_compute_reflectivity_merging_events_from_multiple_runs (
Original file line number Diff line number Diff line change 1+ # SPDX-License-Identifier: BSD-3-Clause
2+ # Copyright (c) 2025 Scipp contributors (https://github.com/scipp)
3+
4+ from pathlib import Path
5+
6+ import pytest
7+
8+
9+ def pytest_addoption (parser : pytest .Parser ) -> None :
10+ parser .addoption ("--file-output" , help = 'Output folder for reduced data' )
11+
12+
13+ @pytest .fixture
14+ def output_folder (request : pytest .FixtureRequest ) -> Path :
15+ if (path := request .config .getoption ("--file-output" )) is not None :
16+ out = Path (path )
17+ out .mkdir (parents = True , exist_ok = True )
18+ return out
19+ return request .getfixturevalue ("tmp_path" )
You can’t perform that action at this time.
0 commit comments