Skip to content

Commit

Permalink
Refactor(eos_designs): Use python classes built from schemas for inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
ClausHolbechArista committed Nov 13, 2024
1 parent 8a750b4 commit eccd1ed
Show file tree
Hide file tree
Showing 280 changed files with 139,111 additions and 9,871 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Collapsing generated schemas from PR diff by default
/python-avd/pyavd/_eos_cli_config_gen/schema/eos_cli_config_gen.schema.yml linguist-generated=true -merge -diff
/python-avd/pyavd/_eos_designs/schema/eos_designs.schema.yml linguist-generated=true -merge -diff
/python-avd/pyavd/_eos_cli_config_gen/schema/__init__.py linguist-generated=true -merge -diff
/python-avd/pyavd/_eos_designs/schema/__init__.py linguist-generated=true -merge -diff

# Showing generated tables in PR diff by default by count as generated and automatically use the latest file on merge
/ansible_collections/arista/avd/roles/eos_cli_config_gen/docs/tables/* linguist-generated=true -merge diff
Expand Down
1 change: 1 addition & 0 deletions .github/yamllintrc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ rules:
- /ansible_collections/arista/avd/changelogs/fragments_backup/
- /ansible_collections/arista/avd/tests/inventory/**/expected_output/
- /python-avd/pyavd/**/schema/
- /python-avd/tests/**/artifacts/
- /.github/workflows/
new-lines:
type: unix
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ repos:
exclude: ansible_collections/arista/avd/molecule
- id: check-added-large-files
name: Prevents giant files from being committed.
exclude: (ansible_collections/arista/avd/molecule|pickle$)
exclude: (ansible_collections/arista/avd/molecule|pickle$|python-avd/pyavd/_(eos_cli_config_gen|eos_designs)/schema/__init__.py)
- id: check-merge-conflict
name: Checks for files that contain merge conflict strings.
exclude: ansible_collections/arista/avd/molecule
Expand Down Expand Up @@ -202,7 +202,7 @@ repos:
language: python
files: python-avd/pyavd/[a-z_]+/schema
pass_filenames: false
additional_dependencies: ['deepmerge>=1.1.0', 'PyYAML>=6.0.0', 'pydantic>=2.3.0', 'jsonschema-rs>=0.24', 'referencing>=0.35.0']
additional_dependencies: ['deepmerge>=1.1.0', 'PyYAML>=6.0.0', 'pydantic>=2.3.0', 'jsonschema-rs>=0.24', 'referencing>=0.35.0', 'ruff==0.7.2']

- id: templates
name: Precompile Jinja2 templates
Expand Down
3 changes: 2 additions & 1 deletion .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Python version
sonar.python.version=3.10, 3.11, 3.12, 3.13
# Exclude tests from source
sonar.exclusions=python-avd/tests/**
# Exclude generated classes
sonar.exclusions=python-avd/tests/**,python-avd/pyavd/_eos_cli_config_gen/schema/__init__.py,python-avd/pyavd/_eos_designs/schema/__init__.py
# Path to tests
sonar.tests=python-avd/tests
Loading

0 comments on commit eccd1ed

Please sign in to comment.