Skip to content

Commit

Permalink
Delimit execution stages in console output
Browse files Browse the repository at this point in the history
  • Loading branch information
eecavanna committed Jul 14, 2024
1 parent 3006ee5 commit 4a47072
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions refscan/refscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ def scan(
console.print(f"refscan version: {app_version}")
console.print(f"Schema version: {schema_view.schema.version}")

console.rule("[bold]Identifying references")

# Make a more self-documenting alias for the CLI option that can be specified multiple times.
names_of_source_collections_to_skip: list[str] = [] if skip_source_collection is None else skip_source_collection

Expand Down Expand Up @@ -182,6 +184,8 @@ def scan(
if verbose:
console.print(references.as_table())

console.rule("[bold]Scanning for violations")

# Get a dictionary that maps source class names to the names of their fields that can contain references.
reference_field_names_by_source_class_name = references.get_reference_field_names_by_source_class_name()

Expand Down Expand Up @@ -315,6 +319,8 @@ def scan(
# Close the connection to the MongoDB server.
mongo_client.close()

console.rule("[bold]Results summary")

# Create a violation report in TSV format — for all collections combined.
all_violations = ViolationList()
for collection_name, violations in sorted(source_collections_and_their_violations.items(), key=get_lowercase_key):
Expand Down

0 comments on commit 4a47072

Please sign in to comment.