from lnschema_core import File

File.__doc__ = """Files: serialized data objects.

- Guide: :doc:`/guide/track`
- FAQ: :doc:`/faq/ingest`

Args:
   data: A file path or an in-memory data object to serialize.
   name: A name, required if an in-memory object is passed.
   source: The source of `data` (a :class:`~lamindb.Run`).
   id: The id of the file.
   format: Whether to use `h5ad` or `zarr` to store an `AnnData` object.

Often, files represent atomic datasets in object storage:
jointly measured observations of features (:class:`~lamindb.Features`).
They are generated by running code (:class:`~lamindb.Transform`),
instances of :class:`~lamindb.Run`.

Data objects often have canonical on-disk and in-memory representations. LaminDB
makes some configurable default choices (e.g., serialize a `DataFrame` as a
`.parquet` file).

Some datasets do not have a canonical in-memory representation, for
instance, `.fastq`, `.vcf`, or files describing QC of datasets.

.. note:: Examples for storage ⟷ memory correspondence:

   - Table: `.csv`, `.tsv`, `.parquet`, `.ipc`, `.feather`
     ⟷ `pd.DataFrame`, `polars.DataFrame`
   - Annotated matrix: `.h5ad`, `.h5mu`, `.zarr` ⟷ `anndata.AnnData`, `mudata.MuData`
   - Image: `.jpg`, `.png` ⟷ `np.ndarray`, ...
   - Tensor: zarr directory, TileDB store ⟷ zarr loader, TileDB loader
   - Fastq: `.fastq` ⟷ /
   - VCF: `.vcf` ⟷ /
   - QC: `.html` ⟷ /

"""
