Coverage for python/lsst/daf/butler/registry/dimensions/static.py : 87%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# This file is part of daf_butler. # # Developed for the LSST Data Management System. # This product includes software developed by the LSST Project # (http://www.lsst.org). # See the COPYRIGHT file at the top-level directory of this distribution # for details of code ownership. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>.
"""An implementation of `DimensionRecordStorageManager` for single-layer `Registry` and the base layers of multi-layer `Registry`.
This manager creates `DimensionRecordStorage` instances for all elements in the `DimensionUniverse` in its own `initialize` method, as part of static table creation, so it never needs to manage any dynamic registry tables.
Parameters ---------- db : `Database` Interface to the underlying database engine and namespace. records : `NamedKeyDict` Mapping from `DimensionElement` to `DimensionRecordStorage` for that element. universe : `DimensionUniverse` All known dimensions. """ universe: DimensionUniverse):
def initialize(cls, db: Database, context: StaticTablesContext, *, universe: DimensionUniverse) -> DimensionRecordStorageManager: # Docstring inherited from DimensionRecordStorageManager.
# Docstring inherited from DimensionRecordStorageManager. pass
# Docstring inherited from DimensionRecordStorageManager.
# Docstring inherited from DimensionRecordStorageManager. result = self._records.get(element) assert result, "All records instances should be created in initialize()." return result
# Docstring inherited from DimensionRecordStorageManager. |