lsst.dax.apdb g5ea96fc03c+341ea1ce94
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.dax.apdb.tests._apdb.ApdbTest Class Reference
Inheritance diagram for lsst.dax.apdb.tests._apdb.ApdbTest:
lsst.dax.apdb.tests._apdb.TestCaseMixin

Public Member Functions

ApdbConfig make_instance (self, **Any kwargs)
 
ApdbTables getDiaObjects_table (self)
 
None assert_catalog (self, Any catalog, int rows, ApdbTables table)
 
None assert_table_data (self, Any catalog, int rows, ApdbTables table)
 
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_storeSources (self)
 
None test_storeForcedSources (self)
 
None test_getChunks (self)
 
None test_storeSSObjects (self)
 
None test_reassignObjects (self)
 
None test_midpointMjdTai_src (self)
 
None test_midpointMjdTai_fsrc (self)
 
None test_metadata (self)
 
None test_nometadata (self)
 
None test_schemaVersionFromYaml (self)
 
None test_config_freeze (self)
 

Public Attributes

 schema_path
 
 enable_replica
 

Static Public Attributes

bool time_partition_tables = False
 
 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 allow_visit_query = True
 
str schema_path
 
dict table_column_count
 

Detailed Description

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.

Member Function Documentation

◆ assert_catalog()

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.

◆ assert_table_data()

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``.

◆ getDiaObjects_table()

ApdbTables lsst.dax.apdb.tests._apdb.ApdbTest.getDiaObjects_table ( self)
Return type of table returned from getDiaObjects method.

◆ make_instance()

ApdbConfig lsst.dax.apdb.tests._apdb.ApdbTest.make_instance ( self,
**Any kwargs )
Make database instance and return configuration for it.

◆ test_config_freeze()

None lsst.dax.apdb.tests._apdb.ApdbTest.test_config_freeze ( self)
Test that some config fields are correctly frozen in database.

◆ test_empty_gets()

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.

◆ test_empty_gets_0months()

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.

◆ test_getChunks()

None lsst.dax.apdb.tests._apdb.ApdbTest.test_getChunks ( self)
Store and retrieve replica chunks.

◆ test_makeSchema()

None lsst.dax.apdb.tests._apdb.ApdbTest.test_makeSchema ( self)
Test for making APDB schema.

◆ test_metadata()

None lsst.dax.apdb.tests._apdb.ApdbTest.test_metadata ( self)
Simple test for writing/reading metadata table

◆ test_midpointMjdTai_fsrc()

None lsst.dax.apdb.tests._apdb.ApdbTest.test_midpointMjdTai_fsrc ( self)
Test for time filtering of DiaForcedSources.

◆ test_midpointMjdTai_src()

None lsst.dax.apdb.tests._apdb.ApdbTest.test_midpointMjdTai_src ( self)
Test for time filtering of DiaSources.

◆ test_nometadata()

None lsst.dax.apdb.tests._apdb.ApdbTest.test_nometadata ( self)
Test case for when metadata table is missing

◆ test_reassignObjects()

None lsst.dax.apdb.tests._apdb.ApdbTest.test_reassignObjects ( self)
Reassign DiaObjects.

◆ test_schemaVersionFromYaml()

None lsst.dax.apdb.tests._apdb.ApdbTest.test_schemaVersionFromYaml ( self)
Check version number handling for reading schema from YAML.

◆ test_storeForcedSources()

None lsst.dax.apdb.tests._apdb.ApdbTest.test_storeForcedSources ( self)
Store and retrieve DiaForcedSources.

◆ test_storeObjects()

None lsst.dax.apdb.tests._apdb.ApdbTest.test_storeObjects ( self)
Store and retrieve DiaObjects.

◆ test_storeObjects_empty()

None lsst.dax.apdb.tests._apdb.ApdbTest.test_storeObjects_empty ( self)
Test calling storeObject when there are no objects: see DM-43270.

◆ test_storeSources()

None lsst.dax.apdb.tests._apdb.ApdbTest.test_storeSources ( self)
Store and retrieve DiaSources.

◆ test_storeSSObjects()

None lsst.dax.apdb.tests._apdb.ApdbTest.test_storeSSObjects ( self)
Store and retrieve SSObjects.

Member Data Documentation

◆ table_column_count

dict lsst.dax.apdb.tests._apdb.ApdbTest.table_column_count
static
Initial value:
= {
ApdbTables.DiaObject: 8,
ApdbTables.DiaObjectLast: 5,
ApdbTables.DiaSource: 10,
ApdbTables.DiaForcedSource: 4,
ApdbTables.SSObject: 3,
}

The documentation for this class was generated from the following file: