Public Member Functions | |
| ApdbConfig | make_instance (self, **Any kwargs) |
| ApdbTables | getDiaObjects_table (self) |
| Pixelization | pixelization (self, ApdbConfig config) |
| None | assert_catalog (self, Any catalog, int rows, ApdbTables table) |
| None | assert_table_data (self, Any catalog, int rows, ApdbTables table) |
| None | assert_column_types (self, Any catalog, dict[str, felis.datamodel.DataType] types) |
| Region | make_region (self, tuple[float, float, float] xyz=(1.0, 1.0, -1.0)) |
| None | test_makeSchema (self) |
| None | test_empty_gets (self) |
| None | test_empty_gets_0months (self) |
| None | test_storeObjects (self) |
| None | test_storeObjects_empty (self) |
| None | test_storeMovingObject (self) |
| None | test_storeSources (self) |
| None | test_storeForcedSources (self) |
| None | test_timestamps (self) |
| None | test_getChunks (self) |
| None | test_reassignObjects (self) |
| None | test_storeUpdateRecord (self) |
| None | store_update_records (self, Apdb apdb, list[ApdbUpdateRecord] records, ReplicaChunk chunk) |
| None | test_midpointMjdTai_src (self) |
| None | test_midpointMjdTai_fsrc (self) |
| None | test_metadata (self) |
| None | test_schemaVersionFromYaml (self) |
| None | test_config_freeze (self) |
Static Public Attributes | |
| visit_time = astropy.time.Time("2021-01-01T00:00:00", format="isot", scale="tai") | |
| bool | fsrc_requires_id_list = False |
| bool | enable_replica = False |
| bool | use_mjd = True |
| int | extra_chunk_columns = 1 |
| int | meta_row_count = 3 |
| dict | table_column_count |
Base class for Apdb tests that can be specialized for concrete implementation. This can only be used as a mixin class for a unittest.TestCase and it calls various assert methods.
| None lsst.dax.apdb.tests._apdb.ApdbTest.assert_catalog | ( | self, | |
| Any | catalog, | ||
| int | rows, | ||
| ApdbTables | table ) |
Validate catalog type and size
Parameters
----------
catalog : `object`
Expected type of this is ``pandas.DataFrame``.
rows : `int`
Expected number of rows in a catalog.
table : `ApdbTables`
APDB table type.
| None lsst.dax.apdb.tests._apdb.ApdbTest.assert_table_data | ( | self, | |
| Any | catalog, | ||
| int | rows, | ||
| ApdbTables | table ) |
Validate catalog type and size
Parameters
----------
catalog : `object`
Expected type of this is `ApdbTableData`.
rows : `int`
Expected number of rows in a catalog.
table : `ApdbTables`
APDB table type.
extra_columns : `int`
Count of additional columns expected in ``catalog``.
| ApdbTables lsst.dax.apdb.tests._apdb.ApdbTest.getDiaObjects_table | ( | self | ) |
Return type of table returned from getDiaObjects method.
| ApdbConfig lsst.dax.apdb.tests._apdb.ApdbTest.make_instance | ( | self, | |
| **Any | kwargs ) |
Make database instance and return configuration for it.
| Region lsst.dax.apdb.tests._apdb.ApdbTest.make_region | ( | self, | |
| tuple[float, float, float] | xyz = (1.0, 1.0, -1.0) ) |
Make a region to use in tests
| Pixelization lsst.dax.apdb.tests._apdb.ApdbTest.pixelization | ( | self, | |
| ApdbConfig | config ) |
Return pixelization used by implementation.
| None lsst.dax.apdb.tests._apdb.ApdbTest.store_update_records | ( | self, | |
| Apdb | apdb, | ||
| list[ApdbUpdateRecord] | records, | ||
| ReplicaChunk | chunk ) |
Store update records in database, must be overriden in subclass.
| None lsst.dax.apdb.tests._apdb.ApdbTest.test_config_freeze | ( | self | ) |
Test that some config fields are correctly frozen in database.
| None lsst.dax.apdb.tests._apdb.ApdbTest.test_empty_gets | ( | self | ) |
Test for getting data from empty database. All get() methods should return empty results, only useful for checking that code is not broken.
| None lsst.dax.apdb.tests._apdb.ApdbTest.test_empty_gets_0months | ( | self | ) |
Test for getting data from empty database. All get() methods should return empty DataFrame or None.
| None lsst.dax.apdb.tests._apdb.ApdbTest.test_getChunks | ( | self | ) |
Store and retrieve replica chunks.
| None lsst.dax.apdb.tests._apdb.ApdbTest.test_makeSchema | ( | self | ) |
Test for making APDB schema.
| None lsst.dax.apdb.tests._apdb.ApdbTest.test_metadata | ( | self | ) |
Simple test for writing/reading metadata table
| None lsst.dax.apdb.tests._apdb.ApdbTest.test_midpointMjdTai_fsrc | ( | self | ) |
Test for time filtering of DiaForcedSources.
| None lsst.dax.apdb.tests._apdb.ApdbTest.test_midpointMjdTai_src | ( | self | ) |
Test for time filtering of DiaSources.
| None lsst.dax.apdb.tests._apdb.ApdbTest.test_reassignObjects | ( | self | ) |
Reassign DiaObjects.
| None lsst.dax.apdb.tests._apdb.ApdbTest.test_schemaVersionFromYaml | ( | self | ) |
Check version number handling for reading schema from YAML.
| None lsst.dax.apdb.tests._apdb.ApdbTest.test_storeForcedSources | ( | self | ) |
Store and retrieve DiaForcedSources.
| None lsst.dax.apdb.tests._apdb.ApdbTest.test_storeMovingObject | ( | self | ) |
Store and retrieve DiaObject which changes its position.
| None lsst.dax.apdb.tests._apdb.ApdbTest.test_storeObjects | ( | self | ) |
Store and retrieve DiaObjects.
| None lsst.dax.apdb.tests._apdb.ApdbTest.test_storeObjects_empty | ( | self | ) |
Test calling storeObject when there are no objects: see DM-43270.
| None lsst.dax.apdb.tests._apdb.ApdbTest.test_storeSources | ( | self | ) |
Store and retrieve DiaSources.
| None lsst.dax.apdb.tests._apdb.ApdbTest.test_storeUpdateRecord | ( | self | ) |
Test _storeUpdateRecord() method.
| None lsst.dax.apdb.tests._apdb.ApdbTest.test_timestamps | ( | self | ) |
Check that timestamp return type is as expected.
|
static |