Update underlying template to v0.4.2 & linkml to v1.10.0#64
Update underlying template to v0.4.2 & linkml to v1.10.0#64
Conversation
dalito
commented
Mar 3, 2026
- pre-commit hooks were updated
- various end-of-line/file fixes by pre-commit
- pre-commit hooks were updated - various end-of-line/file fixes by pre-commit
|
|
Hi @dalito, @StroemPhi and I ran into the same errors that you are currently running into. @StroemPhi has worked on a good bug fix doc and analysis, which we wanted to discuss with you tomorrow, I think. So maybe if Philip hasn't contacted you yet, wait until tomorrow, and we can share some insights. |
|
I looks to me like a linkml-runtime bug. But I need to verify. |
|
yes it is, here are some PR's touching on this issue @StroemPhi pinpointed it down slightly more. I will share more with you via RocketChat. |
Fallback key heuristic in
|
| Slot has identifier/key? | inlined_as_list? |
Old (1.9.6) | New (1.10.0) | Fix |
|---|---|---|---|---|
| Yes | Yes | _normalize_inlined_as_list |
_normalize_inlined_as_list |
_normalize_inlined_as_list (unchanged) |
| Yes | No | _normalize_inlined_as_dict |
_normalize_inlined_as_dict |
_normalize_inlined_as_dict (unchanged) |
| No | Yes | list comprehension | crash | list comprehension (restored) |
| No | No | fallback -> _normalize_inlined_as_dict |
fallback -> _normalize_inlined_as_dict |
fallback -> _normalize_inlined_as_dict (unchanged) |
Secondary issue in yamlutils._normalize_inlined
Independent of the gen-python fix, there are two latent bugs in linkml_runtime.utils.yamlutils._normalize_inlined that should be tracked separately:
- Line ~182:
slot_type(list_entry)passes a dict as a positional arg; should beslot_type(**as_dict(list_entry)) - Line ~160:
form_1doesn't handle the case whereraw_objis a list, causingTypeError
These are pre-existing bugs in linkml-runtime that are only exposed when _normalize_inlined_as_list is called with a non-identifier key. The gen-python fix avoids triggering them, but they should still be fixed defensively.
Environment
- Python 3.12
- linkml 1.10.0
- linkml-runtime (as shipped with linkml 1.10.0)
- OS: Windows/WSL2
Regression tests
The PR includes pytest tests covering all four cells of the behavior matrix. Each test generates Python from a minimal schema, compiles it, and loads data via yaml_loader. The critical regression test is test_no_identifier_inlined_as_list (cell 3) which reproduces the crash.
Related
- PR #3165 (introduced the change)
|
With the fixes proposed for linkml-runtime in linkml/linkml#3247 the tests here will pass. |