From fe645566a5fc427887ff627fec07c4c5ed7cc908 Mon Sep 17 00:00:00 2001 From: "Olivia R. Lynn" Date: Mon, 8 Jul 2024 11:36:33 -0400 Subject: [PATCH 1/4] rail.core.RailStage -> rail.core.stage.RailStage --- examples/core_examples/Useful_Utilities.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/core_examples/Useful_Utilities.ipynb b/examples/core_examples/Useful_Utilities.ipynb index a8837b5..0d11590 100644 --- a/examples/core_examples/Useful_Utilities.ipynb +++ b/examples/core_examples/Useful_Utilities.ipynb @@ -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])" ] }, @@ -138,7 +138,7 @@ "\n", "Now, let's try listing imported stages again.\n", "\n", - "Note that we can now just call `RailStage` instead of `rail.core.RailStage`." + "Note that we can now just call `RailStage` instead of `rail.core.stage.RailStage`." ] }, { From 93087f9a8ffff53bbb4c1f0178719953a7364e32 Mon Sep 17 00:00:00 2001 From: "Olivia R. Lynn" Date: Mon, 8 Jul 2024 12:02:31 -0400 Subject: [PATCH 2/4] Add stage prefix to RailStage (even after import and attach all) --- examples/core_examples/Useful_Utilities.ipynb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/core_examples/Useful_Utilities.ipynb b/examples/core_examples/Useful_Utilities.ipynb index 0d11590..ddb469a 100644 --- a/examples/core_examples/Useful_Utilities.ipynb +++ b/examples/core_examples/Useful_Utilities.ipynb @@ -138,7 +138,7 @@ "\n", "Now, let's try listing imported stages again.\n", "\n", - "Note that we can now just call `RailStage` instead of `rail.core.stage.RailStage`." + "Note that we can now just call `stage.RailStage` instead of `rail.core.stage.RailStage`." ] }, { @@ -147,7 +147,7 @@ "metadata": {}, "outputs": [], "source": [ - "for val in RailStage.pipeline_stages.values():\n", + "for val in stage.RailStage.pipeline_stages.values():\n", " print(val[0])" ] }, @@ -166,7 +166,7 @@ "metadata": {}, "outputs": [], "source": [ - "for val in RailStage.pipeline_stages.values():\n", + "for val in stage.RailStage.pipeline_stages.values():\n", " if issubclass(val[0], rail.estimation.estimator.CatEstimator):\n", " print(val[0])" ] @@ -188,7 +188,7 @@ "metadata": {}, "outputs": [], "source": [ - "DS = RailStage.data_store\n", + "DS = stage.RailStage.data_store\n", "DS.__class__.allow_overwrite = True" ] }, From e5480b4ce8c00a4ee122c957bb89e48dd5016435 Mon Sep 17 00:00:00 2001 From: Olivia Lynn Date: Mon, 8 Jul 2024 21:29:14 -0400 Subject: [PATCH 3/4] Remove expectation to get RailStage in import_and_attach_all --- examples/core_examples/Useful_Utilities.ipynb | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/examples/core_examples/Useful_Utilities.ipynb b/examples/core_examples/Useful_Utilities.ipynb index ddb469a..190601e 100644 --- a/examples/core_examples/Useful_Utilities.ipynb +++ b/examples/core_examples/Useful_Utilities.ipynb @@ -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()" ] }, { @@ -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 `stage.RailStage` instead of `rail.core.stage.RailStage`." + "Now, let's try listing imported stages again, and notice how many more we get." ] }, { @@ -147,7 +145,7 @@ "metadata": {}, "outputs": [], "source": [ - "for val in stage.RailStage.pipeline_stages.values():\n", + "for val in rail.core.stage.RailStage.pipeline_stages.values():\n", " print(val[0])" ] }, @@ -166,7 +164,7 @@ "metadata": {}, "outputs": [], "source": [ - "for val in stage.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])" ] @@ -188,7 +186,7 @@ "metadata": {}, "outputs": [], "source": [ - "DS = stage.RailStage.data_store\n", + "DS = rail.core.stage.RailStage.data_store\n", "DS.__class__.allow_overwrite = True" ] }, @@ -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)]" ] }, { @@ -585,7 +584,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.11.6" } }, "nbformat": 4, From e5f5c205ff8c7e6c9c1b6a325e8781ea998da09d Mon Sep 17 00:00:00 2001 From: "Olivia R. Lynn" Date: Wed, 10 Jul 2024 17:10:40 -0400 Subject: [PATCH 4/4] Add step to temporarily roll ceci back to pre-v2 --- .github/workflows/smoke-test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index a1def73..483aec5 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -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