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

fix(anta): Implement Pydantic class to replace RawCatalogInput type #906

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

Conversation

titom73
Copy link
Collaborator

@titom73 titom73 commented Oct 30, 2024

Description

Implement a pydantic class to replace typing definition of RawCatalogInput. So it can be used as a JSON schema to validate user input like inventory models.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have run pre-commit for code linting and typing (pre-commit run)
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (tox -e testenv)

@titom73 titom73 added the refactor Code refactoring label Oct 30, 2024
@titom73 titom73 self-assigned this Oct 30, 2024
@titom73 titom73 changed the title fix(anta): Implement Pydantic class to replace RawCatalogInputModel type fix(anta): Implement Pydantic class to replace RawCatalogInput type Oct 30, 2024
Copy link

codspeed-hq bot commented Oct 30, 2024

CodSpeed Performance Report

Merging #906 will not alter performance

Comparing titom73:fix/rawcataloginput-to-pydantic (3b38c85) with main (ec31346)

Summary

✅ 8 untouched benchmarks

@@ -35,8 +35,37 @@

logger = logging.getLogger(__name__)

# { <module_name> : [ { <test_class_name>: <input_as_dict_or_None> }, ... ] }
RawCatalogInput = dict[str, list[dict[str, Optional[dict[str, Any]]]]]
Copy link
Contributor

Choose a reason for hiding this comment

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

@titom73 titom73 closed this Nov 6, 2024
@titom73 titom73 reopened this Nov 6, 2024
Copy link

sonarcloud bot commented Nov 6, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Code refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants