Skip to content

Commit

Permalink
move text from readme into docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ehneilsen committed Sep 15, 2023
1 parent 1c79bc9 commit 08321f3
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 100 deletions.
93 changes: 3 additions & 90 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,93 +1,6 @@
# schedview
Tools for visualizing Rubin Observatory scheduler behaviour and LSST survey status
The `schedview` module provides tools for visualizing Rubin Observatory scheduler behaviour and Rubin Observaty/LSST survey status, including:

## Development state
- A collection of functions, eacho of which creates an independent visualization of same aspect of scheduler behaviour, state, or surve progress. These functions may be used in `jupyter` notebooks or other python applications, or combined into dashboards or other higher level applications.
- A handful of dashboard applications that collect relevant visualizations into sets suitable for specific use cases.

The current code is in a early stage of development. The architecture will
be documented by [RTN-037](https://rtn-037.lsst.io/), currently little more than
an outline.

## Applications

There are presently two different applications in this project:

- `metric_maps`, a tool for visualizing metric output of MAF that takes the form
of a sky map.
- `sched_maps`, a tool for examing some elements of the state of objects used by
the scheduler, particularly those that take the form of a sky map, although some
indications of other elements are also present.
- `prenight`, a pre-night briefing dashboard.

The project contains example data for each. At present, to use the example data,
different versions of dependencies are required, so the installation instructions
are slightly different in each case. (The reason for this is that the pickles
containing the sample objects to be viewed with `sched_maps` were created with
an old version of `rubin_sim`, and this older version needs to be installed for
these to be loaded.)

## Installation

First, get the code by cloning the github project:

$ git clone [email protected]:ehneilsen/schedview.git

Go to the development directory, and download and decompress a data file used
by the automated tests.

$ cd schedview
$ wget -O schedview/data/bsc5.dat.gz http://tdc-www.harvard.edu/catalogs/bsc5.dat.gz
$ gunzip schedview/data/bsc5.dat.gz

Create a `conda` environment with the appropriate dependencies, and activate it.
If you are running the `metric_maps` application, use the `conda` environment
file that includes a recent version of `rubin_sim`:

$ # ONLY IF RUNNING metric_maps
$ conda env create -f environment.yaml
$ conda activate schedview

If you are running `sched_maps`, you may need to modify the environment to
one compatible with whatever instance of the scheduler you will be
viewing.

Install the (development) `schedview` in your new environment:

$ pip install -e .

Run the tests:

$ pytest

## Running `metric_maps`

Activate the environment, and start the `bokeh` app. If `SCHEDVIEW_DIR` is the
directory into which you cloned the `schedview` github repository, then:

$ conda activate schedview
$ bokeh serve ${SCHEDVIEW_DIR}/schedview/app/metric_maps

The app will then give you the URL at which you can find the app. The data
displayed with the above instructions will be the sample metric map in the
project itself.

If you want to use a different data file, you can set the `METRIC_FNAME`
to its path before running the `bokeh` app. This is only a very short term
solution, and will be replaced soon.

## Running `sched_maps`

Activate the environment, and start the `bokeh` app. If `SCHEDVIEW_DIR` is the
directory into which you cloned the `schedview` github repository, then:

$ conda activate schedview
$ bokeh serve ${SCHEDVIEW_DIR}/schedview/app/sched_maps

The app will then give you the URL at which you can find the app.

## Running `prenight`

Activate the environment, and start the `bokeh` app. If `SCHEDVIEW_DIR` is the
directory into which you cloned the `schedview` github repository, then:

$ conda activate schedview
$ python ${SCHEDVIEW_DIR}/schedview/app/prenight/prenight.py
30 changes: 22 additions & 8 deletions docs/installation.rst
Original file line number Diff line number Diff line change
@@ -1,26 +1,40 @@
Installation
============

Installing dashboards
---------------------

Quick Installation
------------------
First, get the code by cloning the github project:

Installation from PyPI:
``pip install schedview``
$ git clone [email protected]:lsst/schedview.git

Create a `conda` environment with the appropriate dependencies, and activate it.
If you are running the `metric_maps` application, use the `conda` environment
file that includes a recent version of `rubin_sim`:

$ conda env create -f environment.yaml
$ conda activate schedview

Install the (development) `schedview` in your new environment:

$ pip install -e .

Run the tests:

$ pytest

coming soon: ``conda install -c conda-forge schedview``

Building Documentation
----------------------

An online copy of the documentation is available at https://uranography.lsst.io,
however building a local copy can be done as follows:
Online documentation require the installation of `documenteer[guide]`:

::

pip install "documenteer[guide]"
cd docs
package-docs build
make clean
make html


The root of the local documentation will then be `docs/_build/html/index.html`.
9 changes: 8 additions & 1 deletion docs/introduction.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
Introduction
============

To do.
Tools for visualizing Rubin Observatory scheduler behaviour and LSST survey status

There are presently two different applications in this project:

- `sched_maps`, a tool for examing some elements of the state of objects used
by the scheduler, particularly those that take the form of a sky map,
although some indications of other elements are also present.
- `prenight`, a pre-night briefing dashboard.
24 changes: 23 additions & 1 deletion docs/usage.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
Usage
=====

To do.
Running `sched_maps`
--------------------

Activate the environment, and start the `bokeh` app. If `SCHEDVIEW_DIR` is the
directory into which you cloned the `schedview` github repository, then

::

$ conda activate schedview
$ bokeh serve ${SCHEDVIEW_DIR}/schedview/app/sched_maps

The app will then give you the URL at which you can find the app.

Running `prenight`
------------------

Activate the environment, and start the `bokeh` app. If `SCHEDVIEW_DIR` is the
directory into which you cloned the `schedview` github repository, then:

::

$ conda activate schedview
$ python ${SCHEDVIEW_DIR}/schedview/app/prenight/prenight.py

0 comments on commit 08321f3

Please sign in to comment.