Skip to content

Commit

Permalink
Merge pull request #152 from LSSTDESC/orl/fix-railstage-in-uu
Browse files Browse the repository at this point in the history
Fixing smoke test failures
  • Loading branch information
ztq1996 authored Jul 31, 2024
2 parents b6953c8 + e5f5c20 commit 49fca00
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ jobs:
pip install .
pip install .[dev]
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: (Temporarily) roll back ceci to pre-v2
run: |
pip install ceci==1.17
- name: Run unit tests with pytest
run: |
python -m pytest tests
Expand Down
19 changes: 9 additions & 10 deletions examples/core_examples/Useful_Utilities.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"outputs": [],
"source": [
"import rail.stages\n",
"for val in rail.core.RailStage.pipeline_stages.values():\n",
"for val in rail.core.stage.RailStage.pipeline_stages.values():\n",
" print(val[0])"
]
},
Expand All @@ -75,7 +75,7 @@
"source": [
"import rail\n",
"import rail.stages\n",
"rail.stages.import_and_attach_all()\n"
"rail.stages.import_and_attach_all()"
]
},
{
Expand Down Expand Up @@ -136,9 +136,7 @@
"source": [
"### Listing imported stages (2/2)\n",
"\n",
"Now, let's try listing imported stages again.\n",
"\n",
"Note that we can now just call `RailStage` instead of `rail.core.RailStage`."
"Now, let's try listing imported stages again, and notice how many more we get."
]
},
{
Expand All @@ -147,7 +145,7 @@
"metadata": {},
"outputs": [],
"source": [
"for val in RailStage.pipeline_stages.values():\n",
"for val in rail.core.stage.RailStage.pipeline_stages.values():\n",
" print(val[0])"
]
},
Expand All @@ -166,7 +164,7 @@
"metadata": {},
"outputs": [],
"source": [
"for val in RailStage.pipeline_stages.values():\n",
"for val in rail.core.stage.RailStage.pipeline_stages.values():\n",
" if issubclass(val[0], rail.estimation.estimator.CatEstimator):\n",
" print(val[0])"
]
Expand All @@ -188,7 +186,7 @@
"metadata": {},
"outputs": [],
"source": [
"DS = RailStage.data_store\n",
"DS = rail.core.stage.RailStage.data_store\n",
"DS.__class__.allow_overwrite = True"
]
},
Expand Down Expand Up @@ -278,11 +276,12 @@
"outputs": [],
"source": [
"# Now, we have to set up some other variables for our pipeline:\n",
"import numpy as np\n",
"\n",
"bands = [\"u\", \"g\", \"r\", \"i\", \"z\", \"y\"]\n",
"band_dict = {band: f\"mag_{band}_lsst\" for band in bands}\n",
"rename_dict = {f\"mag_{band}_lsst_err\": f\"mag_err_{band}_lsst\" for band in bands}\n",
"post_grid = [float(x) for x in np.linspace(0.0, 5, 21)]\n"
"post_grid = [float(x) for x in np.linspace(0.0, 5, 21)]"
]
},
{
Expand Down Expand Up @@ -585,7 +584,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.0"
"version": "3.11.6"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 49fca00

Please sign in to comment.