Skip to content

Commit

Permalink
πŸ’„ Prettify
Browse files Browse the repository at this point in the history
  • Loading branch information
falexwolf committed Nov 21, 2024
1 parent 1ac6cbf commit 3bed84e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
17 changes: 8 additions & 9 deletions docs/changelog/2024.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

## 2024-11-21 {small}`db 0.77.0 | bionty 0.53.0`

✨ Enable validation of `Literal` and other field types [PR](https://github.com/laminlabs/lamindb/pull/2177) [@sunnyosun](https://github.com/sunnyosun)
✨ Enable validation of `Literal` and other field types. [PR](https://github.com/laminlabs/lamindb/pull/2177) [@sunnyosun](https://github.com/sunnyosun)

- A `Literal`-typed `CharField` is validated for any `Record`:

Expand All @@ -39,15 +39,14 @@
#> β†’ valid values are: CRISPRa, CRISPRi
```

- You can leverage [Django's rich field validation](https://docs.djangoproject.com/en/stable/ref/validators/) by inheriting from `ValidateFields` and using dedicated field types or custom regex expressions:
- For custom field types, use [Django's rich field validation](https://docs.djangoproject.com/en/stable/ref/validators/) and subclass `ValidateFields`:

```python
from lnschema_core import Record, ValidateFields
from django.core.validators import RegexValidator

class Reference(Record, ValidateFields):
url: str = fields.URLField()
"""URL linking to the reference."""
doi: str = fields.CharField(
validators=[
RegexValidator(
Expand All @@ -56,7 +55,6 @@
)
],
)
"""A Digital Object Identifier (DOI)."""

Reference(doi="abc.ef", url="myurl.com")
#> FieldValidationError:
Expand All @@ -66,14 +64,15 @@
#> β†’ Must be a DOI (10.1000/xyz123 or https://doi.org/10.1000/xyz123)
```

These possibilities are now leveraged in all schema modules.
- These possibilities are now leveraged in all schema modules.

- 🎨 Leverage a more concise way for defining registries: [lnschema-core](https://github.com/laminlabs/lnschema-core/pull/452) [findrefs](https://github.com/laminlabs/findrefs/pull/2) [ourprojects](https://github.com/laminlabs/ourprojects/pull/2) [clinicore](https://github.com/laminlabs/clinicore/pull/14) [cellregistry](https://github.com/laminlabs/cellregistry/pull/2) [@sunnyosun](https://github.com/sunnyosun)
- 🎨 Squash migrations for faster instance creation: [lnschema-core](https://github.com/laminlabs/lnschema-core/pull/453) [bionty](https://github.com/laminlabs/bionty/pull/162) [wetlab](https://github.com/laminlabs/wetlab/pull/75) [@sunnyosun](https://github.com/sunnyosun)
- More concise registry definitions: [lnschema-core](https://github.com/laminlabs/lnschema-core/pull/452) [findrefs](https://github.com/laminlabs/findrefs/pull/2) [ourprojects](https://github.com/laminlabs/ourprojects/pull/2) [clinicore](https://github.com/laminlabs/clinicore/pull/14) [cellregistry](https://github.com/laminlabs/cellregistry/pull/2) [@sunnyosun](https://github.com/sunnyosun)
- Squash migrations for faster instance creation: [lnschema-core](https://github.com/laminlabs/lnschema-core/pull/453) [bionty](https://github.com/laminlabs/bionty/pull/162) [wetlab](https://github.com/laminlabs/wetlab/pull/75) [@sunnyosun](https://github.com/sunnyosun)

🍱 A revamped Nextflow guide that makes use of `nf-core/scrnaseq` [PR](https://github.com/laminlabs/nextflow-lamin/pull/42) [@Zethson](https://github.com/Zethson)
🍱 Overhauled Nextflow integration. [PR](https://github.com/laminlabs/nextflow-lamin/pull/42) [@Zethson](https://github.com/Zethson)

- The updated registration script for an `nf-core` pipeline run now leverages standardized `nf-core` metadata paths to associate it with the executed Nextflow run.
- The registration script now leverages standardized `nf-core` metadata paths
- Example use case is now more comprehensive and based on `nf-core/scrnaseq`

## 2024-11-15 {small}`db 0.76.16`

Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def pull_artifacts(session):
def docs(session):
run(
session,
"pip install --no-deps git+https://github.com/laminlabs/bionty git+https://github.com/laminlabs/wetlab git+https://github.com/laminlabs/findrefs git+https://github.com/laminlabs/clinicore git+https://github.com/laminlabs/cellregistry git+https://github.com/laminlabs/omop git+https://github.com/laminlabs/ourprojects",
"pip install --no-deps git+https://github.com/laminlabs/lnschema-core git+https://github.com/laminlabs/bionty git+https://github.com/laminlabs/wetlab git+https://github.com/laminlabs/findrefs git+https://github.com/laminlabs/clinicore git+https://github.com/laminlabs/cellregistry git+https://github.com/laminlabs/omop git+https://github.com/laminlabs/ourprojects",
)
run(
session,
Expand Down

0 comments on commit 3bed84e

Please sign in to comment.