Skip to main content

Utility functions for the Rubin Science Platform

Project description

lsst-rsp

This Python package provides utility functions for the Rubin Science Platform, primarily for use within the Notebook Aspect. These utility functions are documented in the Notebook aspect documentation for the Rubin Science Platform.

Installation

The package can be installed from PyPI:

pip install lsst-rsp

However, most functionality of lsst-rsp is only useful inside a Rubin Science Platform JupyterLab container. This package is pre-installed in the standard containers.

Development

The best way to start contributing to lsst-rsp is by cloning this repository, creating a virtual environment, and running the make init command:

git clone https://github.com/lsst-sqre/lsst-rsp.git
cd lsst-rsp
make init

You can run tests with tox:

tox run

To learn more about the individual environments:

tox list

Developing on the RSP

The LSST kernel in the RSP sciplat-lab image already has a release version of lsst-rsp included. If you want to use a development version, you must first create a virtualenv, install the necessary packages, and then create a JupyterLab kernel pointing to it.

In a terminal session, run the following commands:

VENV="lsst_rsp"
mkdir -p ${HOME}/venvs
python -m venv ${HOME}/venvs/${VENV}
. ${HOME}/venvs/${VENV}/bin/activate
mkdir -p ${HOME}/src
cd ${HOME}/src
git clone https://github.com/lsst-sqre/lsst-rsp
# or git clone git@github.com:lsst-sqre/lsst-rsp.git if you prefer
cd lsst-rsp
make init
pip install ipykernel
python -m ipykernel install --user --name=${VENV}

Now you will need to shut down your lab and restart it in order to pick up the new lsst-rsp installation.

Once you're in your new container, you will notice that you have a new kernel named lsst_rsp. Now you have an editable version installed in your custom kernel, and you can run all the usual tox environments.

If you start a notebook with your custom kernel, you can see the development version with:

import lsst.rsp

lsst.rsp.__version__

You will still need to restart the kernel to pick up changes you make to your copy of lsst_rsp.

Uninstalling a development version from the RSP

In a terminal window, run the following:

. $HOME/venvs/lsst_rsp/bin/activate
jupyter kernelspec uninstall lsst_rsp

Respond y and then deactivate to the resulting prompts.

Shut down and restart your notebook as before. When you come back in, in a terminal window, run:

rm -rf $HOME/venvs/lsst_rsp

You cannot remove the virtualenv directory until you have restarted the JupyterLab container, since otherwise JupyterLab will be holding some files open for the running kernel.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lsst_rsp-0.7.1.tar.gz (44.8 kB view details)

Uploaded Source

Built Distribution

lsst_rsp-0.7.1-py3-none-any.whl (27.9 kB view details)

Uploaded Python 3

File details

Details for the file lsst_rsp-0.7.1.tar.gz.

File metadata

  • Download URL: lsst_rsp-0.7.1.tar.gz
  • Upload date:
  • Size: 44.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.9

File hashes

Hashes for lsst_rsp-0.7.1.tar.gz
Algorithm Hash digest
SHA256 9fda81d3513ccc1c4ebb3c59fbaa958feb09955ad63b28aff145452a6c714ddc
MD5 dca396bddc772bcd2e457045356d611d
BLAKE2b-256 2f0e10a2f6a983eeeb1e48cc342b7239d74eca84bd394e3acbe4d2b5d3526643

See more details on using hashes here.

Provenance

The following attestation bundles were made for lsst_rsp-0.7.1.tar.gz:

Publisher: ci.yaml on lsst-sqre/lsst-rsp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lsst_rsp-0.7.1-py3-none-any.whl.

File metadata

  • Download URL: lsst_rsp-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 27.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.9

File hashes

Hashes for lsst_rsp-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f451975a416a4cd758de88939cf00e26351442de38d2faa5af65a75e5af0abdd
MD5 53348710ad0ade14eb92a30b2fa30f5c
BLAKE2b-256 9fa48f38e036999e95acf85c5fae614bd77a3f4127be5f724a1f477c2b377b13

See more details on using hashes here.

Provenance

The following attestation bundles were made for lsst_rsp-0.7.1-py3-none-any.whl:

Publisher: ci.yaml on lsst-sqre/lsst-rsp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page