Skip to content

Commit

Permalink
🚚 Rename RecordMeta to Registry (#814)
Browse files Browse the repository at this point in the history
* 🚚 Rename RecordMeta to Registry

* ♻️ Refactor
  • Loading branch information
falexwolf authored Aug 5, 2024
1 parent 93a9fbf commit defbabf
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lamindb_setup/_schema_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,21 +356,25 @@ def to_json(self):
return self.to_dict(include_django_objects=False)

def _get_modules_metadata(self):
return {
from lnschema_core.models import Record, Registry

all_models = {
module_name: {
model._meta.model_name: _ModelHandler(
model, module_name, self.included_modules
)
for model in self._get_schema_module(
module_name
).models.__dict__.values()
if model.__class__.__name__ == "RecordMeta"
and model.__name__ not in ["Record", "ORM"]
if model.__class__ is Registry
and model is not Record
and not model._meta.abstract
and model.__get_schema_name__() == module_name
}
for module_name in self.included_modules
}
assert all_models
return all_models

def _get_module_set_info(self):
# TODO: rely on schemamodule table for this
Expand Down

0 comments on commit defbabf

Please sign in to comment.