Changelog¶
This document records the main changes to the sdssdb code.
1.1.1 (2026-06-002)¶
Improved¶
1.1.0 (2026-05-08)¶
✨ Improved¶
#310 Support Peewee 4.0.
#310 Support passing a full database URI to
PeeweeDatabaseConnectionandSQLADatabaseConnection.#311 Update the
vizdb.sdss_id_to_astra_pipelineupdate script.#312 Updates columns to vizdb.sdssid_to_pipes table
#314 Splits peewee astra orm by schema version
#315 Adds label column to boss_drp.boss_version
#316 DR20 allspec updates
🏷️ Changed¶
The
sdssdb.use_psycopg3parameter has been removed.sdssdbdefaults to usingpsycopg3if available, butpsycopg2can be used by passinguse_psycopg3=Falsewhen creating aDatabaseConnectioninstance or by setting the environment variable$SDSSDB_PSYCOPG3=0.
1.0.0 (2026-02-05)¶
0.13.5 (2025-10-23)¶
0.13.4 (2025-10-02)¶
0.13.3 (2025-07-15)¶
Added missing fields to several
catalog_to_Xmodels in Peewee.Added several missing
catalog_to_Xmodels in SQLAlchemy.
0.13.2 (2025-03-19)¶
#275: Update
boss_drp.json.#276:
targetdb.targeting_generation_to_version: addpk.#277: Add
sn2_15column.#278: Tg theta 1.
#279:
targetdb.targeting_generation_to_carton: edit constrainttargeting_generation_to_carton_uniq_key.#280: Edit
sdss_dr17_specobj*.sqlfiles.Add
dark_monit_1x4cadence.Update
update_specprimary.sql.Update bright BOSS cadences.
Add several grant permissions to
sdss_userinlvmdb.Rename
ln2_fill.donetoln2_fill.complete.Added column
programtotoo_target.
0.13.1 (2024-09-30)¶
0.13.0 (2024-09-03)¶
#264: Add metadata for the
sdss_id_to_catalogtable.#266: Support PEP 621.
#268: Allows to use
psycopy3 <https://www.psycopg.org/psycopg3/docs/>__ as a driver for the Peewee database connection.Add missing columns to the
SDSS_ID_To_Catalogmodels (the columns were being completed via reflection).Change
reflection=Falsetouse_reflection=Falsein manycatalogdbmodels. The previous setting was incorrect and was causing the models to be reflected.Add
gortdbschema and models tolvmdb. Movedlvmopsdb.overheadtogortdb.
0.12.4 (2024-08-07)¶
Fix
catalogidandversion_idfields inSDSS_ID_To_Catalogmodel.
0.12.3 (2024-08-02)¶
One more attempt at fixing the various issues with reflection. Reloading the fields each time a table was not found worked well for
operationsbut not so much forpipelinesbecause so many tables are missing. This time, we will only refresh the fields if the table is not found in the schema metadata and it exists in the database.Fixed column names in
SDSS_ID_To_Catalogmodels (#260).Adds new column to
vizdb.sdssid_to_pipesview (#259).
0.12.2 (2024-07-29)¶
Use Markdown for the README file. The old README.rst was giving trouble when packaging the app.
Fix issues with the caching of the schema during reflection. Added a
forceoption toreflection_optionsto force the schema information to be refreshed. Additionally, if the table does not exist in the schema metadata, the metadata will be refreshed.
0.12.1 (2024-07-19)¶
add cadence dark_flexible_3x1.csv
fixing removed column from astra source table
Fix table name in peewee model for catalog_from_sdss_speclite_dr19p
Add method
get_database_uri()toDatabaseConnection.
0.12.0 (2024-06-28)¶
Updated
sdss_id_to_catalogview models to use double underscore separating table name from primary key.Very significantly speed up the reflection of the database by caching the schema metadata.
Add
targetdbtargeting_generationandtargeting_generation_to_targettables and models.Allow passing additional connection parameters to
set_profile()which will override the profile defaults.
0.11.4 (2024-04-30)¶
Add columns
too_metadata.last_modified_date,too_target.observe_from_mjd, andtoo_target.added_date.Rename column
too_target.expiration_datetotoo_target.observe_until_mjd.
0.11.3 (2024-04-28)¶
Add columns
fiber_typeandassignedtoopsdb.assignment_to_focal.
0.11.2 (2024-04-24)¶
Add column
can_offsettotoo_metadata.
0.11.1 (2024-04-24)¶
Fix typo in
CatalogToToO_Targetmodel name.
0.11.0 (2024-04-24)¶
Explicitly define
CatalogToXXXmodels instead of loading them dynamically.
0.10.0 (2024-04-23)¶
Add
catalogdb.too_targetandcatalogdb.too_metadatatables and models.Add new cadences.
Add
disabledflag to tile.
0.9.0 (2024-03-08)¶
Add new schema for
astratosdss5db.Added new peewee and sqlalchemy ORMs for
astraschema.Added legacy survey sql schema files
0.8.3 (2023-12-11)¶
Add column
macro_idtoopsdb.overhead.Fix hardcoded schema in SQLAlchemy
opsdb.overheadmodel.
0.8.2 (2023-12-05)¶
Change
DATEtoTIMESTAMPTZfor the datetime columns inopsdb.overheadand models. Fixed the SQLAlchemyOverheadmodel which was intargetdbby mistake.
0.8.1 (2023-12-05)¶
Added
opsdb.overheadtable and models for Peewee and SQLAlchemy.Updated GitHub workflows.
0.8.0 (2023-10-23)¶
Added new schema for
vizdbschema insdss5db.Added new peewee and sqlalchemy ORMs for
vizdbschema.
0.7.0 (2023-09-28)¶
Added complete SQLAlchemy models for
sdss5db.Added files to create
catalogdb.lvm_magnitude.Added
allStar-dr17-synspec_rev1table and models.
0.6.6 (2023-08-17)¶
Added the option to disable database autoconnection by setting
sdssdb.autoconnect = Falseor an environment variableSDSSDB_AUTOCONNECT=false.
0.6.5 (2023-08-09)¶
Hotfix for a bug introduced in 0.6.4 that would prevent a connection to fail without errors when a profile was not present on import.
0.6.4 (2023-08-08)¶
Add
catalogdb.rave_dr6_xgaiae3(Gaia DR3 cross-match for RAVE DR6).Add LVM schema and model classes
Updates and fixes for cadences and obsmodes
Add ‘pipelines’ profile
Implement fine-grain field priorities
0.6.2 (2023-02-12)¶
Rename
SagittaEDR3toSagitta_EDR3.Update to allow for v1.0.6 of eROSITA superset catalogues.
Speed up loading of reflected tables by caching results except if the table is not found in the schema.
0.6.1 (2023-01-19)¶
Don’t count observed designs in
queue.rm.Add
assignmentStatustable to targetdb.Update auto schemas.
0.6.0 (2022-12-29)¶
Many additions to
sdss5db, mainly related to target selection v1. See thecommit list <https://github.com/sdss/sdssdb/compare/0.5.5...0.6.0>__ for details.
0.5.5 (2022-09-11)¶
#127: Add
Design.fieldattribute.Use full hostname for sdss5-db at APO.
Fixes to opsdb, targetdb.
Update default Cadences to v2.
Fix issue with
get_database_columns.Multiple additions to
catalogdbfor v1.
0.5.4 (2022-07-15)¶
Add
targetdb.design_to_fieldtableImprove offset support
New catalogs: gaia DR3
0.5.3 (2022-05-19)¶
Support opsdb_apo or opsdb_lco depending on OBSERVATORY environment variable
New catalogs: gaia eDR3, skies_v2, legacy_survey_dr10a
0.5.2 (2022-04-01)¶
Add assignment_hash to
targetdb.designAdd more magnitudes to targetdb
Add
manualcolumn toopsdb.design_to_status
0.5.0 (2021-11-16)¶
Add
targetdb.field_reservationand associated peewee utilAdd
targetdb.design_mode_valuetableBug fixes found during commissioning
0.4.13 (2021-11-16)¶
Add
mugatu_version, andrun_ontotargetdb.designMinor bug fixes
0.4.12 (2021-11-16)¶
Add
skies_v2,bailer_jones_dr3,sagitta_edr3, and APOGEE DR17 tables.Several major modifications to
targetdbandopsdbschemas.
0.4.11 (2021-10-12)¶
Add cadences and engineering design modes.
Fix a bug with the documentation not building with Sphinx 4.
Add cadence generator scripts, cfg files, and notebook for merging.
Do not cache database field. This was causing issues when reflection was used multiple times in the same routine.
Add targetdb
data_table.Add
lco5profile for LCO.
0.4.10 (2021-08-25)¶
Add priority to field table to
opsdbAdd
apo5profile.Add
apqltables toopsdb.Add
default_lambda_efftotargetdb.instrument.Add
run_onfield totargetdb.carton.When calling
.DatabaseConnection.become, ignore the password stored in the DSN parameters since the user/admin passwords will likely be different.
0.4.9 (2021-04-19)¶
Add delta_ra, delta_dec and, inertial for
CartonToTarget.Add
tycidcolumn toTycho2to prevent import errors.DatabaseConnection.become_adminandbecome_usernow accept a user parameter. If not provided, defaults to the old behaviour (using theadminanduserfields in the profile).
0.4.8 (2021-03-05)¶
Fix name collision in previous version by changing the column_name of TIC_v8 foreign key.
0.4.7 (2021-03-05)¶
Multiple new tables for
sdss5db.catalogdbrelated to SDSS-V target selection v0.5.Modifications to
apogeedbdump.:bug:
-Use refection only ifuse_reflection=True.#66: Update targetdb schema with changes to cadence, carton_to_target, and others.
Change default FK in TIC_v8 for
Tycho2.
0.4.6 (2020-11-12)¶
#43: Add a database registry
Initial version of the
sdss5db.opsdbschema.Added field
valuetocarton_to_target.Fix reflection for
catalogdb.skies_v1.Schema files for multiple
catalogdbtables in preparation for SDSS-V target selection v0.5.Initial schema files for
opsdb.
0.4.5 (2020-07-12)¶
Add
ForeignKeyFieldfromCatalogToSDSS_DR13_PhotoObj_Primarydirectly toSDSS_DR13_PhotoObj.Add single precision float type to the list of Peewee arrays during reflection.
0.4.4 (2020-07-07)¶
Add
ForeignKeyFieldtoTIC_v8where for all models incatalogdbconnected to Gaia.Use
autorollback=Trueby default in.PeeweeDatabaseConnection.Ensure reflection assigns double type arrays.
Clear metadata on reconnect.
Add
litematerialized views tocatalogdb.Add
catalogdb.gaia_assas_sn_cepheidstable.Move deprecated tables to
deprecatedschema insdss5db.Add DR16 versions of APOGEE tables.
0.4.3 (2020-06-05)¶
Add schema for
gaia_dr2_ruwe.Rename
targetdb.programtocarton, andsurveytomapper. Addpriorityfield incarton_to_target.Add
zcolumn totargetdb.magnitude.Add
position_anglecolumn totargetdb.field.
0.4.2 (2020-05-29)¶
Add
targetdb.version.tagcolumn.Use schema-qualified keys for
database.models.Modify
targetdbschema so thatmagnitudereferencestargetinstead of the other way around.Allow to use
.ReflectMeta.reflectmanually even ifuse_reflectionhas not been set inMeta.
0.4.1 (2020-05-18)¶
Rename
targetdb.version.labelandcatalogdb.version.versiontoplan.
0.4.0 (2020-05-15)¶
Test suite only runs where existing local databases found. Optionally run only
peeweeorsqlalchemytests.Adds ability to generate fake data based on real database models for tests.
Adds ability to test against real or fake databases.
Write tests either for
peeweeorsqlalchemydatabases.New framework for writing tests against databases.
Many changes to the
catalogdbschema files and PeeWee implementation to match the contents to SDSS-V v0 target selection.A new
ReflectMetametaclass that provides reflection for Peewee models (with some caveats).Reimplementation of most
catalogdbPeewee model classes for catalogdb using reflection.Changes to the schema display tools.
New tools for table
ingestion.New tools for database
maintenance/internals.Add
PeeweeDatabaseConnection.get_modelto retrieve the model for a given table.#28 Temporarily remove SQLAlchemy implementation of
sdss5dbsince it’s not maintained. We may reintroduce it later once the schema is stable.Use
host=localhostwhen a profile is being used on its own domain.#32 Assume that both SQLAlchemy and Peewee will be installed and simplify code.
0.3.2 (2020-03-10)¶
Change
operations-testprofile tooperationsusing the new machine hostname.New schema and models for
sdss5db.targetdb.
0.3.1 (2020-02-24)¶
Added
archivedatabase withsasschema.#18 Fixed Travis built after migration to using
setup.cfg.Fix import of
mangadbschema inPlate.mangadb_plate.
0.3.0 (2019-09-23)¶
Removed
TIC v6.Added
TIC v8.Updated schema for
mangadb.Plate.~.DatabaseConnection.connectnow acceptsuser,host, andportto override the default profile parameters.#13: Add support for schema
apogeeqldbinoperationsdb.#16: Changed the package internals to use
setup.cfg.#14: Add support for table
DR14Q_v4_4incatalogdb.#15: New CLI
file2dband associated tools to create and load a table from a file. Also added Numpy adaptors.
0.2.2 (2019-07-24)¶
Fixed import of database connections when Peewee or SQLAlchemy are not available.
Added
operationsdbSQL schemas.Improved descriptions in
setup.pyandREADME.rst.Update
PyYAMLrequirement to 5.1 and use explicit loader.
0.2.1 (2018-12-14)¶
Remove
bin/sdssdbfrom the list of scripts to install. This was making the build process fail.
0.2.0 (2018-12-14)¶
Removed some unused files from the template.
#7: Added
~sdssdb.utils.schemadisplay.create_schema_graphfunction to generate schema graphs and use it to auto-generate graphs in the documentation for the supported databases.Fixed command line example about how to install with
sdss_install.Added
mangadbschema for SQLA.Use
tmass_pts_keyfor fk relationship betweenGaiaDR2TmassBestNeighbourandTwoMassPsc.Use
pts_keyfor fk relationship betweenTwoMassCleanandTwoMassPsc.Improve model
__repr__.
0.1.1 (2018-12-10)¶
Set
python_requires='>=3.6'.
0.1.0 (2018-12-10)¶
Initial version.
DatabaseConnectionclass with Peewee and SQLA subclasses.Support for sdss5db, operationsdb (apodb/lcodb), and manga (only in SQLAlchemy).
Implemented database connection switching in SQLAlchemy.
Basic documentation.