|
1 | | -# analysis-api-schema |
| 1 | +# BASALT |
2 | 2 |
|
3 | | -LinkML for the EMSL Science Cental MONet Analysis API schemas |
| 3 | +**Broad Analytical Schema for Samples and Laboratory Techniques** |
| 4 | + |
| 5 | +[](src/basalt_schema/schema/basalt_schema.yaml) |
| 6 | +[](https://linkml.io) |
| 7 | +[](https://www.python.org) |
| 8 | +[](LICENSE) |
| 9 | +[](https://EMSL-Computing.github.io/basalt-schema) |
| 10 | + |
| 11 | +LinkML schema for MONet/EMSL scientific data across **biogeochemical**, **biological**, and **environmental** domains. Canonical source of truth for samples, provenance, laboratory activities, and analytical products used by the Analysis API and database models. |
| 12 | + |
| 13 | +Formerly `analysis-api-schema`. |
| 14 | + |
| 15 | +| | | |
| 16 | +| --- | --- | |
| 17 | +| **Schema version** | `0.1.0` (see `version` in [`basalt_schema.yaml`](src/basalt_schema/schema/basalt_schema.yaml)) | |
| 18 | +| **Package** | `basalt_schema` (Python package version follows git tags via uv-dynamic-versioning) | |
| 19 | +| **Docs** | https://EMSL-Computing.github.io/basalt-schema | |
| 20 | +| **Repository** | https://github.com/EMSL-Computing/basalt-schema | |
| 21 | +| **Canonical URI** | https://EMSL-Computing.github.io/basalt-schema | |
4 | 22 |
|
5 | 23 | ## Repository Structure |
6 | 24 |
|
7 | 25 | * [examples/](examples/) - example data |
8 | 26 | * [project/](project/) - project files (do not edit these) |
9 | 27 | * [src/](src/) - source files (edit these) |
10 | | - * [analysis_api_schema](src/analysis_api_schema) |
11 | | - * [schema](src/analysis_api_schema/schema) -- LinkML schema |
12 | | - * [datamodel](src/analysis_api_schema/datamodel) -- generated |
| 28 | + * [basalt_schema](src/basalt_schema) |
| 29 | + * [schema](src/basalt_schema/schema) -- LinkML schema |
| 30 | + * [datamodel](src/basalt_schema/datamodel) -- generated |
13 | 31 | * [tests/](tests/) - Python tests |
14 | 32 | * [util/](util/) - Adhoc LinkML replacement code |
15 | 33 |
|
16 | | -## Developer Documentation |
| 34 | +## Versioning |
| 35 | + |
| 36 | +BASALT uses **semantic versioning** (`MAJOR.MINOR.PATCH`) for the schema: |
| 37 | + |
| 38 | +| Change type | Bump | Examples | |
| 39 | +| --- | --- | --- | |
| 40 | +| **MAJOR** | Breaking model changes | Rename/remove classes or required slots; change identifiers; incompatible range changes | |
| 41 | +| **MINOR** | Backward-compatible additions | New optional classes/slots/enums; new modules; expanded permissible values | |
| 42 | +| **PATCH** | Non-breaking fixes | Description/docs fixes; typo corrections; generator/tooling-only fixes that do not change the model | |
| 43 | + |
| 44 | +### How versions are recorded |
| 45 | + |
| 46 | +1. **Schema version (authoritative for the data model)** |
| 47 | + Set in the root schema file: |
| 48 | + ```yaml |
| 49 | + # src/basalt_schema/schema/basalt_schema.yaml |
| 50 | + version: 0.1.0 |
| 51 | + ``` |
17 | 52 |
|
18 | | -Windows and Powershell users: |
| 53 | +2. **Python package version** |
| 54 | + Derived from **git tags** (`v0.1.0`, `v0.2.0`, …) via [uv-dynamic-versioning](https://github.com/ninoseki/uv-dynamic-versioning). |
| 55 | + Installable package name: `basalt_schema`. |
| 56 | + |
| 57 | +3. **Release checklist** |
| 58 | + - [ ] Bump `version` in `src/basalt_schema/schema/basalt_schema.yaml` |
| 59 | + - [ ] Update the schema version badge / table in this README |
| 60 | + - [ ] Regenerate project artifacts if needed (`just gen-project`) |
| 61 | + - [ ] Merge to `main` |
| 62 | + - [ ] Tag the release: `git tag -a v0.1.0 -m "basalt-schema 0.1.0"` and push tags |
| 63 | + - [ ] Consumers pin or track the tag / package version |
| 64 | + |
| 65 | +Consumers (API, DB migrations, ingestion) should record which schema version they were built against. |
| 66 | + |
| 67 | +## Developer Documentation |
19 | 68 |
|
20 | 69 | ```bash |
21 | 70 | uv sync |
22 | | - |
23 | 71 | just gen-project |
24 | 72 | ``` |
25 | 73 |
|
| 74 | +Windows and PowerShell users can use the same commands when `uv` and `just` are installed. |
| 75 | + |
26 | 76 | ## Credits |
27 | 77 |
|
28 | | -This project was made with `LinkML` |
| 78 | +This material is free to use, and attribution is always appreciated. Attribution may read as follows: |
| 79 | + |
| 80 | +Authored by Conrad Mearns, Maia Kapur, Montana Smith, Beata Meluch, Aramy Truong, and Yuri E. Corilo at the Pacific Northwest National Laboratory, operated by Battelle for the U.S. Department of Energy. |
| 81 | + |
| 82 | +(Optional, if applicable): Please cite the following in your work: (Place Holder Zenodo) |
0 commit comments