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

Entity factory and cleanup #21

Merged
merged 50 commits into from
Apr 3, 2024
Merged

Entity factory and cleanup #21

merged 50 commits into from
Apr 3, 2024

Commits on Oct 27, 2023

  1. Start adding more validation

    Update the DataSource factory - should be a SOFT7Instance factory
    instead with proper validation of property metadata and more.
    CasperWA committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    e6e5307 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    938357f View commit details
    Browse the repository at this point in the history
  3. Add tests for the SOFT7Entity pydantic model

    Add pytest and pytest-cov dependencies, along with a new `testing`
    installable extra.
    CasperWA committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    7494a0f View commit details
    Browse the repository at this point in the history
  4. Update tests

    Remove tests for the now re-written SOFT7EntityPropertyType (previously
    an Enum, now just a Literal collection with an associated mapping).
    CasperWA committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    48dcd41 View commit details
    Browse the repository at this point in the history
  5. Remove unused validator

    Satisfy mypy
    CasperWA committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    3a97e6a View commit details
    Browse the repository at this point in the history
  6. Use 'entity' instead of 'data_model' for var name

    Also, rename create_entity() to create_datasource().
    
    Ensure the create_datasource() function returns an instantiated model.
    CasperWA committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    6655687 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    21c956d View commit details
    Browse the repository at this point in the history
  8. Create MixIn class for the special getattribute

    This can now be used in both the SOFT7DataSource model as well as the
    new DataSourceDimensions model.
    
    Add `requests-mock` dependency. Consider using "python" backend for
    OTELib instead to avoid mocking requests.
    
    Remove all filterwarnings from pytest config.
    CasperWA committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    75dd10c View commit details
    Browse the repository at this point in the history
  9. Copy over fixtures from oteapi-core

    New test using python otelib backend.
    CasperWA committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    2436228 View commit details
    Browse the repository at this point in the history
  10. New test for inspecting data source

    Added test for serializing
    CasperWA committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    83cbebb View commit details
    Browse the repository at this point in the history
  11. Add beginnings for JSON serialization tests

    All the serialization tests (including JSON Schema) must be extended to
    ensure not just that it _can_ be serialized, but that the content is
    also what would be expected.
    CasperWA committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    6149a9a View commit details
    Browse the repository at this point in the history
  12. Implement proper attributes serialization

    Implemented as a pydantic model_serializer in "wrap" mode.
    
    Temporarily changed the otelib dependency to point to a git branch on
    GitHub that implements migration to pydantic v2.
    CasperWA committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    a3399d6 View commit details
    Browse the repository at this point in the history
  13. Finish serialization tests

    Make the namespace an AnyUrl.
    CasperWA committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    8e0cfe7 View commit details
    Browse the repository at this point in the history
  14. Use otelib >=v0.4.0

    CasperWA committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    53e063b View commit details
    Browse the repository at this point in the history
  15. Use --cov-report=term-missing option for pytest

    Quick (but proper) solutions to ever so slightly decrease the number of
    uncovered lines.
    CasperWA committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    a1b2ac8 View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2023

  1. Move stuff from factory to pydantic models

    Specifically, move all the "helper"/utility functionalities from
    `datasource_factory.py` to a new `soft7_instance.py` under
    pydantic_models.
    CasperWA committed Nov 7, 2023
    Configuration menu
    Copy the full SHA
    013b8fd View commit details
    Browse the repository at this point in the history
  2. Update pre-commit hooks, add pyupgrade hook

    Run hooks on all files, upgrading them accordingly.
    CasperWA committed Nov 7, 2023
    Configuration menu
    Copy the full SHA
    c9824c3 View commit details
    Browse the repository at this point in the history
  3. Add public factory classes

    Make factory functions importable from `s7.factories` as `create_*`,
    where * matches the name of any `*_factory.py` file in the folder.
    CasperWA committed Nov 7, 2023
    Configuration menu
    Copy the full SHA
    0b02b10 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f45da32 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    97cedaa View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2023

  1. Configuration menu
    Copy the full SHA
    9f21ef7 View commit details
    Browse the repository at this point in the history
  2. Update ruff rules

    Split ruff hook for core code base code and non-core.
    CasperWA committed Nov 8, 2023
    Configuration menu
    Copy the full SHA
    71d11d1 View commit details
    Browse the repository at this point in the history

