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

Tighten up minutes identification, add test #36

Merged
merged 1 commit into from
Jan 16, 2025
Merged

Conversation

hancush
Copy link
Collaborator

@hancush hancush commented Jan 16, 2025

Overview

This title addresses the bug in Metro-Records/la-metro-councilmatic#1196

Namely, when there are multiple attachments to a matter representing the approval of minutes, it looks for both "minutes" and the name of the meeting body whose minutes we're looking for on the first page.

I also added a test, using the event with an error as fixture data, since it's a great test case.

Testing Instructions

  • Tested by the test!

Comment on lines +602 to +605
if all(
substr in cover_page_text.lower()
for substr in (name.lower(), "minutes")
):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I dig this solution!

assert "{} already exists as a key".format(event_key) in str(excinfo.value)


def test_multiple_minutes_candidates_handling(event_scraper, api_event):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test!

Copy link
Collaborator

@xmedr xmedr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All looks good! Ty for highlighting the changes amidst the linting ❤️

Comment on lines +602 to +605
if all(
substr in cover_page_text.lower()
for substr in (name.lower(), "minutes")
):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I dig this solution!

Comment on lines +1 to +4
{
"EventId": 2907,
"EventGuid": "01EE5D79-B958-46F9-B8EB-384B745A57EC",
"EventLastModifiedUtc": "2024-09-21T00:49:38.617",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always a fan of more data to test with

@hancush hancush merged commit df2d467 into main Jan 16, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants