From 7c3844fc99326e1f5e4c0c5ee9d3418065445468 Mon Sep 17 00:00:00 2001 From: Steve Pothier Date: Fri, 27 Sep 2024 13:58:37 -0700 Subject: [PATCH] try dynamic TOC in Times Square --- notebooks_tsqr/NightLog.ipynb | 63 +++++++++++-------- .../lsst/ts/logging_and_reporting/reports.py | 2 +- 2 files changed, 37 insertions(+), 28 deletions(-) diff --git a/notebooks_tsqr/NightLog.ipynb b/notebooks_tsqr/NightLog.ipynb index f99d7c5..d27f526 100644 --- a/notebooks_tsqr/NightLog.ipynb +++ b/notebooks_tsqr/NightLog.ipynb @@ -1,28 +1,9 @@ { "cells": [ - { - "cell_type": "markdown", - "id": "0", - "metadata": {}, - "source": [ - "# Table of Contents\n", - "* [Overview of NightLog Report](#overview)\n", - "* [DDV](#ddv)\n", - "* [Almanac](#almanac)" - ] - }, - { - "cell_type": "markdown", - "id": "1", - "metadata": {}, - "source": [ - "# Initialization" - ] - }, { "cell_type": "code", "execution_count": null, - "id": "2", + "id": "0", "metadata": {}, "outputs": [], "source": [ @@ -39,13 +20,13 @@ "#!day_obs = 'TODAY' # TODO Change to 'TODAY' to test with default before push \n", "\n", "# Total number of days of data to display (ending on day_obs)\n", - "number_of_days = '31' # TODO Change to '1' to test with default before push " + "number_of_days = '3' # TODO Change to '1' to test with default before push " ] }, { "cell_type": "code", "execution_count": null, - "id": "3", + "id": "1", "metadata": {}, "outputs": [], "source": [ @@ -80,8 +61,12 @@ { "cell_type": "code", "execution_count": null, - "id": "4", - "metadata": {}, + "id": "2", + "metadata": { + "jupyter": { + "source_hidden": true + } + }, "outputs": [], "source": [ "# Normalize Parameters (both explicit Times Squares params, in implicit ones)\n", @@ -106,7 +91,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5", + "id": "3", "metadata": {}, "outputs": [], "source": [ @@ -117,7 +102,30 @@ "\n", "# The default provided here is for local testing.\n", "# Under Times Square it is ignored.\n", - "server = os.environ.get('EXTERNAL_INSTANCE_URL', usdf) # TODO try with \"usdf\" before push (else \"summit\")" + "server = os.environ.get('EXTERNAL_INSTANCE_URL', summit) # TODO try with \"usdf\" before push (else \"summit\")" + ] + }, + { + "cell_type": "markdown", + "id": "4", + "metadata": {}, + "source": [ + "# Table of Contents\n", + "* [Overview of NightLog Report](#overview)\n", + "* [DDV](#ddv)\n", + "* [Almanac](#almanac)\n", + "* [Night Report](#nightreport)\n", + "* [Overview Night Report](#overviewnightreport)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5", + "metadata": {}, + "outputs": [], + "source": [ + "md(f'* [Overview Narrative Log](#overviewnarrativelog)')" ] }, { @@ -189,6 +197,7 @@ "id": "11", "metadata": {}, "source": [ + "\n", "# Almanac" ] }, @@ -208,7 +217,7 @@ "id": "13", "metadata": {}, "source": [ - "# Night Report" + "# Night Report " ] }, { diff --git a/python/lsst/ts/logging_and_reporting/reports.py b/python/lsst/ts/logging_and_reporting/reports.py index ef63418..8676408 100644 --- a/python/lsst/ts/logging_and_reporting/reports.py +++ b/python/lsst/ts/logging_and_reporting/reports.py @@ -61,7 +61,7 @@ def adapter_overview(adapter, status, limit): error = status["error"] more = '(There may be more.)' if count >= limit else '' result = error if error else f'Got {count} records. ' - mdlist([f'## Overview for Service: `{adapter.service}` [{count}]', + mdlist([f'## Overview for Service: `{adapter.service}` [{count}]', f'- Endpoint: {status["endpoint_url"]}', ]) print(f'- {result} {more}')