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

Commit

Permalink
🚚 Rename Dataset to Collection (#330)
Browse files Browse the repository at this point in the history
* 🚚 Replace upper-case Dataset with Collection

* 🚚 Replace lower-case

* 🍱 Add migration

* πŸ’š Fix
  • Loading branch information
falexwolf authored Dec 23, 2023
1 parent 5503dc1 commit bfdf27a
Show file tree
Hide file tree
Showing 5 changed files with 188 additions and 92 deletions.
2 changes: 1 addition & 1 deletion lnschema_core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from .models import ( # type: ignore
Artifact,
CanValidate,
Dataset,
Collection,
Feature,
FeatureSet,
HasParents,
Expand Down
34 changes: 34 additions & 0 deletions lnschema_core/migrations/0037_rename_dataset_to_collection.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Generated by Django 4.2.5 on 2023-12-23 22:52

from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("lnschema_core", "0036_storage_description"),
]

operations = [
migrations.RenameModel(
old_name="Dataset",
new_name="Collection",
),
migrations.RenameModel(
old_name="DatasetFeatureSet",
new_name="CollectionFeatureSet",
),
migrations.RenameModel(
old_name="DatasetULabel",
new_name="CollectionULabel",
),
migrations.RenameField(
model_name="collectionfeatureset",
old_name="dataset",
new_name="collection",
),
migrations.RenameField(
model_name="collectionulabel",
old_name="dataset",
new_name="collection",
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Generated by Django 4.2.5 on 2023-12-23 23:10

import django.db.models.deletion
from django.db import migrations, models

import lnschema_core.users


class Migration(migrations.Migration):
dependencies = [
("lnschema_core", "0037_rename_dataset_to_collection"),
]

operations = [
migrations.AlterField(
model_name="collection",
name="artifact",
field=models.OneToOneField(null=True, on_delete=django.db.models.deletion.PROTECT, related_name="collection", to="lnschema_core.artifact"),
),
migrations.AlterField(
model_name="collection",
name="artifacts",
field=models.ManyToManyField(related_name="collections", to="lnschema_core.artifact"),
),
migrations.AlterField(
model_name="collection",
name="created_by",
field=models.ForeignKey(
default=lnschema_core.users.current_user_id, on_delete=django.db.models.deletion.PROTECT, related_name="created_collections", to="lnschema_core.user"
),
),
migrations.AlterField(
model_name="collection",
name="feature_sets",
field=models.ManyToManyField(related_name="collections", through="lnschema_core.CollectionFeatureSet", to="lnschema_core.featureset"),
),
migrations.AlterField(
model_name="collection",
name="input_of",
field=models.ManyToManyField(related_name="input_collections", to="lnschema_core.run"),
),
migrations.AlterField(
model_name="collection",
name="run",
field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.PROTECT, related_name="output_collections", to="lnschema_core.run"),
),
migrations.AlterField(
model_name="collection",
name="transform",
field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.PROTECT, related_name="output_collections", to="lnschema_core.transform"),
),
migrations.AlterField(
model_name="collection",
name="ulabels",
field=models.ManyToManyField(related_name="collections", through="lnschema_core.CollectionULabel", to="lnschema_core.ulabel"),
),
]
2 changes: 1 addition & 1 deletion lnschema_core/mocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class BackedAccessor:
pass


class MappedDataset:
class MappedCollection:
pass


Expand Down
Loading

0 comments on commit bfdf27a

Please sign in to comment.