Prepare sync artifacts from a local instance to a cloud instance .md

!lamin disconnect
# need to add pertdb to environment in order to import it
!lamin settings modules set bionty,pertdb
import lamindb as ln
import bionty as bt
import pertdb
import pandas as pd
ln.setup.init(storage="./test-sync-to-cloud", modules="bionty,pertdb")
! re-setting django: avoid this by clearing the default instance on the command line via: lamin disconnect
→ initialized database testuser1/test-sync-to-cloud in /home/runner/work/lamindb/lamindb/docs/storage
artifact = ln.Artifact.from_dataframe(
    pd.DataFrame({"a": [1, 2, 3]}), description="test-sync-to-cloud"
).save()
features = bt.CellMarker.from_values(
    ["PD1", "CD21"], field=bt.CellMarker.name, organism="human"
).save()
artifact.features._add_schema(ln.Schema(features), slot="var")
organism = bt.Organism.from_source(name="human").save()
artifact.organisms.add(organism)
compound = pertdb.Compound(name="compound-test-sync-to-cloud").save()
artifact.compounds.add(compound)
artifact.describe()
! no run & transform got linked, call `ln.track()` & re-run
Artifact:  (0000)
|   description: test-sync-to-cloud
├── uid: m44HhTpDhmDepF840000  kind: dataset                      
│   otype: DataFrame           hash: 7F0eCLuuy8KQQC8r6A0S9Q       
│   size: 1.6 KB               branch: main                       
│   space: all                 created_at: 2026-11-02 14:19:36 UTC
│   created_by: testuser1      n_observations: 3                  
├── storage/path: 
│   /home/runner/work/lamindb/lamindb/docs/storage/test-sync-to-cloud/.lamindb/m44HhTpDhmDepF840000.parquet
├── Dataset features
│   └── var (2 bionty.CellMarker)                                                                                  
│       CD21                           num                                                                         
│       PD1                            num                                                                         
└── Entities
    └── .organisms                     bionty.Organism                      human                                  
        .compounds                     pertdb.Compound                      compound-test-sync-to-cloud            
assert artifact.features.slots["var"].members.count() == 2