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

Handle refs to schedules #2354

Merged
merged 5 commits into from
Feb 11, 2025
Merged

Handle refs to schedules #2354

merged 5 commits into from
Feb 11, 2025

Conversation

longhotsummer
Copy link
Contributor

@longhotsummer longhotsummer commented Feb 10, 2025

Handles:

  • Schedule 1
  • Schedule 1 to 4
  • Schedule 1 and 4 (etc.)
  • the Schedule

Does not handle:

  • the First Schedule (etc.)

It works by looking for an <attachment> with an exact match on <heading>.

Copy link

github-actions bot commented Feb 10, 2025

Test Results

579 tests  +9   579 ✅ +9   4m 47s ⏱️ +15s
 60 suites ±0     0 💤 ±0 
 60 files   ±0     0 ❌ ±0 

Results for commit bbfd577. ± Comparison against base commit f660cea.

♻️ This comment has been updated with latest results.

@@ -361,7 +397,8 @@ class ProvisionRefsMatcher(CitationMatcher):

# this just finds the start of a potential match, the grammar looks for the rest
pattern_names = '|'.join(ProvisionRefsResolver.element_names.keys())
pattern_re = re.compile(fr'\b({pattern_names})\s+(\d|\([a-z0-9])', re.IGNORECASE)
the_schedule_patterns = '|'.join(['the schedule', 'die bylaag'])
Copy link
Contributor

Choose a reason for hiding this comment

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

is the French missing here, or how does this part fit in?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we don't currently support french at all when doing lookups - only the grammar supports it. I don't want to change that with this PR.

goose-life
goose-life previously approved these changes Feb 10, 2025
Copy link
Contributor

@goose-life goose-life left a comment

Choose a reason for hiding this comment

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

looks good but I'm not 100% clear on how it all fits together, perhaps we could talk through it if there's time this week?

@longhotsummer longhotsummer merged commit 6b3e32c into master Feb 11, 2025
4 checks passed
@longhotsummer longhotsummer deleted the schedule-refs branch February 11, 2025 11:40
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