Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Dev/ux migration models fix #503

Closed
wants to merge 31 commits into from

Conversation

sbasan
Copy link
Collaborator

@sbasan sbasan commented Mar 1, 2024

Pull Request summary:

[Describe briefly what the PR is about]

Description of changes:

[Add more in depth analysis of what changed, provide logs, examples of usage]

Checklist:

  • Make sure to run pre-commit before committing changes
  • Make sure all checks have passed
  • PR description is clear and comprehensive
  • Mentioned the issue that this PR solves (if applicable)
  • Make sure you test the changes

Kuba and others added 30 commits February 8, 2024 20:38
* fix ux-2 schema breaking models, fix transform

* remove URL(Allow/Block)Parcel from overloaded methods
* Push UX2 - Create config group and feature profiles

* Simplify push_ux2_config

* UX2Config rework

* Refactor code for template definition normalization

This commit refactors the code responsible for normalizing template definitions by implementing improved type annotations, better function organization, and enhanced error handling. Key changes include:

1. Refactoring the to_snake_case function to use the str.replace method for kebab-case to snake_case conversion.
2. Improving the cast_value_to_global function to handle different types of input values, including lists and IP addresses, and utilizing IPv4Address and IPv6Address from the ipaddress module.
3. Enhancing the transform_dict function to handle nested dictionaries and lists, casting leaf values to global types recursively.
4. Updating the template_definition_normalization function to utilize the refactored transform_dict function for key transformation and value normalization.

These changes improve code readability, maintainability, and robustness, providing a more efficient and reliable solution for template definition normalization.

* Add tests for normalization and Literal casting

---------

Co-authored-by: Kuba <[email protected]>
Co-authored-by: sbasan <[email protected]>
Co-authored-by: Jakub Krajewski <[email protected]>
…dpoints

Dev/featureprofile system endpoints
update models for sdwandemo items
Added Feature Profile System Models for UX2
@sbasan sbasan closed this Mar 1, 2024
@sbasan sbasan deleted the dev/ux-migration-models-fix branch March 1, 2024 16:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants