Skip to content

Commit

Permalink
💚 Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
falexwolf committed Jan 8, 2025
1 parent 831015b commit ea4a275
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions wetlab/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
)
from lamindb.models import (
Artifact,
BasicRecord,
CanCurate,
Feature,
LinkORM,
Expand Down Expand Up @@ -128,7 +129,7 @@ def __init__(
super().__init__(*args, **kwargs)


class ArtifactCompound(LinkORM, TracksRun):
class ArtifactCompound(BasicRecord, LinkORM, TracksRun):
id: int = models.BigAutoField(primary_key=True)
artifact: Artifact = ForeignKey(Artifact, CASCADE, related_name="links_compound")
compound: Compound = ForeignKey(Compound, PROTECT, related_name="links_artifact")
Expand Down Expand Up @@ -170,7 +171,7 @@ class Meta(Record.Meta, TracksRun.Meta, TracksUpdates.Meta):
"""Artifacts linked to the experiment."""


class ArtifactExperiment(LinkORM, TracksRun):
class ArtifactExperiment(BasicRecord, LinkORM, TracksRun):
id: int = models.BigAutoField(primary_key=True)
artifact: Artifact = ForeignKey(Artifact, CASCADE, related_name="links_experiment")
experiment: Experiment = ForeignKey(
Expand Down Expand Up @@ -220,7 +221,7 @@ class Meta(Record.Meta, TracksRun.Meta, TracksUpdates.Meta):
"""Artifacts linked to the well."""


class ArtifactWell(LinkORM, TracksRun):
class ArtifactWell(BasicRecord, LinkORM, TracksRun):
id: int = models.BigAutoField(primary_key=True)
artifact: Artifact = ForeignKey(Artifact, CASCADE, related_name="links_well")
well: Well = ForeignKey(Well, PROTECT, related_name="links_artifact")
Expand Down Expand Up @@ -285,7 +286,7 @@ class Meta(Record.Meta, TracksRun.Meta, TracksUpdates.Meta):
# return "\n".join(filter(None, result))


class ArtifactPerturbationTarget(LinkORM, TracksRun):
class ArtifactPerturbationTarget(BasicRecord, LinkORM, TracksRun):
id: int = models.BigAutoField(primary_key=True)
artifact: Artifact = ForeignKey(
Artifact, CASCADE, related_name="links_perturbation_target"
Expand Down Expand Up @@ -370,7 +371,7 @@ class Meta(Record.Meta, TracksRun.Meta, TracksUpdates.Meta):
# return "\n".join(filter(None, result))


class ArtifactGeneticPerturbation(LinkORM, TracksRun):
class ArtifactGeneticPerturbation(BasicRecord, LinkORM, TracksRun):
id: int = models.BigAutoField(primary_key=True)
artifact: Artifact = ForeignKey(
Artifact, CASCADE, related_name="links_genetic_perturbation"
Expand Down Expand Up @@ -456,7 +457,7 @@ def __init__(
super().__init__(*args, **kwargs)


class ArtifactBiologic(LinkORM, TracksRun):
class ArtifactBiologic(BasicRecord, LinkORM, TracksRun):
id: int = models.BigAutoField(primary_key=True)
artifact: Artifact = ForeignKey(Artifact, CASCADE, related_name="links_biologic")
biologic: Biologic = ForeignKey(Biologic, PROTECT, related_name="links_artifact")
Expand Down Expand Up @@ -517,7 +518,7 @@ class Meta(Record.Meta, TracksRun.Meta, TracksUpdates.Meta):
# return "\n".join(filter(None, result))


class ArtifactCompoundPerturbation(LinkORM, TracksRun):
class ArtifactCompoundPerturbation(BasicRecord, LinkORM, TracksRun):
id: int = models.BigAutoField(primary_key=True)
artifact: Artifact = ForeignKey(
Artifact, CASCADE, related_name="links_compound_perturbation"
Expand Down Expand Up @@ -593,7 +594,7 @@ class Meta(Record.Meta, TracksRun.Meta, TracksUpdates.Meta):
# return "\n".join(filter(None, result))


class ArtifactEnvironmentalPerturbation(LinkORM, TracksRun):
class ArtifactEnvironmentalPerturbation(BasicRecord, LinkORM, TracksRun):
id: int = models.BigAutoField(primary_key=True)
artifact: Artifact = ForeignKey(
Artifact, CASCADE, related_name="links_environmental_perturbation"
Expand Down Expand Up @@ -700,7 +701,7 @@ def members(self) -> QuerySet:
return self.genetic.all().union(self.compound.all(), self.environmental.all())


class ArtifactCombinationPerturbation(LinkORM, TracksRun):
class ArtifactCombinationPerturbation(BasicRecord, LinkORM, TracksRun):
id: int = models.BigAutoField(primary_key=True)
artifact: Artifact = ForeignKey(
Artifact, CASCADE, related_name="links_combination_perturbation"
Expand Down Expand Up @@ -760,7 +761,7 @@ class Meta(Record.Meta, TracksRun.Meta, TracksUpdates.Meta):
"""Artifacts linked to the biosample."""


class ArtifactBiosample(LinkORM, TracksRun):
class ArtifactBiosample(BasicRecord, LinkORM, TracksRun):
id: int = models.BigAutoField(primary_key=True)
artifact: Artifact = ForeignKey(Artifact, CASCADE, related_name="links_biosample")
biosample: Biosample = ForeignKey(Biosample, PROTECT, related_name="links_artifact")
Expand Down Expand Up @@ -808,7 +809,7 @@ class Meta(Record.Meta, TracksRun.Meta, TracksUpdates.Meta):
"""Artifacts linked to the techsample."""


class ArtifactTechsample(LinkORM, TracksRun):
class ArtifactTechsample(BasicRecord, LinkORM, TracksRun):
id: int = models.BigAutoField(primary_key=True)
artifact: Artifact = ForeignKey(Artifact, CASCADE, related_name="links_techsample")
techsample: Techsample = ForeignKey(
Expand Down Expand Up @@ -872,7 +873,7 @@ class Meta(Record.Meta, TracksRun.Meta, TracksUpdates.Meta):
"""Artifacts linked to the donor."""


class ArtifactDonor(LinkORM, TracksRun):
class ArtifactDonor(BasicRecord, LinkORM, TracksRun):
"""Link table between Artifacts and Donors."""

id: int = models.BigAutoField(primary_key=True)
Expand Down

0 comments on commit ea4a275

Please sign in to comment.