Skip to content

Commit

Permalink
🎨 Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyosun committed Nov 21, 2024
1 parent a6631e6 commit 5d6335f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
14 changes: 5 additions & 9 deletions ourprojects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.db import models
from django.db.models import CASCADE, PROTECT
from lnschema_core import ids
from lnschema_core.fields import BooleanField, CharField, ForeignKey
from lnschema_core.fields import BooleanField, CharField, ForeignKey, URLField
from lnschema_core.models import (
Artifact,
CanCurate,
Expand Down Expand Up @@ -32,15 +32,11 @@ class Meta(Record.Meta, TracksRun.Meta, TracksUpdates.Meta):
"""Internal id, valid only in one DB instance."""
uid: str = CharField(unique=True, max_length=12, default=ids.base62_12)
"""Universal id, valid across DB instances."""
name: str = CharField(max_length=255, default=None, db_index=True)
name: str = CharField(db_index=True)
"""Title or name of the Project."""
abbr: str | None = CharField(
max_length=32, db_index=True, unique=True, null=True, default=None
)
abbr: str | None = CharField(max_length=32, db_index=True, unique=True, null=True)
"""A unique abbreviation."""
url: str | None = models.URLField(
max_length=255, null=True, default=None, blank=True
)
url: str | None = URLField(max_length=255, null=True, default=None)
"""A URL to view."""
artifacts: Artifact = models.ManyToManyField(
Artifact, through="ArtifactProject", related_name="Projects"
Expand All @@ -52,7 +48,7 @@ class ArtifactProject(Record, LinkORM, TracksRun):
id: int = models.BigAutoField(primary_key=True)
artifact: Artifact = ForeignKey(Artifact, CASCADE, related_name="links_project")
project: Project = ForeignKey(Project, PROTECT, related_name="links_artifact")
feature: Feature = ForeignKey(
feature: Feature | None = ForeignKey(
Feature,
PROTECT,
null=True,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ authors = [{name = "Lamin Labs", email = "[email protected]"}]
readme = "README.md"
dynamic = ["version", "description"]
dependencies = [
"lamindb"
"lamindb>=0.77.0"
]

[project.urls]
Expand Down

0 comments on commit 5d6335f

Please sign in to comment.