Skip to content

Commit

Permalink
try dynamic TOC in Times Square
Browse files Browse the repository at this point in the history
  • Loading branch information
pothiers committed Sep 27, 2024
1 parent 872cfec commit 7c3844f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 28 deletions.
63 changes: 36 additions & 27 deletions notebooks_tsqr/NightLog.ipynb
Original file line number Diff line number Diff line change
@@ -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": [
Expand All @@ -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": [
Expand Down Expand Up @@ -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",
Expand All @@ -106,7 +91,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "5",
"id": "3",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -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)')"
]
},
{
Expand Down Expand Up @@ -189,6 +197,7 @@
"id": "11",
"metadata": {},
"source": [
"<a id=\"almanac\"></a>\n",
"# Almanac"
]
},
Expand All @@ -208,7 +217,7 @@
"id": "13",
"metadata": {},
"source": [
"# Night Report"
"# Night Report <a id=\"nightreport\"></a>"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/ts/logging_and_reporting/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'<a id="overview{adapter.service}"></a>## Overview for Service: `{adapter.service}` [{count}]',
f'- Endpoint: {status["endpoint_url"]}',
])
print(f'- {result} {more}')
Expand Down

0 comments on commit 7c3844f

Please sign in to comment.