Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
0d2fc68
Merge pull request #85 from Kapersyx/fix/inlined-subclasses-with-desi…
kervel Sep 10, 2025
d48834b
feat(runtime): preserve explicit null values for collections and scal…
kervel Sep 10, 2025
eaf609d
chore: rustfmt and clippy fixes; avoid get(0) in tests
kervel Sep 10, 2025
d51ee4b
feat(diff): null/missing semantics; add treat_missing_as_null flag; t…
kervel Sep 10, 2025
a99c1e8
feat(diff): single flag treat_missing_as_null; explicit nulls as upda…
kervel Sep 10, 2025
7381afd
docs: testing guideline to extend existing tests instead of adding re…
kervel Sep 10, 2025
d317729
feat(runtime): add NodeIds to LinkMLValue and return PatchTrace from …
kervel Sep 10, 2025
3744161
refactor(runtime): implement LinkMLValue-native patch with incrementa…
kervel Sep 10, 2025
2c99faf
Refactor LinkMLValue builders and reuse in patch; fix fmt/clippy; res…
kervel Sep 10, 2025
6d9f753
fmt: apply rustfmt after refactor; clippy clean excluding linkml_meta
kervel Sep 10, 2025
be5dacc
diff: inline LinkMLValue builder calls; remove thin wrappers and unus…
kervel Sep 10, 2025
8746af6
diff: make patch panic-safe; return LResult and propagate errors inst…
kervel Sep 10, 2025
8af38c6
Merge pull request #4 from Kapernikov/feat/null-collections
kervel Sep 10, 2025
4e2b77e
Merge origin/main into feat/node-ids-patch-trace-clean: integrate Lin…
kervel Sep 10, 2025
3d99bd4
tests: update for Null variant; use JSON roundtrip instead of constru…
kervel Sep 10, 2025
91ec1de
diff: treat identifier/key changes as object replacement; add tests f…
kervel Sep 11, 2025
e078ce9
docs(runtime): clarify semantics of internal NodeId and PatchTrace fi…
kervel Sep 11, 2025
d9d57a4
Merge remote-tracking branch 'origin/feat/node-ids-patch-trace-clean'
Sep 11, 2025
5c31a7b
runtime: add LinkMLValue::equals per Instances spec; tests: add equal…
Sep 11, 2025
661e9ad
python: expose LinkMLValue.equals(); tests: add python_equals coverage
Sep 11, 2025
7c58d56
runtime: equals(treat_missing_as_null) and patch no-op skipping; patc…
Sep 11, 2025
4b34691
runtime: introduce PatchOptions {ignore_no_ops, treat_missing_as_null…
Sep 11, 2025
d5337fc
dummy commit to reopen PR
kervel Sep 12, 2025
edd36ed
Merge branch 'feat/node-ids-patch-trace-clean'
kervel Sep 12, 2025
7923100
Rename LinkMLValue to LinkMLInstance across runtime, tools, Python bi…
kervel Sep 14, 2025
1091908
Merge branch 'feat/rename-linkmlvalue-to-linkmlinstance'
kervel Sep 14, 2025
0e0862e
Paths: prefer identifier-based list addressing in diff; patch/navigat…
kervel Sep 14, 2025
71aa6d1
reduce artifact retention period to avoid hitting quota limits
kervel Sep 17, 2025
9504d45
Merge branch 'ci-artifact-storage'
kervel Sep 17, 2025
77b5b1b
Fix slot ranges not computed correctly due to two separate bugs: a cr…
Sep 18, 2025
8756c23
format
Sep 18, 2025
cf0b2d9
Fix slot ranges not computed correctly due to two separate bugs: a cr…
Sep 18, 2025
75bdfe6
Add overwrite_except_none merge strategy for SlotDefinition
Sep 18, 2025
2e3996c
Use schema-local converters for slot usage overrides
Sep 18, 2025
5c6f52b
Merge branch 'nfix-no-global-converter'
Sep 18, 2025
3d41ee4
Return Python patch result object
Sep 22, 2025
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
5 changes: 5 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ jobs:
with:
name: wheels-linux-${{ matrix.platform.target }}
path: src/python/dist
retention-days: 1

musllinux:
runs-on: ${{ matrix.platform.runner }}
Expand Down Expand Up @@ -131,6 +132,7 @@ jobs:
with:
name: wheels-musllinux-${{ matrix.platform.target }}
path: src/python/dist
retention-days: 1

windows:
runs-on: ${{ matrix.platform.runner }}
Expand Down Expand Up @@ -171,6 +173,7 @@ jobs:
with:
name: wheels-windows-${{ matrix.platform.target }}
path: src/python/dist
retention-days: 1

macos:
runs-on: ${{ matrix.platform.runner }}
Expand Down Expand Up @@ -204,6 +207,7 @@ jobs:
with:
name: wheels-macos-${{ matrix.platform.target }}
path: src/python/dist
retention-days: 1

sdist:
runs-on: ubuntu-latest
Expand All @@ -228,6 +232,7 @@ jobs:
with:
name: wheels-sdist
path: src/python/dist
retention-days: 1

release:
name: Release
Expand Down
8 changes: 5 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
## Project Structure & Module Organization
- `src/metamodel` (`linkml_meta`): Autogenerated metamodel types; optional Serde/PyO3.
- `src/schemaview` (`schemaview`/`linkml_schemaview`): Schema loading/resolution and views (SchemaView, ClassView, SlotView, EnumView).
- `src/runtime` (`linkml_runtime`): Core runtime (LinkMLValue parse/validate, diff/patch, turtle). Pure Rust lib.
- `src/runtime` (`linkml_runtime`): Core runtime (LinkMLInstance parse/validate, diff/patch, turtle). Pure Rust lib.
- `src/tools` (`linkml_tools`): CLI binaries: `linkml-validate`, `linkml-convert`, `linkml-diff`, `linkml-patch`, `linkml-schema-validate`.
- `src/python` (`linkml_runtime_python`): PyO3 bindings and Python package `linkml_runtime_rust._native` plus helpers.
- `src/wasm` (`linkml_wasm`): WASM build target.

## Build, Test, and Development Commands
- Build workspace: `cargo build --workspace`
- Run all tests: `cargo test --workspace`
- Format (check): `cargo fmt --all -- --check` | Fix: `cargo fmt --all`
- Format (check): `cargo +stable fmt --all -- --check` | Fix: `cargo +stable fmt --all`
- Lint: `cargo clippy -p schemaview -p linkml_runtime -p linkml_tools -p linkml_runtime_python -p linkml_wasm --all-targets --all-features -- -D warnings --no-deps` (excludes autogenerated `linkml_meta`)
- Run a CLI (example):
- Validate: `cargo run -p linkml_tools --bin linkml-validate -- src/runtime/tests/data/schema.yaml Person src/runtime/tests/data/person_valid.yaml`
Expand All @@ -25,12 +25,14 @@
- Python (bindings helpers): follow PEP 8; prefer type hints where feasible.

## Testing Guidelines
- When testing locally, always provide network access. never try to run the tests offline
- Add integration tests under `src/runtime/tests/` when changing CLI/runtime behavior.
- Prefer `assert_cmd` for CLI and `predicates` for output checks. Keep fixtures in `src/runtime/tests/data/`.
- Run `cargo test --workspace` locally; ensure tests don’t rely on network input.
- Prefer modifying existing tests over adding new ones for new code paths. Extend current scenarios with extra assertions/fixtures to avoid redundant tests proliferating. For example, if adding null-handling in diff/patch, enhance the existing diff tests rather than introducing separate "basic diff works" tests that become redundant.

## Commit & Pull Request Guidelines
- Commits: short, imperative summary (e.g., “Add __repr__ for LinkMLValue”); group related changes.
- Commits: short, imperative summary (e.g., “Add __repr__ for LinkMLInstance”); group related changes.
- PRs: include clear description, rationale, and usage examples; link issues; update docs/tests; ensure CI passes: fmt, clippy (no warnings), and tests.

### Pre-commit checklist
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# linkml-core

core linkml schema operations written in rust :)
core linkml schema operations written in rust

