Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Predefined EMMO namespace with checking and label lookup #261

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

jesper-friis
Copy link
Contributor

@jesper-friis jesper-friis commented Nov 11, 2024

Description

Enable checking and label lookup by default for the EMMO namespace. The following now works out of the box

>>> from tripper import EMMO
>>> EMMO.Atom
'https://w3id.org/emmo#EMMO_eb77076b_a104_42ac_a065_798b2d2809ad'

Also implemented lazy loading of the triplestore when a Namespace with checking or label lookup is created. This ensures that we still can import tripper without having rdflib installed, although EMMO.Atom will fail with a ModuleNotFoundError.

Added workaround for a design bug in pytest - without the completely unmotivated special handling of the __wrapped__ attribute pytest would always fail during its collection phase. We should consider to replace pytest with a more decent test framework...

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?

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.30%. Comparing base (1d032c9) to head (cb73aff).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #261      +/-   ##
==========================================
+ Coverage   79.21%   79.30%   +0.09%     
==========================================
  Files          18       18              
  Lines        1727     1735       +8     
==========================================
+ Hits         1368     1376       +8     
  Misses        359      359              

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


🚨 Try these New Features:

@jesper-friis jesper-friis mentioned this pull request Nov 18, 2024
16 tasks
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.

2 participants