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

Add definition method to OLS implementation #831

Merged
merged 7 commits into from
Mar 11, 2025
Merged

Conversation

cmungall
Copy link
Collaborator

  • Added definition and definitions methods to OLS implementation
  • Added LANGUAGE_TAG type to types.py
  • Fixed MRO issue by correcting inheritance hierarchy
  • Added tests for the new methods

This change completes the BasicOntologyInterface implementation in OLS adapter.

🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]

- Added definition and definitions methods to OLS implementation
- Added LANGUAGE_TAG type to types.py
- Fixed MRO issue by correcting inheritance hierarchy
- Added tests for the new methods

This change completes the BasicOntologyInterface implementation in OLS adapter.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Remove trailing whitespace to fix ruff check issues.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
- Remove unused imports
- Fix exception handling that doesn't use exception variable
- Fix import sorting

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
Split long lines into multiple lines using parenthesized multi-line strings.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
@cmungall cmungall requested a review from Copilot March 11, 2025 19:05

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds new definition methods to the OLS implementation, updates the inheritance order for the base class, and adjusts related tests and configuration files.

  • Introduces the definition and definitions methods with a dedicated definition cache.
  • Fixes the MRO issue by reordering base classes and updates tests to mock new functionality.
  • Updates YAML configuration files for typos and improves type definitions.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/oaklib/implementations/ols/ols_implementation.py Added definition methods, updated caching mechanism, and restructured inheritance order.
tests/test_implementations/test_ols.py Added and modified tests to cover the new definition methods and adjusted mock setups.
src/oaklib/datamodels/value_set_configuration.yaml Fixed a typo in the description and added missing descriptions to attributes.
src/oaklib/types.py Introduced a new LANGUAGE_TAG type.
src/oaklib/conf/lexmatch-rules-oboinowl-default.yaml Updated rule keys and corrected descriptions; potential issue in the regex for matching box brackets.
Comments suppressed due to low confidence (1)

src/oaklib/conf/lexmatch-rules-oboinowl-default.yaml:73

  • The regex for matching content in box brackets may be incorrect: using [^)] excludes a closing parenthesis rather than a closing bracket. Consider changing it to r'[[^\]]*]' to properly match text inside square brackets.
match: r'\[[^)]*\]'
@cmungall cmungall merged commit c0e053c into main Mar 11, 2025
9 checks passed
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