Skip to main content

Short one-sentence description of the package

Project description

lsst-rsp

User-facing Python classes and functions for use in the RSP environment. Learn more at https://lsst-rsp.lsst.io

Install from PyPI:

pip install lsst-rsp

but, really, lsst-rsp is only useful inside an RSP JupyterLab container.

See below for how to test new versions within such a container.

lsst-rsp is developed by Rubin Observatory at https://github.com/lsst-sqre/lsst-rsp.

Developing lsst-rsp

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 and build documentation with tox:

tox

To learn more about the individual environments:

tox -av

Developing lsst-rsp on the RSP

The LSST kernel in the RSP sciplat-lab image already has a release version of lsst-rsp in it. Therefore, there is some setup you need to do in order to create a development environment you can use. Specifically, you need to create a virtualenv for the editable lsst-rsp, install tox and pre-commit for its test machinery, and then create a JupyterLab kernel pointing to it.

Open a terminal session:

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@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 get a new container image. That's because the process your Lab interface is running inside doesn't know about the new kernel--but once you restart the Lab container, it will.

Once you're in your new container, you will notice that you have a new kernel named lsst_rsp.

Now you've got an editable version installed in your custom kernel, and you can still run all the usual tox environments too.

If you start a notebook with your custom kernel,

import lsst.rsp

lsst.rsp.__version__

will show you your development version. Note that 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

Open a terminal window.

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

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

rm -rf $HOME/venvs/lsst_rsp

You will need to remove the virtualenv directory after restarting the Lab container, because otherwise JupyterLab will be holding some files open because it still believes it has a kernel there.

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.4.2.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

lsst_rsp-0.4.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file lsst-rsp-0.4.2.tar.gz.

File metadata

  • Download URL: lsst-rsp-0.4.2.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for lsst-rsp-0.4.2.tar.gz
Algorithm Hash digest
SHA256 a54624f5e401f0b9b1926736695a2cae6a36076081215521f4a58f5c79b65273
MD5 be212bebfaac18f13c09174eb545727e
BLAKE2b-256 f29ea0e7ca0a006b18d3832cbee08f6e2978f54ad745d7ae8896ba57ca200e5a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lsst_rsp-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for lsst_rsp-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f53617e6f606d350b998a2844108f5920fecb1af9696a4800ba51a60b7e77bb3
MD5 152fbb5e1700c14916eb3872cb04e94b
BLAKE2b-256 6564ab442a79a556490749c4bed93f0cf9e8a26497b8217db856a410f8322fc9

See more details on using hashes here.

Supported by

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