Skip to content

Commit

Permalink
Dashboard gives sample data for all endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
pothiers committed Sep 19, 2024
2 parents 88ea259 + 0b40c40 commit 3de3eac
Show file tree
Hide file tree
Showing 5 changed files with 158 additions and 155 deletions.
61 changes: 34 additions & 27 deletions notebooks_tsqr/NightLog.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -169,18 +169,33 @@
"id": "8",
"metadata": {},
"source": [
"# Almanac"
"# DDV"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9",
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"metadata": {},
"outputs": [],
"source": [
"DDV = f\"{server}/rubintv-dev/ddv/index.html\"\n",
"display_markdown(f'Access DDV part of RubinTV: {DDV}', raw=True)\n"
]
},
{
"cell_type": "markdown",
"id": "10",
"metadata": {},
"source": [
"# Almanac"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "11",
"metadata": {},
"outputs": [],
"source": [
"# Display various almanac values (for moon, sun)\n",
Expand All @@ -189,7 +204,7 @@
},
{
"cell_type": "markdown",
"id": "10",
"id": "12",
"metadata": {},
"source": [
"# Night Report"
Expand All @@ -198,7 +213,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "11",
"id": "13",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -240,7 +255,7 @@
},
{
"cell_type": "markdown",
"id": "12",
"id": "14",
"metadata": {},
"source": [
"# Exposure Log"
Expand All @@ -249,12 +264,8 @@
{
"cell_type": "code",
"execution_count": null,
"id": "13",
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"id": "15",
"metadata": {},
"outputs": [],
"source": [
"# Get data from Exposure log. Display time log.\n",
Expand Down Expand Up @@ -284,7 +295,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "14",
"id": "16",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -294,12 +305,8 @@
{
"cell_type": "code",
"execution_count": null,
"id": "15",
"metadata": {
"jupyter": {
"source_hidden": true
}
},
"id": "17",
"metadata": {},
"outputs": [],
"source": [
"# Display Observation gaps\n",
Expand All @@ -321,7 +328,7 @@
},
{
"cell_type": "markdown",
"id": "16",
"id": "18",
"metadata": {},
"source": [
"# Narrative Log\n"
Expand All @@ -330,7 +337,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "17",
"id": "19",
"metadata": {
"jupyter": {
"source_hidden": true
Expand Down Expand Up @@ -374,7 +381,7 @@
},
{
"cell_type": "markdown",
"id": "18",
"id": "20",
"metadata": {},
"source": [
"# Developer Only Section"
Expand All @@ -383,7 +390,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "19",
"id": "21",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -397,7 +404,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "20",
"id": "22",
"metadata": {},
"outputs": [],
"source": [
Expand Down
61 changes: 57 additions & 4 deletions notebooks_tsqr/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,58 @@
Times Square notebooks for (potential) use in project-wide Logging & Reporting
# Logging & Reporting Times Square Notebooks

See [offical
documentation](https://rsp.lsst.io/v/usdfdev/guides/times-square/index.html)
on creating notebooks for use by Times Square.
Notebooks found here `./notebooks/` are meant to be run in Times Square towards use in project-wide Nightly Logging & Reporting
Times-Square: <https://usdf-rsp-dev.slac.stanford.edu/times-square>

See [official Times-Square documentation](https://rsp.lsst.io/v/usdfdev/guides/times-square/index.html) on creating notebooks for use by Times Square.

## Development Guidelines

Rapid Prototyping is enabled with the branch `prototype`
Times-Square for this repository displays the `prototype` branch.

- Create a branch for your Jira Ticket in the format `tickets/dm-####` off of `prototype`
- Communicate often with team mate when you want to push changes to `prototype`
- Rebase your branch off `prototype` before merging your branch into `prototype`

Example of flow:

1. `git checkout prototype; git pull`
2. `git checkout -b tickets/dm-23456`
3. `git commit -m "work happened"; git push`
4. `git checkout prototype; git pull`
5. `git checkout tickets/dm-23456`
6. `git rebase prototype`
7. `git checkout prototype; git merge tickets/dm-23456; git push`

&nbsp;

Once Per Sprint (2 week), the developers on this repository (Steve Pothier & Valerie Becker) gather to discuss updates made to `prototype`, outstanding pull requests, and tickets that have been completed.

Once they are in agreement, they merge `prototype` into the `develop` branch and close the related Jira Tickets. Squash commit should be used here with a descriptive title and description in the PR.


## NightLog.ipynb

NightLog.ipynb is our main Logging And Reporting notebook. This notebook is meant to display completed* views of logging information.
Each separate notebook should be used to mature a logging/reporting product, and then expect to be integrated into this 'main' notebook.

\*_Completed to an alpha\beta level -- quick improvements will continue to happen during Fall-Winter 2024_

## Dashboard

Dashboard.ipynb is intended for local development purposes and debugging. Run this notebook not from RSP to evaluate your connection to an array of data sources.
_RSP is not intended to have access to all of the data sources queried here._

## Kernel

Times Square developers/maintainers have indicated that the LSST Kernel should be used in notebooks displayed there.
[RSP Stack info](https://developer.lsst.io/stack/conda.html#rubin-science-platform-notebooks)

## Backend Code

We are working our way into a non-Times-Square dependent project. Towards that effort, we are incrementally abstracting common code out of the notebooks. This code is kept in `./python/lsst/ts/logging_and_reporting/`

`almanac.py` ...
`reports.py` ...
`source_adapters.py` ....
`utils.py` is used for ...
2 changes: 1 addition & 1 deletion notebooks_tsqr/consdb/access_consdb.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"import pandas as pd\n",
"from IPython.display import display, Markdown, display_markdown\n",
"\n",
"# URL = \"https://usdf-rsp.slac.stanford.edu/consdb/\" \n",
"# URL = \"https://usdf-rsp.slac.stanford.edu/consdb/\"\n",
"# Need to add that part about the headers to client flow through\n",
"URL = \"http://consdb-pq.consdb:8080/consdb\" # Don't use this one\n",
"\n",
Expand Down
Loading

0 comments on commit 3de3eac

Please sign in to comment.