Skip to content

Conversation

@bact
Copy link
Collaborator

@bact bact commented Jan 23, 2026

In case that an entry with a key "@type" does not exist.

There can be a case that "@type" does not exist.

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@github-actions
Copy link

github-actions bot commented Jan 23, 2026

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/shacl2code
  context.py 254
Project Total  

This report was generated by python-coverage-comment-action

@bact bact requested a review from JPEWdev January 23, 2026 09:52
@JPEWdev
Copy link
Owner

JPEWdev commented Jan 23, 2026

Can you add to the test context (tests/data/model/test-context.json) to exercise these code paths?

bact added 5 commits January 23, 2026 18:12
Update to latest upstream
Omitting @ type for xsd:string

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact
Copy link
Collaborator Author

bact commented Jan 24, 2026

Can you add to the test context (tests/data/model/test-context.json) to exercise these code paths?

Thank you for the review.

The @type is now removed from test-class/required-string-list-prop in tests/data/model/test-context.json to create a path that @type is missing.

When @type is not specified in JSON-LD, it will be treated as xsd:string.

I also have to remove the test for @type in property in tests/test_model_source.py because it is now not guaranteed.

@bact bact requested a review from JPEWdev January 24, 2026 13:34
@JPEWdev JPEWdev merged commit 8cddef6 into JPEWdev:main Jan 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants