Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

### Added

- Added the initial FEGA metadata model, including entity, graph, profile, and shared-definition schemas with version metadata for the `2.0.0-draft.1` test release.
- Added the initial FEGA metadata model, including entity, graph, profile, and shared-definition schemas with component version metadata.
- Added JSON-LD contexts, frames, and example payloads for schema validation across [schemas/entities](schemas/entities), [schemas/graph](schemas/graph), and related directories.
- Added validation tooling and reusable Python helpers for JSON Schema, JSON-LD, RDF/SHACL, and Biovalidator checks in [scripts/py](scripts/py) and [src/fega_tools](src/fega_tools).
- Added automated release tooling for compatibility and version checks, structured release notes, manifests, changelogs, reproducible release candidates, and publication workflows.
Expand Down
54 changes: 27 additions & 27 deletions docs/releases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This guide describes the repository-discovered, PR-derived release process for m
Maintainers provide exactly three release inputs:
1. Structured `## Release notes` and exceptional `## Compatibility review` sections in ordinary PR bodies.
2. Top-level `meta:version` in each changed component schema.
3. A bundle version supplied when [**Prepare release**](../.github/workflows/prepare-release.yml) is dispatched.
3. A bundle version supplied when [**Prepare release**](../../.github/workflows/prepare_release.yml) is dispatched.

The manifest, changelog entry, citation version, URI rewrites, checksums, dependencies, and reports are generated and asserted.

Expand All @@ -21,11 +21,11 @@ The manifest, changelog entry, citation version, URI rewrites, checksums, depend
| R2 | Second candidate commit, restoring development URIs without changing release records. | `/main/` |
| `vX.Y.Z` | Immutable tag created only after the release PR is merged and publication is manually dispatched. | `/vX.Y.Z/` |

R1 contains the generated manifest, changelog entry, citation version, component versions, dependencies, URI rewrites, and immutable checksums. R2 is reconstructed from R1 and is required to be byte-for-byte deterministic. The release PR must be merged with a merge commit so R1 remains addressable.
R1 contains the generated manifest, changelog entry, citation version, component versions, dependencies, URI rewrites, and immutable checksums. R2 is reconstructed from R1 and is required to be byte-for-byte deterministic (i.e., no extra or missing edits). The release PR must be merged with a merge commit so R1 remains addressable.

## Git history example

The tag (for example, `v2.0.0`) placeholder is created at R1, with its exact tag-URI snapshot in the graph below. The _real_ tag (taking R1 commit) is created only after R2 restores `/main/` URIs, the release PR is merged, and a maintainer manually dispatches publication.
The tag (e.g., `v2.0.0`) placeholder is created at R1, with its exact tag-URI snapshot in the graph below. The _real_ tag (taking R1 commit) is created only after R2 restores `/main/` URIs, the release PR is merged, and a maintainer manually dispatches publication.

