From a67618d7d8e6b7dc1c4415ab9f9fb1ac1ce0744b Mon Sep 17 00:00:00 2001 From: Jeff Carlin Date: Thu, 30 Jan 2025 19:21:15 -0800 Subject: [PATCH] Update NB to fix error extracting metric docstrings --- notebooks/atools_metrics_plots_census.ipynb | 42 ++++++++++++--------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/notebooks/atools_metrics_plots_census.ipynb b/notebooks/atools_metrics_plots_census.ipynb index 4e8d9df..e76f71f 100644 --- a/notebooks/atools_metrics_plots_census.ipynb +++ b/notebooks/atools_metrics_plots_census.ipynb @@ -186,7 +186,7 @@ "\n", " for r in res:\n", " # Process the string to extract the bundle name, module, and task:\n", - " full_string = atools_pipeline_config[r: r+150]\n", + " full_string = atools_pipeline_config[r: r+200]\n", " split0 = str.split(full_string, 'config.atools.')\n", " bundle_name = str.split(split0[1], '=')[0]\n", " split1 = str.split(split0[1], sub_str)\n", @@ -209,7 +209,7 @@ "\n", " # Link to w_2025_02 version of the docs on github:\n", " mod_new = module.replace('.', '/')\n", - " path = 'https://github.com/lsst/analysis_tools/blob/w.2025.02/python/'+mod_new+'.py'\n", + " path = 'https://github.com/lsst/analysis_tools/blob/w.2025.04/python/'+mod_new+'.py'\n", " info = {'docstring': doc2, 'path': path}\n", " docstring_dict[bundle_name] = info\n", "\n", @@ -297,9 +297,9 @@ "metadata": {}, "outputs": [], "source": [ - "repo = '/repo/embargo'\n", + "repo = '/repo/main'\n", "\n", - "collections = ['LSSTComCam/runs/DRP/DP1-RC1/w_2025_02/DM-48371']\n", + "collections = ['LSSTComCam/runs/DRP/DP1/w_2025_04/DM-48556']\n", "\n", "butler = Butler(repo, collections=collections)\n", "registry = butler.registry" @@ -379,17 +379,17 @@ " 'sourceTable_visit_gaia_dr3_20230707_match',\n", "]\n", "pipelines_url = [\n", - " 'https://github.com/lsst/drp_pipe/blob/w.2025.02/pipelines/LSSTComCamSim/nightly-validation-ops-rehearsal-3.yaml#L18-L26',\n", - " 'https://github.com/lsst/analysis_tools/blob/w.2025.02/pipelines/diaTractQualityCore.yaml',\n", - " 'https://github.com/lsst/analysis_tools/blob/w.2025.02/pipelines/matchedVisitQualityCore.yaml',\n", - " 'https://github.com/lsst/analysis_tools/blob/w.2025.02/pipelines/coaddColumnValidate.yaml',\n", - " 'https://github.com/lsst/analysis_tools/blob/w.2025.02/pipelines/coaddQualityCore.yaml',\n", - " 'https://github.com/lsst/analysis_tools/blob/w.2025.02/pipelines/coaddQualityCore.yaml',\n", - " 'https://github.com/lsst/analysis_tools/blob/w.2025.02/pipelines/coaddQualityCore.yaml',\n", - " 'https://github.com/lsst/analysis_tools/blob/w.2025.02/pipelines/coaddQualityExtended.yaml',\n", - " 'https://github.com/lsst/drp_pipe/blob/w.2025.02/pipelines/_ingredients/LSSTComCamSim/DRP.yaml#L68-L78',\n", + " 'https://github.com/lsst/drp_pipe/blob/w.2025.04/pipelines/LSSTComCamSim/nightly-validation-ops-rehearsal-3.yaml#L18-L26',\n", + " 'https://github.com/lsst/analysis_tools/blob/w.2025.04/pipelines/diaTractQualityCore.yaml',\n", + " 'https://github.com/lsst/analysis_tools/blob/w.2025.04/pipelines/matchedVisitQualityCore.yaml',\n", + " 'https://github.com/lsst/analysis_tools/blob/w.2025.04/pipelines/coaddColumnValidate.yaml',\n", + " 'https://github.com/lsst/analysis_tools/blob/w.2025.04/pipelines/coaddQualityCore.yaml',\n", + " 'https://github.com/lsst/analysis_tools/blob/w.2025.04/pipelines/coaddQualityCore.yaml',\n", + " 'https://github.com/lsst/analysis_tools/blob/w.2025.04/pipelines/coaddQualityCore.yaml',\n", + " 'https://github.com/lsst/analysis_tools/blob/w.2025.04/pipelines/coaddQualityExtended.yaml',\n", + " 'https://github.com/lsst/drp_pipe/blob/w.2025.04/pipelines/_ingredients/LSSTComCamSim/DRP.yaml#L68-L78',\n", " # TO DO: put in real links here\n", - " 'https://github.com/lsst/analysis_tools/blob/w.2025.02/pipelines/coaddQualityCore.yaml#L90-L123',\n", + " 'https://github.com/lsst/analysis_tools/blob/w.2025.04/pipelines/coaddQualityCore.yaml#L90-L123',\n", " 'NA'\n", "]\n", "task_frame = pd.DataFrame({'name': task_names,\n", @@ -434,9 +434,7 @@ "cell_type": "code", "execution_count": null, "id": "e186e24e-a5d7-4853-8ba3-e554dc8df1ce", - "metadata": { - "scrolled": true - }, + "metadata": {}, "outputs": [], "source": [ "for task in task_frame.name:\n", @@ -720,6 +718,16 @@ "create_plot_references(task_frame, task_table_dict)" ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "f0194a0b-c627-4391-9a50-1db566db3937", + "metadata": {}, + "outputs": [], + "source": [ + "task_frame" + ] + }, { "cell_type": "code", "execution_count": null,