A LinkML data model for OpenCloning
Project description
OpenCloning_LinkML
A LinkML data model for OpenCloning, a standardized schema for describing molecular cloning strategies and DNA assembly protocols.
Website
You can access the model documentation at https://opencloning.github.io/OpenCloning_LinkML
Migration from previous versions of the schema
If you have json files in older formats, you can migrate them to the latest version using the migrate command:
python -m opencloning_linkml.migrations.migrate file.json
This will create a new file with the same name but with the suffix _backup.json with the original data, and overwrite the original file with the migrated data.
You can also specify a target version to migrate to:
python -m opencloning_linkml.migrations.migrate file.json --target-version 0.2.9
And you can skip the backup (simply edit in place):
python -m opencloning_linkml.migrations.migrate file.json --no-backup
Developer Documentation
The python package can be installed from PyPI:
pip install opencloning-linkml
make all: make everythingmake deploy: deploys site
Creating a migration
To add a migration from version X.Y.Z to a new version A.B.C, follow these steps:
-
Archive the current model: Save a copy of the current Pydantic model to
src/opencloning_linkml/migrations/model_archive/vA_B_C.py. This file should contain the complete model classes for versionA.B.C(typically copied fromsrc/opencloning_linkml/datamodel/_models.pyafter generating the new version). -
Create the transformation file: Create a new file
src/opencloning_linkml/migrations/transformations/vX_Y_Z_to_vA_B_C.pywith a migration function -
Register the migration: Add the migration to
src/opencloning_linkml/migrations/__init__.py:- Import the migration function:
from .transformations.vX_Y_Z_to_vA_B_C import migrate_X_Y_Z_to_A_B_C - Add it to the
load_migrations()return dictionary:("X.Y.Z", "A.B.C"): migrate_X_Y_Z_to_A_B_C
- Import the migration function:
-
Add a test: Add a test to
tests/test_migration.pyto ensure the migration works as expected.
Example: See v0_2_8_to_v0_2_9.py for a simple transformation example, or v0_2_9_to_v_0_4_0.py for a more complex migration with ID remapping and structural changes.
Credits
This project was made with linkml-project-cookiecutter.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opencloning_linkml-0.4.7.tar.gz.
File metadata
- Download URL: opencloning_linkml-0.4.7.tar.gz
- Upload date:
- Size: 136.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6719e2550ec7d95a87c372f617d098786c55e1cd4e71c7ef38c9ef25bcc17a14
|
|
| MD5 |
5fabdb60e749cf3e03a28605368e6e1e
|
|
| BLAKE2b-256 |
e8072d38ac3846f1171190825f5084bdbb912c43fc3525ab7ed11198af7e74d4
|
Provenance
The following attestation bundles were made for opencloning_linkml-0.4.7.tar.gz:
Publisher:
pypi-publish.yaml on OpenCloning/OpenCloning_LinkML
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opencloning_linkml-0.4.7.tar.gz -
Subject digest:
6719e2550ec7d95a87c372f617d098786c55e1cd4e71c7ef38c9ef25bcc17a14 - Sigstore transparency entry: 729292281
- Sigstore integration time:
-
Permalink:
OpenCloning/OpenCloning_LinkML@2fdc2b63de13401aa0e7c57ee0feb47aa14bc8c6 -
Branch / Tag:
refs/tags/v0.4.7 - Owner: https://github.com/OpenCloning
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yaml@2fdc2b63de13401aa0e7c57ee0feb47aa14bc8c6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file opencloning_linkml-0.4.7-py3-none-any.whl.
File metadata
- Download URL: opencloning_linkml-0.4.7-py3-none-any.whl
- Upload date:
- Size: 72.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bc83e1171803abe003cbed87a8f112bb79ed42c9506329b476c386b0c843a82
|
|
| MD5 |
601ebc133fbe95d18ff77738cae429ef
|
|
| BLAKE2b-256 |
bb62bd90c3012cc3c88198d657e7aea631627f54e8d42dc035e451cc663f51e0
|
Provenance
The following attestation bundles were made for opencloning_linkml-0.4.7-py3-none-any.whl:
Publisher:
pypi-publish.yaml on OpenCloning/OpenCloning_LinkML
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
opencloning_linkml-0.4.7-py3-none-any.whl -
Subject digest:
5bc83e1171803abe003cbed87a8f112bb79ed42c9506329b476c386b0c843a82 - Sigstore transparency entry: 729292288
- Sigstore integration time:
-
Permalink:
OpenCloning/OpenCloning_LinkML@2fdc2b63de13401aa0e7c57ee0feb47aa14bc8c6 -
Branch / Tag:
refs/tags/v0.4.7 - Owner: https://github.com/OpenCloning
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yaml@2fdc2b63de13401aa0e7c57ee0feb47aa14bc8c6 -
Trigger Event:
release
-
Statement type: