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

Bump rich from 12.0.0 to 12.2.0 #4568

Merged
merged 2 commits into from
Apr 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions polling_stations/apps/data_importers/base_importers.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,12 @@ def report(self):

# save a static copy in the DB that we can serve up on the website
record = DataQuality.objects.get_or_create(council_id=self.council.pk)
record[0].report = report.generate_string_report()
record[0].num_stations = station_report.get_stations_imported()
record[0].num_districts = district_report.get_districts_imported()
record[0].num_addresses = address_report.get_addresses_with_station_id()

record[0].report = report.generate_string_report()
record[0].save()

# output to console
report.output_console_report()

@property
def data_path(self):
if getattr(settings, "PRIVATE_DATA_PATH", None):
Expand Down
7 changes: 1 addition & 6 deletions polling_stations/apps/data_importers/data_quality_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,7 @@ def build_report(self):
self.report.add_row(self.build_station_report())
self.report.add_row(self.build_address_report())

def output_console_report(self):
console = Console()
console.print(self.report)

def generate_string_report(self):
recorder = Console(record=True)
with recorder.capture():
recorder.print(self.report)
recorder.print(self.report)
return recorder.export_text()
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pyshp==2.2.0
raven==6.10.0
requests==2.27.1
retry==0.9.2
rich==12.0.0
rich==12.2.0
rtree==0.9.7
boto==2.49.0
boto3==1.21.38
Expand Down