Commits on Nov 13, 2023

  1. Further work on SOFT7 Entity instances

    Started to flesh out an OTEAPI function strategy plugin for converting
    between a parsed data source to a SOFT7 Entity instance.
    CasperWA committed Nov 13, 2023
    Configuration menu
    Copy the full SHA
    03a9d69 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3f84ace View commit details
    Browse the repository at this point in the history

Commits on Nov 14, 2023

  1. Finish everything

    Missing finalizing example in notebook.
    CasperWA committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    9b11c1a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e9891ea View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9fad8b5 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2023

  1. Further upgrades

    There is a design issue here with nested entities that should be fixable
    in a more elegant way
    CasperWA committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    f523644 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5e3fb54 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2023

  1. Further improvements

    Need to fix setting ClassVar on EntityInstance and the validator for the
    same.
    CasperWA committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    acae39c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9aee4e8 View commit details
    Browse the repository at this point in the history

Commits on Nov 17, 2023

  1. Configuration menu
    Copy the full SHA
    743a642 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d4864a4 View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2023

  1. Fix tests for the new implementation

    Add a YAML parse strategy for OTEAPI.
    CasperWA committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    dc527ec View commit details
    Browse the repository at this point in the history
  2. Ignore importlib.metadata deprecation warning

    See issue #395 in oteapi-core to follow up on when this ignore statement
    can be removed.
    CasperWA committed Dec 6, 2023
    Configuration menu
    Copy the full SHA
    0e80aeb View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2024

  1. Configuration menu
    Copy the full SHA
    c43b9fb View commit details
    Browse the repository at this point in the history
  2. Remove all the noise in the repo

    Focus on:
    - the entity_instance factory
    - the OTEAPI plugins
    - the pydantic models
    CasperWA committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    6a39338 View commit details
    Browse the repository at this point in the history
  3. Use type aliases

    These should be removed when supporting Python 3.10+.
    
    Pydantic does not support new-style type notation in Python 3.9.
    CasperWA committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    453278b View commit details
    Browse the repository at this point in the history
  4. Remove unused file

    CasperWA committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    7b2ca26 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2024

  1. Configuration menu
    Copy the full SHA
    2de0039 View commit details
    Browse the repository at this point in the history
  2. Remove unused dependencies

    Update pre-commit hooks
    CasperWA committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    3b81e1f View commit details
    Browse the repository at this point in the history
  3. Update dependency versions

    CasperWA committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    d36d422 View commit details
    Browse the repository at this point in the history
  4. Update to use at minimum Python 3.10

    Update GH Actions.
    Update ruff rules.
    CasperWA committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    68a108d View commit details
    Browse the repository at this point in the history
  5. Support the new OTEAPI Core session handling

    Finalize update to Python 3.10
    CasperWA committed Feb 21, 2024
    Configuration menu
    Copy the full SHA
    a4b2e50 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2024

  1. Configuration menu
    Copy the full SHA
    3b63d6d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1f0a69f View commit details
    Browse the repository at this point in the history
  3. Revert to support Python 3.9

    CasperWA committed Feb 23, 2024
    Configuration menu
    Copy the full SHA
    48533d0 View commit details
    Browse the repository at this point in the history

Commits on Mar 18, 2024

  1. Update dependencies

    CasperWA committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    ddc294b View commit details
    Browse the repository at this point in the history
  2. Update pre-commit hooks

    CasperWA committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    f183d89 View commit details
    Browse the repository at this point in the history
  3. Update GH Actions

    CasperWA committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    9ca8a48 View commit details
    Browse the repository at this point in the history