Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Add __repr__ for Registry.__repr__(cls) #400

Merged
merged 16 commits into from
Jul 19, 2024
Merged

Add __repr__ for Registry.__repr__(cls) #400

merged 16 commits into from
Jul 19, 2024

Conversation

Zethson
Copy link
Member

@Zethson Zethson commented Jul 17, 2024

>>> import lamindb as ln; ln.Artifact; ln.Param

results in

Artifact
  Basic fields
    .id: AutoField
    .uid: CharField
    .description: CharField
    .key: CharField
    .suffix: CharField
    .type: CharField
    .accessor: CharField
    .size: BigIntegerField
    .hash: CharField
    .hash_type: CharField
    .n_objects: BigIntegerField
    .n_observations: BigIntegerField
    .visibility: SmallIntegerField
    .key_is_virtual: BooleanField
    .version: CharField
    .created_at: DateTimeField
    .updated_at: DateTimeField
  Relational fields
    .created_by: User
    .storage: Storage
    .transform: Transform
    .run: Run
    .ulabels: ULabel
    .input_of: Run
    .previous_runs: Run
    .feature_sets: FeatureSet
    .feature_values: FeatureValue
    .param_values: ParamValue
    .latest_report_of: Transform
    .source_code_of: Transform
    .report_of: Run
    .environment_of: Run
    .collection: Collection
    .collections: Collection
  Bionty fields
    .organisms: bionty.Organism
    .genes: bionty.Gene
    .proteins: bionty.Protein
    .cell_markers: bionty.CellMarker
    .tissues: bionty.Tissue
    .cell_types: bionty.CellType
    .diseases: bionty.Disease
    .cell_lines: bionty.CellLine
    .phenotypes: bionty.Phenotype
    .pathways: bionty.Pathway
    .experimental_factors: bionty.ExperimentalFactor
    .developmental_stages: bionty.DevelopmentalStage
    .ethnicities: bionty.Ethnicity
  Wetlab fields
    .experiments: wetlab.Experiment
    .wells: wetlab.Well
    .treatment_targets: wetlab.TreatmentTarget
    .treatments: wetlab.Treatment
Param
  Basic fields
    .id: BigAutoField
    .name: CharField
    .dtype: CharField
    .created_at: DateTimeField
    .updated_at: DateTimeField
  Relational fields
    .created_by: User
    .run: Run
    .previous_runs: Run
    .paramvalue: ParamValue

@sunnyosun
Copy link
Member

Why did you decide to add the code here instead of in lamindb? I think this repo should mainly contain code for the models. You could move them to https://github.com/laminlabs/lamindb/blob/main/lamindb/_record.py?

@falexwolf
Copy link
Member

I think I moved it here at some point because there was a tricky issue with import order. There is logic that only used lnschema_core without lamindb in lamindb_setup (which is the whole big reason for this complicated architecture).

Let's briefly think through side effects of moving this into lamindb. I'd keep it here for now.

I should have made a comment back then. There was definitely a reason.

Zethson added 6 commits July 18, 2024 18:19
Signed-off-by: zethson <[email protected]>
Signed-off-by: zethson <[email protected]>
Signed-off-by: zethson <[email protected]>
@Zethson Zethson merged commit e81faa6 into main Jul 19, 2024
1 check passed
@Zethson Zethson deleted the feature/__repr__ branch July 19, 2024 09:54
@falexwolf
Copy link
Member

FYI: Showing this off here in the introduction:

image

https://github.com/laminlabs/lamindb/pull/1748/files

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants