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

BF: Fix bug and other improvement in SchemaBuilder.add_class() #338

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Commits on Aug 27, 2024

  1. BF: Correct SchemaBuilder.add_class()

    - Remove use of `kwargs` in setting `cls` if it's given as `ClassDefinition`
    - Correct detection of duplicating classes
    - Ensure `slots` is correct type when `use_attributes=True`
    candleindark committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    3f1aba5 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2024

  1. Update example in docstring of SchemaBuilder

    The example is outdated since `SchemaBuilder` no
    longer resides in `linkml.utils.schema_builder`
    candleindark committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    ba0a94f View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2024

  1. Bundle slots into a list if use_attributes is True

    In this way, the slot definition in `slots` can be added
    to the class as an attribute, better than raising an
    exception
    candleindark committed Sep 29, 2024
    Configuration menu
    Copy the full SHA
    e2256f1 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2024

  1. Remove the bundling of slots in to a list

    The bundling is actually not needed. The type
    annotation of `slots` already ensures that it is
    a list or `None`
    candleindark committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    40e3194 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8d8fc02 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5c6e3e0 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    81cbf46 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0d8ee2e View commit details
    Browse the repository at this point in the history
  6. Provide test for adding an existing class by name

    Test the case of adding a class with a name that is
    the same as a class that already exists in the schema
    candleindark committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    86bdd6a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    369391e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    bc7354b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    0517c22 View commit details
    Browse the repository at this point in the history
  10. Turn None values for slots and use_attributes to empty list and…

    … dict
    
    This can simplify the code
    candleindark committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    cf4c1a1 View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2024

  1. Add back support of kwargs param when cls param is a `ClassDefini…

    …tion`
    
    This time with detection of unsupported fields provided by
    `kwargs`
    candleindark committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    634286f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    90adb0b View commit details
    Browse the repository at this point in the history