Skip to content

sdss/sdssdb

Repository files navigation

sdssdb

Versions Documentation Status Test

SDSS product for database management.

Useful links

Installation

To install sdssdb for regular usage, from PyPi,

pip install sdssdb

Developer Install

git clone https://github.com/sdss/sdssdb
cd sdssdb
uv sync --python 3.12 --locked

This only installs the dependencies needed to run the code. For development, you can install extra dependencies needed for building docs or running tests with the --all-groups keyword.

uv sync --all-groups --python=3.12 --locked

If you don't have uv installed, you can install directly with pip:

git clone https://github.com/sdss/sdssdb
cd sdssdb
pip install -e .

Building Sphinx Docs locally

Within the sdssdb directory, run

sdss docs.build

To have the docs autobuild and watch for changes, use nox. To build and run the local docs server, run

nox

This will start a local docs server on a random port. You should see something like,

[sphinx-autobuild] Serving on http://127.0.0.1:54429
[sphinx-autobuild] Waiting to detect changes...

It should open the site automatically in a new browser window. If 127.0.0.1:[port] fails to load, try localhost:[port].

How to use

    >>> from sdssdb.peewee.sdss5db import catalogdb
    >>> targets = catalogdb.GaiaDR2Source.select().where(catalogdb.GaiaDR2Source.phot_g_mean_mag < 15)

About

Central SDSS product for database management

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 16