## Crates

- linkml_meta (`src/metamodel`): Autogenerated LinkML metamodel types and helpers. Optional Serde/PyO3 features for serialization and Python interop.
- schemaview (`src/schemaview`): Schema loading, CURIE/URI conversion, resolution (feature-gated), and view utilities: `SchemaView`, `ClassView`, `SlotView`, `EnumView`.
- linkml_runtime (`src/runtime`): Core runtime: `LinkMLValue` parsing (YAML/JSON), basic validation, diff/patch, and Turtle serialization. Pure Rust library.
- linkml_runtime (`src/runtime`): Core runtime: `LinkMLInstance` parsing (YAML/JSON), basic validation, diff/patch, and Turtle serialization. Pure Rust library.
- linkml_tools (`src/tools`): CLI tools wrapping the runtime and schemaview:
- `linkml-validate`, `linkml-convert`, `linkml-diff`, `linkml-patch`, `linkml-schema-validate`.
- linkml_runtime_python (`src/python`): PyO3 bindings and Python package (`linkml_runtime_rust._native`) exposing SchemaView and LinkMLValue to Python; includes small Python helpers.
- linkml_runtime_python (`src/python`): PyO3 bindings and Python package (`linkml_runtime_rust._native`) exposing SchemaView and LinkMLInstance to Python; includes small Python helpers.
- linkml_wasm (`src/wasm`): WASM build target (experimental).

## Regenerating the metamodel
Expand Down
Loading
Loading