Skip to content
Open
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ The format is inspired by [Keep a Changelog](https://keepachangelog.com/en/1.1.0

[Full changelog](https://github.com/linkml/linkml-project-copier/compare/v0.5.0...main)

### Fixed

- `just gen-project` no longer overwrites the OWL that `config.yaml` configures.
`LINKML_GENERATORS_OWL_ARGS` is gone; set OWL options in `config.yaml`.

## Release [0.5.0] - 2026-05-27

[Full changelog](https://github.com/linkml/linkml-project-copier/compare/v0.4.2...v0.5.0)
Expand Down
5 changes: 0 additions & 5 deletions template/config.public.mk.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ LINKML_GENERATORS_CONFIG_YAML=config.yaml
## pass args if gendoc ignores config.yaml (i.e. --no-mergeimports)
LINKML_GENERATORS_DOC_ARGS=

## pass args to workaround genowl rdfs config bug (linkml#1453)
## (i.e. --no-type-objects --no-metaclasses --metadata-profile=rdfs)
# LINKML_GENERATORS_OWL_ARGS="--no-type-objects --no-metaclasses --metadata-profile=rdfs"
LINKML_GENERATORS_OWL_ARGS=

## pass args to pydantic generator which isn't supported by gen-project
## https://github.com/linkml/linkml/issues/2537
LINKML_GENERATORS_PYDANTIC_ARGS=
6 changes: 0 additions & 6 deletions template/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ config_yaml := if env_var_or_default("LINKML_GENERATORS_CONFIG_YAML", "") != ""
}
gen_doc_args := env_var_or_default("LINKML_GENERATORS_DOC_ARGS", "")
gen_java_args := env_var_or_default("LINKML_GENERATORS_JAVA_ARGS", "")
gen_owl_args := env_var_or_default("LINKML_GENERATORS_OWL_ARGS", "")
gen_pydantic_args := env_var_or_default("LINKML_GENERATORS_PYDANTIC_ARGS", "")
gen_ts_args := env_var_or_default("LINKML_GENERATORS_TYPESCRIPT_ARGS", "")

Expand Down Expand Up @@ -150,11 +149,6 @@ gen-project:
fi
uv run gen-typescript {{gen_ts_args}} {{source_schema_path}} > {{dest}}/typescript/{{schema_name}}.ts

@if [ ! -d "{{dest}}/owl" ]; then \
mkdir -p {{dest}}/owl ; \
fi
uv run gen-owl {{gen_owl_args}} {{source_schema_path}} > "{{dest}}/owl/{{schema_name}}.owl.ttl"

# ============== Migrations recipes for Copier ==============

# Hidden command to adjust the directory layout on upgrading a project
Expand Down
15 changes: 15 additions & 0 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,18 @@ def test_just_gen_doc(integration_project):
assert result.returncode == 0, (
f"just gen-doc failed:\nstdout: {result.stdout}\nstderr: {result.stderr}"
)


def test_just_gen_project_owl_follows_config(integration_project):
"""The OWL file holds what config.yaml's owl section asks for."""
result = run_just(integration_project, "gen-project")
assert result.returncode == 0, (
f"just gen-project failed:\nstdout: {result.stdout}\nstderr: {result.stderr}"
)
owl = (integration_project / "project" / "owl" / "test_schema.owl.ttl").read_text(
encoding="utf-8"
)
# add_root_classes: true makes each class a subclass of linkml:ClassDefinition.
assert "linkml:ClassDefinition" in owl
# gen-project names the ontology by the schema's id, without a file suffix.
assert ".owl.ttl>" not in owl
Loading