Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jokasimr committed Mar 1, 2024
1 parent 65bf113 commit 1b52c89
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
20 changes: 6 additions & 14 deletions docs/examples/amor.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"outputs": [],
"source": [
"pl = sciline.Pipeline(\n",
" providers + amor_data,\n",
" (*providers, *amor_data),\n",
" params=default_parameters\n",
")\n",
"\n",
Expand Down Expand Up @@ -140,22 +140,14 @@
"metadata": {},
"outputs": [],
"source": [
"providers_with_metadata = (\n",
" *providers,\n",
" *orso.providers,\n",
" *amor_orso.providers,\n",
")\n",
"for p in (*orso.providers, *amor_orso.providers):\n",
" pl.insert(p)\n",
"\n",
"params[orso.OrsoCreator] = orso.OrsoCreator(fileio.base.Person(\n",
"pl[orso.OrsoCreator] = orso.OrsoCreator(fileio.base.Person(\n",
" name='Max Mustermann',\n",
" affiliation='European Spallation Source ERIC',\n",
" contact='max.mustermann@ess.eu',\n",
"))\n",
"\n",
"metadata_pipeline = sciline.Pipeline(\n",
" providers_with_metadata,\n",
" params=params\n",
")"
"))"
]
},
{
Expand All @@ -171,7 +163,7 @@
"metadata": {},
"outputs": [],
"source": [
"iofq_dataset = metadata_pipeline.compute(orso.OrsoIofQDataset)"
"iofq_dataset = pl.compute(orso.OrsoIofQDataset)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/essreflectometry/amor/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ def getpath(name: PoochFilename[Run]) -> FilePath[Run]:
return FilePath[Run](_pooch.fetch(name))


providers = [getpath]
providers = (getpath,)
2 changes: 2 additions & 0 deletions tests/orso_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@

import essreflectometry
from essreflectometry import orso
from essreflectometry.amor.data import providers as amor_data_providers
from essreflectometry.amor.load import providers as amor_load_providers
from essreflectometry.types import PoochFilename, Sample


def test_build_orso_data_source():
pipeline = sciline.Pipeline(
(
*amor_data_providers,
*amor_load_providers,
*orso.providers,
),
Expand Down

0 comments on commit 1b52c89

Please sign in to comment.