```mermaid
gitGraph
Expand All @@ -46,7 +46,7 @@ gitGraph

## End-to-end process

The diagram uses <span style="display:inline-block; padding:0 0.35em; border-radius:0.3em; background-color:#f4d35e; color:#111827;">yellow</span> for maintainer actions, <span style="display:inline-block; padding:0 0.35em; border-radius:0.3em; background-color:#bfdbfe; color:#111827;">blue</span> for automation, <span style="display:inline-block; padding:0 0.35em; border-radius:0.3em; background-color:#ddd6fe; color:#111827;">purple</span> for decisions, <span style="display:inline-block; padding:0 0.35em; border-radius:0.3em; background-color:#e5e7eb; color:#111827;">neutral grey</span> for repository state, <span style="display:inline-block; padding:0 0.35em; border-radius:0.3em; background-color:#c7d2fe; color:#111827;">indigo</span> for generated artefacts, <span style="display:inline-block; padding:0 0.35em; border-radius:0.3em; background-color:#bbf7d0; color:#111827;">green</span> for a completed release, and <span style="display:inline-block; padding:0 0.35em; border-radius:0.3em; background-color:#fca5a5; color:#111827;">red</span> for recovery. Happy-path arrows are animated.
The diagram uses yellow 🟡 for maintainer actions, blue 🔵 for automation, purple 🟣 for decisions, neutral grey ⚪ for repository state, indigo 🔷 for generated artefacts, green 🟢 for a completed release, and red 🔴 for recovery. Happy-path arrows are animated.

```mermaid
flowchart TB
Expand Down Expand Up @@ -168,7 +168,7 @@ Maintainer(s) only need to supply the three inputs [above](#process-at-a-glance)

The **release manifest** is an immutable inventory of the bundle: repository and source metadata, every active component with its schema version, identity, dependencies, schema/context/frame checksums, and one deterministic checksum per immediate standards group such as Beacon or Bioschemas. It does **not** record removed components, descriptions, or previous versions: absence in a newer inventory establishes removal, while PR and changelog history explains it.

Repository identity comes from an explicit argument, GitHub's `${{ github.repository }}`, or Git origin. First-party `$id`, `$ref`, context and frame URLs are rewritten for the repository performing the release, including forks and renamed repositories. This helps other developers or groups to fork the repository, and not need to edit the upstream-owner configuration file or code, as the information is inferred.
Repository identity comes from an explicit argument, GitHub's `${{ github.repository }}`, or Git origin. First-party `$id`, `$ref`, context and frame URLs are rewritten for the repository performing the release, including forks and renamed repositories. This helps other developers or groups (e.g., FEGA nodes) to fork the repository, and not need to edit the upstream-owner configuration file or code, as the information is inferred.

## Version and compatibility policy

Expand All @@ -178,66 +178,66 @@ Compatibility is an accepted-input lower bound, not proof that all data remains

Without an applicable rationale, `unknown` requires a major bump. A concrete rationale from a PR that changed the component or a reachable dependency permits a reviewed lower bump but still requires at least a version change. Examples do not prove compatibility.

The first intended published test release is the genuine prerelease `v2.0.0-draft.1`; the later official release is `v2.0.0`. Version 1 is intentionally skipped: v1 represents the current EGA model, unrelated to this repository's release series, yet releasing a v1 for this second iteration of the model would confuse users.
The first intended published test release is the genuine prerelease `v1.0.0-draft.1`.

## Local commands and CI gates

Run commands from the repository root with the pinned environment. The CLIs below are implemented and are useful for focused checks.

Discover components in the repository:
**Discover components** in the repository:

```console
env PYTHONPATH=src .venv/bin/python scripts/py/release.py discover -v
python3 scripts/py/release.py discover -v
```

Analyze semantic versioning for schema changes. The first form compares two explicit JSON files and is the debugging example for an isolated change:
Analyze **semantic versioning for schema changes**. The first form compares two explicit JSON files and is the debugging example for an isolated change:

```console
env PYTHONPATH=src .venv/bin/python scripts/py/release.py semver path/to/before.schema.json path/to/after.schema.json -v
python3 scripts/py/release.py semver path/to/before.schema.json path/to/after.schema.json -v
```

Select one discovered component with `--component`, or report all components with `--all`. Supply the prior tag (or branch name) with `--previous-ref` for analysis:

```console
env PYTHONPATH=src .venv/bin/python scripts/py/release.py semver --component process --previous-ref v1.2.3 -v
env PYTHONPATH=src .venv/bin/python scripts/py/release.py semver --all --previous-ref v1.2.3 -v
python3 scripts/py/release.py semver --component process --previous-ref v1.2.3 -v
python3 scripts/py/release.py semver --all --previous-ref v1.2.3 -v
```

Collect pull request metadata for release notes generation:
**Collect pull request metadata** for release notes generation:

```console
env PYTHONPATH=src .venv/bin/python scripts/py/release_notes.py collect --repository OWNER/REPOSITORY --previous-ref v1.2.3 --source-sha COMMIT_SHA --output prs.json -v
python3 scripts/py/release_notes.py collect --repository OWNER/REPOSITORY --previous-ref v1.2.3 --source-sha COMMIT_SHA --output prs.json -v
```

Generate changelog entries. Use `--dry-run` to preview output without writing; `-v` adds a verbose summary:
**Generate changelog entries**. Use `--dry-run` to preview output without writing:

```console
env PYTHONPATH=src .venv/bin/python scripts/py/release_notes.py changelog --bundle-version 2.0.0-draft.1 --release-date 2026-08-06 --prs-json prs.json --dry-run -v
python3 scripts/py/release_notes.py changelog --bundle-version 2.0.0-draft.1 --release-date 2026-08-06 --prs-json prs.json --dry-run -v
```

Bootstrap a new changelog file:
Start from scratch (i.e., bootstrap) with a new changelog file:

```console
env PYTHONPATH=src .venv/bin/python scripts/py/release_notes.py bootstrap-changelog --bundle-version 2.0.0-draft.1 --release-date 2026-08-06 --output /tmp/CHANGELOG.next.md
python3 scripts/py/release_notes.py bootstrap-changelog --bundle-version 2.0.0-draft.1 --release-date 2026-08-06 --output /tmp/CHANGELOG.next.md
```

Generate a release manifest with `--dry-run` to preview; JSON is printed by default or written with `-o`:
**Generate a release manifest** with `--dry-run` to preview:

```console
env PYTHONPATH=src .venv/bin/python scripts/py/release.py manifest --bundle-version 2.0.0-draft.1 --source-commit COMMIT_SHA --dry-run -o manifest.json
python3 scripts/py/release.py manifest --bundle-version 2.0.0-draft.1 --source-commit COMMIT_SHA --dry-run -o manifest.json
```

Verify schema and release configuration in development mode:
**Verify schema and release** configuration in development mode:

```console
env PYTHONPATH=src .venv/bin/python scripts/py/release.py verify --mode development -v
python3 scripts/py/release.py verify --mode development -v
```

The release-notes CLI also provides `validate-pr`, `render`, and `collect`; inspect `--help` for their required inputs before using them.

The independent required status checks are **Python tests**, **Schema compatibility**, **Schema examples**, **JSON-LD contexts**, **JSON-LD coverage**, **JSON-LD frames**, **RDF SHACL**, **PR release notes**, **Release policy**, and **Release consistency**. Release policy protects generated records on ordinary PRs; release consistency proves R1/R2 on `release/v…` PRs and reports not-applicable otherwise.

Validation workflows can also be **started manually** from GitHub Actions, so you can run these checks on different branches. `merge_group` ensures that required checks are reported for GitHub's temporary merge-queue commit as well as for the original pull request.
Validation workflows can also be **started manually** from GitHub Actions (e.g., click on [`Run workflow`](https://github.com/EGA-archive/fega-metadata-schema/actions/workflows/schema_examples.yml)), so you can run these checks on different branches. `merge_group` ensures that required checks are reported for GitHub's temporary merge-queue commit as well as for the original pull request.

## Human maintainer runbook

Expand All @@ -248,8 +248,8 @@ Validation workflows can also be **started manually** from GitHub Actions, so yo
3. Fill the PR template's strict `## Release notes` section. When compatibility is `unknown`, add a concrete `## Compatibility review` rationale.
4. Run a focused check such as:
````
env PYTHONPATH=src .venv/bin/python scripts/py/release.py discover -v
env PYTHONPATH=src .venv/bin/python scripts/py/release.py verify --mode development -v
python3 scripts/py/release.py discover -v
python3 scripts/py/release.py verify --mode development -v
````

> [!IMPORTANT]
Expand Down Expand Up @@ -285,7 +285,7 @@ In ``main``, use the commands in the [previous section](#local-commands-and-ci-g
2. Enter the bundle SemVer (e.g., `v2.0.0-draft.1`) and dispatch.
3. Inspect the run summary for the candidate branch, tag, R1 and R2, and inspect every failure log.

The workflow validates SemVer, confirms branch/tag names are unused, verifies development mode, discovers the previous tag or bootstrap path, generates records, proves R1 locally, creates exactly two commits, verifies R2 and pushes `release/vX.Y.Z` without force. On the first release it promotes the existing `[Unreleased]` text into `2.0.0-draft.1`; a later no-change promotion from that prerelease to `2.0.0` receives a generated promotion entry.
The workflow validates SemVer, confirms branch/tag names are unused, verifies development mode, discovers the previous tag or bootstrap path, generates records, proves R1 locally, creates exactly two commits, verifies R2 and pushes `release/vX.Y.Z` without force. On the first release it promotes the existing `[Unreleased]` text into the chosen bundle version; a later no-change promotion from that prerelease to its matching stable version receives a generated promotion entry.

> [!IMPORTANT]
> This is a maintainer gate: do not proceed until the preparation summary names the intended branch and both commit IDs and the run is successful.
Expand Down Expand Up @@ -337,7 +337,7 @@ After publication, inspect the immutable tag and GitHub Release, including the p
```console
gh release view v2.0.0-draft.1 --json tagName,isDraft,isPrerelease,assets,url
git ls-remote --tags origin refs/tags/v2.0.0-draft.1
env PYTHONPATH=src .venv/bin/python scripts/py/verify_remote_release.py --tag v2.0.0-draft.1 --repository OWNER/REPOSITORY --manifest build/release_manifest.json
python3 scripts/py/verify_remote_release.py --tag v2.0.0-draft.1 --repository OWNER/REPOSITORY --manifest build/release_manifest.json
```

> [!CAUTION]
Expand Down
2 changes: 1 addition & 1 deletion schemas/common/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$id": "https://raw.githubusercontent.com/EGA-archive/fega-metadata-schema/main/schemas/common/schema.json",
"type": "object",
"title": "EGA common metadata definitions",
"meta:version": "2.0.0-draft.1",
"meta:version": "1.0.0-draft.1",
"$async": true,
"description": "Metadata schema for common definitions inherited by other EGA metadata schemas.",
"@context": "./context.jsonld",
Expand Down
2 changes: 1 addition & 1 deletion schemas/entities/DAC/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$id": "https://raw.githubusercontent.com/EGA-archive/fega-metadata-schema/main/schemas/entities/DAC/schema.json",
"type": "object",
"title": "EGA Data Access Committee metadata schema",
"meta:version": "2.0.0-draft.1",
"meta:version": "1.0.0-draft.1",
"$async": true,
"description": "Metadata for an EGA Data Access Committee (DAC), the body managing data access requests, overseeing the approval process for data usage in accordance with its defined Policy.",
"$comment": "#! Instead of EGA stable IDs, the embedded memberships, agents and contact points use JSON-LD identifiers only, including fragment identifiers rooted at the DAC URI (e.g., ega:EGAC00000000001#contact-point-1).",
Expand Down
2 changes: 1 addition & 1 deletion schemas/entities/biomaterial/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$id": "https://raw.githubusercontent.com/EGA-archive/fega-metadata-schema/main/schemas/entities/biomaterial/schema.json",
"type": "object",
"title": "EGA Biomaterial metadata schema",
"meta:version": "2.0.0-draft.1",
"meta:version": "1.0.0-draft.1",
"$async": true,
"description": "Represents any biological material, from whole organisms (including humans) to subcellular components and macromolecules (e.g., DNA samples).",
"@context": "./context.jsonld",
Expand Down
2 changes: 1 addition & 1 deletion schemas/entities/cohort/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$id": "https://raw.githubusercontent.com/EGA-archive/fega-metadata-schema/main/schemas/entities/cohort/schema.json",
"type": "object",
"title": "EGA Cohort metadata schema",
"meta:version": "2.0.0-draft.1",
"meta:version": "1.0.0-draft.1",
"$async": true,
"description": "A group of Biomaterials (e.g., individuals, biopsies) sharing specific characteristics, facilitating comparative studies and discovery.",
"$comment": "We need to review that Cohorts can contain high-level (non granular) coverage of the biomaterials: populationCoverage, spatialCoverage and temporalCoverage. @Context for Beacon's entities is unfinished. Just a draft of the root properties for now. Ideally they'll have the context of their schemas embedded in them, so we can reference. Not quite there yet though.",
Expand Down
2 changes: 1 addition & 1 deletion schemas/entities/datafile/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$id": "https://raw.githubusercontent.com/EGA-archive/fega-metadata-schema/main/schemas/entities/datafile/schema.json",
"type": "object",
"title": "EGA Datafile metadata schema",
"meta:version": "2.0.0-draft.1",
"meta:version": "1.0.0-draft.1",
"$async": true,
"description": "A resource containing data that serves as an input to, or output from, a Process. Each Datafile belongs to one or more Datasets as an access-control and packaging unit. Includes a diverse range of formats (e.g., BAM, VCF, mzML) from multiple life science domains (e.g., genomics, imaging, phenoclinical, proteomics).",
"@context": "./context.jsonld",
Expand Down
2 changes: 1 addition & 1 deletion schemas/entities/dataset/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$id": "https://raw.githubusercontent.com/EGA-archive/fega-metadata-schema/main/schemas/entities/dataset/schema.json",
"type": "object",
"title": "EGA dataset metadata schema",
"meta:version": "2.0.0-draft.1",
"meta:version": "1.0.0-draft.1",
"$async": true,
"description": "A collection of Datafiles, published or curated by a single agent, and available for access or download in one or more representations. Datasets are subject to a particular policy for controlled-access, commonly making them the units of access distribution.",
"@context": "./context.jsonld",
Expand Down
2 changes: 1 addition & 1 deletion schemas/entities/policy/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$id": "https://raw.githubusercontent.com/EGA-archive/fega-metadata-schema/main/schemas/entities/policy/schema.json",
"type": "object",
"title": "EGA policy metadata schema",
"meta:version": "2.0.0-draft.1",
"meta:version": "1.0.0-draft.1",
"$async": true,
"description": "Data access policy, governing how data is processed, protected, and shared.",
"@context": "./context.jsonld",
Expand Down
2 changes: 1 addition & 1 deletion schemas/entities/process/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$id": "https://raw.githubusercontent.com/EGA-archive/fega-metadata-schema/main/schemas/entities/process/schema.json",
"type": "object",
"title": "EGA process metadata schema",
"meta:version": "2.0.0-draft.1",
"meta:version": "1.0.0-draft.1",
"$async": true,
"description": "A specific execution of a protocol or procedure, applied to specific inputs (Biomaterial or Datafile) and producing specific outputs (Biomaterial or Datafile).",
"@context": "./context.jsonld",
Expand Down
2 changes: 1 addition & 1 deletion schemas/entities/protocol/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$id": "https://raw.githubusercontent.com/EGA-archive/fega-metadata-schema/main/schemas/entities/protocol/schema.json",
"type": "object",
"title": "EGA protocol metadata schema",
"meta:version": "2.0.0-draft.1",
"meta:version": "1.0.0-draft.1",
"$async": true,
"description": "Detailed plan of instructions on how a procedure is done. For example, sample preparation, sequencing or feature extraction techniques.",
"@context": "./context.jsonld",
Expand Down
2 changes: 1 addition & 1 deletion schemas/entities/protocolCollection/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"$id": "https://raw.githubusercontent.com/EGA-archive/fega-metadata-schema/main/schemas/entities/protocolCollection/schema.json",
"type": "object",
"title": "EGA protocol collection metadata schema",
"meta:version": "2.0.0-draft.1",
"meta:version": "1.0.0-draft.1",
"$async": true,
"description": "A versioned composite plan containing one or more reusable Protocol records. It represents the plan applied by a Process at the submitter-selected granularity.",
"$comment": "Membership expresses inclusion only. We are not modelling the order of the steps, which could be done in the future if deemed worth it following the P-plan model. A collection may contain one protocol for a detailed Process or several protocols for a coarse Process.",
Expand Down
Loading
Loading