Skip to content

Commit

Permalink
requirements: Upgrade libcoveofds
Browse files Browse the repository at this point in the history
  • Loading branch information
jarofgreen committed Nov 29, 2022
1 parent 8cbef97 commit 4325fb4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion cove_ofds/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,16 @@ def process(self, process_data: dict) -> dict:
schema = OFDSSchema()
worker = AdditionalFields(schema)

context = {"additional_fields": worker.process(data)}
# Version 0.5 of lib introduces backwards incompatible changes to output;
# for now just put output back to how version 0.4 used to be.
output = worker.process(data)
output = [
[field_info["path"], field_info["field_name"], field_info["count"]]
for field, field_info in output.items()
if field_info["root_additional_field"]
]

context = {"additional_fields": output}
context["additional_fields_count"] = len(context["additional_fields"])

with open(self.data_filename, "w") as fp:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jsonref==0.2
# libcoveofds
jsonschema==4.17.0
# via libcoveofds
libcoveofds==0.4.0
libcoveofds==0.5.0
# via -r requirements.in
lxml==4.9.1
# via flattentool
Expand Down
2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jsonschema==4.17.0
# via
# -r requirements.txt
# libcoveofds
libcoveofds==0.4.0
libcoveofds==0.5.0
# via -r requirements.txt
libsass==0.21.0
# via -r requirements_dev.in
Expand Down

0 comments on commit 4325fb4

Please sign in to comment.