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

FEAT: Commons IP schema validation #60

Merged
merged 10 commits into from
Aug 29, 2024
Merged

FEAT: Commons IP schema validation #60

merged 10 commits into from
Aug 29, 2024

Commits on Aug 11, 2024

  1. FEAT: Commons IP schema validation

    - removed expansions of status enums; and
    - added a `ruleId` alias for validation `rule_id`.
    carlwilson committed Aug 11, 2024
    Configuration menu
    Copy the full SHA
    491f9af View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2024

  1. Configuration menu
    Copy the full SHA
    e9dacbf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3f8ad91 View commit details
    Browse the repository at this point in the history
  3. FIX: Deserialisation of rule_id

    - added a `model_config` paramter to allow both `rule_id` and `ruleId` as keys in Pydantic model validation;
    - fixes issue with deserialisation of `rule_id` in `Rule` model.
    carlwilson committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    834fdfa View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9d7d6a4 View commit details
    Browse the repository at this point in the history
  5. FEAT: Convert commons-ip representations

    - added a `model_validator` to the `PackageDetails` class to convert incoming JSON dictionary to a `List` for now;
    - added PyDantic config to `Result` to allow multiple names for `rule_id` during validation;
    - reverted change to dictionary as it was not necessary;
    - added tests and data for deserialisation of commons-ip types; and
    - fixed minor compiler warnings.
    carlwilson committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    2935fdb View commit details
    Browse the repository at this point in the history
  6. Merge branch 'fix/commons-ip' of github.com:E-ARK-Software/eark-valid…

    …ator into fix/commons-ip
    carlwilson committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    ea44511 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2024

  1. FEAT: Final commons-ip compatibility tweaks

    - refactored `MetadataResults` to match `commons-ip`, it's probably better as well;
    - moved `name` from `InformationPackage` to `PackageDetails` class;
    - renamed `InformationPackage.package` to `InformationPackage.details`;
    - renamed existing `ValidationReport.convert_dict` validator to `ValidationReport.convert_representations_dict` (more explicit);
    - added a second validator, `VaidationReport.convert_checksum_ids`, to convert `commons-ip` checksum ids to `eark_validator` hyphenated form;
    - `is_valid` convenience property to `ValidationReport` class;
    - string constants for 'VALID' and 'INVALID'; and
    - fixed tests to accomodate.
    carlwilson committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    56deacc View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2024

  1. FIX: Support commons-ip use of NOTVALID

    - added `convert_status` validator to `MetadataResults` class to convert commons-ip `NOTVALID` status to `INVALID`;
    - moved checksum algorithm ID validation to the `PackageDetails` class;
    - added test and test data for status conversion; and
    - fixed type hinting for validation methods to `Any`.
    carlwilson committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    3d3ce76 View commit details
    Browse the repository at this point in the history
  2. REV: Tidier use of ROOT in structure.py

    As suggested in this [review comment](#60 (comment)), thanks.
    carlwilson committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    1c65fe9 View commit details
    Browse the repository at this point in the history