Skip to content

Add resources (classes) to the JSON-LD context.#366

Merged
jesper-friis merged 4 commits intomasterfrom
include-classes-in-context
Mar 29, 2025
Merged

Add resources (classes) to the JSON-LD context.#366
jesper-friis merged 4 commits intomasterfrom
include-classes-in-context

Conversation

@jesper-friis
Copy link
Contributor

@jesper-friis jesper-friis commented Mar 26, 2025

Description

From the data documentation in COLD we learned that it is useful to also include the classes in the JSON-LD context.

This makes it e.g. possible to short names when referring to classes in JSON-LD files. Ex: {"@type": "Resource", ...}

This PR is also used in PR #360 to replace keywords with JSON-LD context in many parts of the dataset API. The benefit with this is that this allows to use existing externally defined JSON-LD contexts.

Also added a __dir__() method to Keywords that include the documented attributes. It simplifies interactive exploration of Keyword instances using ipython (used while implementing this PR).

Type of change

  • Bug fix and code cleanup
  • New feature
  • Documentation update
  • Testing

Checklist for the reviewer

This checklist should be used as a help for the reviewer.

  • Is the change limited to one issue?
  • Does this PR close the issue?
  • Is the code easy to read and understand?
  • Do all new feature have an accompanying new test?
  • Has the documentation been updated as necessary?
  • Is the code properly tested?

@codecov
Copy link

codecov bot commented Mar 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.46%. Comparing base (aabd5ec) to head (681b326).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #366      +/-   ##
==========================================
+ Coverage   80.43%   80.46%   +0.02%     
==========================================
  Files          25       25              
  Lines        2970     2974       +4     
==========================================
+ Hits         2389     2393       +4     
  Misses        581      581              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jesper-friis jesper-friis merged commit ee1d4d9 into master Mar 29, 2025
19 checks passed
@jesper-friis jesper-friis deleted the include-classes-in-context branch March 29, 2025 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant