Skip to content

Commit

Permalink
🎨 Rename CanValidate to CanCurate
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnyosun committed Nov 15, 2024
1 parent 626d35c commit 457050c
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 23 deletions.
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ fail_fast: false
default_language_version:
python: python3
default_stages:
- commit
- push
- pre-commit
- pre-push
minimum_pre_commit_version: 2.12.0
repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.4
rev: v4.0.0-alpha.8
hooks:
- id: prettier
exclude: |
(?x)(
docs/changelog.md
)
- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
rev: 0.8.0
hooks:
- id: nbstripout
exclude: |
Expand All @@ -24,13 +24,13 @@ repos:
docs/notes/
)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.7
rev: v0.7.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --unsafe-fixes]
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: detect-private-key
- id: check-ast
Expand All @@ -44,7 +44,7 @@ repos:
- id: trailing-whitespace
- id: check-case-conflict
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.1
rev: v1.13.0
hooks:
- id: mypy
args: [--no-strict-optional, --ignore-missing-imports]
Expand Down
10 changes: 5 additions & 5 deletions clinicore/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Migration(migrations.Migration):
options={
"abstract": False,
},
bases=(lnschema_core.models.CanValidate, models.Model),
bases=(lnschema_core.models.CanCurate, models.Model),
),
migrations.CreateModel(
name="Medication",
Expand Down Expand Up @@ -179,7 +179,7 @@ class Migration(migrations.Migration):
bases=(
models.Model,
lnschema_core.models.HasParents,
lnschema_core.models.CanValidate,
lnschema_core.models.CanCurate,
),
),
migrations.CreateModel(
Expand Down Expand Up @@ -263,7 +263,7 @@ class Migration(migrations.Migration):
options={
"abstract": False,
},
bases=(lnschema_core.models.CanValidate, models.Model),
bases=(lnschema_core.models.CanCurate, models.Model),
),
migrations.CreateModel(
name="Project",
Expand Down Expand Up @@ -316,7 +316,7 @@ class Migration(migrations.Migration):
options={
"abstract": False,
},
bases=(lnschema_core.models.CanValidate, models.Model),
bases=(lnschema_core.models.CanCurate, models.Model),
),
migrations.CreateModel(
name="Treatment",
Expand Down Expand Up @@ -400,6 +400,6 @@ class Migration(migrations.Migration):
options={
"abstract": False,
},
bases=(lnschema_core.models.CanValidate, models.Model),
bases=(lnschema_core.models.CanCurate, models.Model),
),
]
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class Migration(migrations.Migration):
options={
"abstract": False,
},
bases=(lnschema_core.models.CanValidate, models.Model),
bases=(lnschema_core.models.CanCurate, models.Model),
),
migrations.AddField(
model_name="biosample",
Expand Down
16 changes: 7 additions & 9 deletions clinicore/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
)
from lnschema_core.models import (
Artifact,
CanValidate,
CanCurate,
Collection,
Feature,
LinkORM,
Expand All @@ -31,7 +31,7 @@
)


class ClinicalTrial(Record, CanValidate, TracksRun, TracksUpdates):
class ClinicalTrial(Record, CanCurate, TracksRun, TracksUpdates):
"""Models a ClinicalTrials.
Example:
Expand Down Expand Up @@ -85,7 +85,7 @@ class ArtifactClinicalTrial(Record, LinkORM, TracksRun):
feature_ref_is_name: bool | None = BooleanField(null=True, default=None)


class Biosample(Record, CanValidate, TracksRun, TracksUpdates):
class Biosample(Record, CanCurate, TracksRun, TracksUpdates):
"""Models a specimen derived from an patient, such as tissue, blood, or cells.
Examples:
Expand Down Expand Up @@ -144,7 +144,7 @@ class ArtifactBiosample(Record, LinkORM, TracksRun):
feature_ref_is_name: bool | None = BooleanField(null=True, default=None)


class Patient(Record, CanValidate, TracksRun, TracksUpdates):
class Patient(Record, CanCurate, TracksRun, TracksUpdates):
"""Models a patient in a clinical study.
Examples:
Expand Down Expand Up @@ -255,15 +255,13 @@ def __init__(
description: str | None,
parents: list[Medication],
source: Source | None,
):
...
): ...

@overload
def __init__(
self,
*db_args,
):
...
): ...

def __init__(
self,
Expand All @@ -290,7 +288,7 @@ class ArtifactMedication(Record, LinkORM, TracksRun):
feature_ref_is_name: bool | None = BooleanField(null=True, default=None)


class Treatment(Record, CanValidate, TracksRun, TracksUpdates):
class Treatment(Record, CanCurate, TracksRun, TracksUpdates):
"""Models compound treatments such as drugs.
Examples:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ ignore = [
# subprocess` call: check for execution of untrusted input - https://github.com/PyCQA/bandit/issues/333
"S603",
# Starting a process with a partial executable path
"S607"
"S607",
]

[tool.ruff.pydocstyle]
Expand Down

0 comments on commit 457050c

Please sign in to comment.