Skip to content

Commit

Permalink
v1.2.1 Release (#153)
Browse files Browse the repository at this point in the history
* bump: `rich` to be compatible with Nautobot dependencies

---------

Co-authored-by: Jan Snasel <[email protected]>
  • Loading branch information
PhillSimonds and snaselj authored Jun 13, 2023
1 parent eb83536 commit f7b04cc
Show file tree
Hide file tree
Showing 7 changed files with 1,010 additions and 792 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v1.2.1

### Changes

- #152 Update requirement for rich to ^12.5.1

## v1.2.0 - 2023-06-05

### Adds
Expand Down
1,787 changes: 1,003 additions & 784 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ toml = "^0.10"
jinja2 = ">=2.11"
jsonref = "^0.2"
pydantic = "^1.6"
rich = "^9.5"
rich = ">=9.5"
jsonpointer = "^2.1"
jmespath = "^0.10"
ansible = { version = "^2.10.0", optional = true }
Expand Down
1 change: 0 additions & 1 deletion schema_enforcer/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ def validate(show_pass, show_checks, strict): # noqa D205
error_exists = False
for instance in ifm.instances:
for result in instance.validate(smgr, strict):

result.instance_type = "FILE"
result.instance_name = instance.filename
result.instance_location = instance.path
Expand Down
2 changes: 0 additions & 2 deletions schema_enforcer/schemas/jsonschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def validate(self, data, strict=False):

has_error = False
for err in validator.iter_errors(data):

has_error = True
self.add_validation_error(err.message, absolute_path=list(err.absolute_path))

Expand Down Expand Up @@ -137,7 +136,6 @@ def check_if_valid(self):
results = []
has_error = False
for err in validator.iter_errors(self.data):

has_error = True

results.append(
Expand Down
2 changes: 0 additions & 2 deletions schema_enforcer/schemas/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ def test_schemas(self):
error_exists = False

for schema_id, schema in self.iter_schemas():

schema_valid = schema.check_if_valid()
valid_results = self.test_schema_valid(schema_id)
invalid_results = self.test_schema_invalid(schema_id)
Expand Down Expand Up @@ -164,7 +163,6 @@ def test_schema_valid(self, schema_id, strict=False):
results = []

for root, filename in valid_files:

test_data = load_file(os.path.join(root, filename))

for result in schema.validate(test_data, strict=strict):
Expand Down
2 changes: 0 additions & 2 deletions schema_enforcer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ def is_part_of_excluded_dirs(current_dir):
search_directory = directory

for root, dirs, files in os.walk(search_directory): # pylint: disable=W0612

if is_part_of_excluded_dirs(root):
continue

Expand Down Expand Up @@ -437,7 +436,6 @@ def find_and_load_file(filename, formats=("yml", "yaml", "json")):
dict, list or None: content of the file in a python variable. None if no file could be found.
"""
for ext in formats:

file_ext = f"{filename}.{ext}"
if not os.path.isfile(file_ext):
continue
Expand Down

0 comments on commit f7b04cc

Please sign in to comment.