Skip to content

Port: Improve alignment exception error reporting#303

Merged
pmachapman merged 1 commit into
mainfrom
alignment_exceptions
May 27, 2026
Merged

Port: Improve alignment exception error reporting#303
pmachapman merged 1 commit into
mainfrom
alignment_exceptions

Conversation

@pmachapman
Copy link
Copy Markdown
Collaborator

@pmachapman pmachapman commented May 21, 2026

Fixes #283


This change is Reviewable

@pmachapman pmachapman requested review from Enkidu93 and ddaspit May 21, 2026 01:41
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 21, 2026

Codecov Report

❌ Patch coverage is 57.89474% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.50%. Comparing base (b711bad) to head (4b2b05c).

Files with missing lines Patch % Lines
machine/corpora/n_parallel_text_corpus.py 58.33% 5 Missing ⚠️
machine/corpora/standard_parallel_text_corpus.py 60.00% 2 Missing ⚠️
machine/corpora/corpora_utils.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #303      +/-   ##
==========================================
- Coverage   91.53%   91.50%   -0.03%     
==========================================
  Files         355      355              
  Lines       23028    23042      +14     
==========================================
+ Hits        21079    21085       +6     
- Misses       1949     1957       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@Enkidu93 Enkidu93 left a comment

Choose a reason for hiding this comment

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

@Enkidu93 reviewed 3 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on ddaspit and pmachapman).


machine/corpora/corpora_utils.py line 20 at r1 (raw file):

def alignment_exception(refs: Iterable[str]) -> TypeError:
    return TypeError(
        f'Invalid format in {", ".join(refs)}. '

We should make this match the updated message in Machine.

Copy link
Copy Markdown
Contributor

@ddaspit ddaspit left a comment

Choose a reason for hiding this comment

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

@ddaspit reviewed 3 files and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on Enkidu93).


machine/corpora/corpora_utils.py line 20 at r1 (raw file):

Previously, Enkidu93 (Eli C. Lowry) wrote…

We should make this match the updated message in Machine.

Agreed. The equivalent of InvalidOperationException for Python would probably be RuntimeError.

@pmachapman pmachapman force-pushed the alignment_exceptions branch from ac4f647 to 4b2b05c Compare May 27, 2026 19:45
Copy link
Copy Markdown
Collaborator Author

@pmachapman pmachapman left a comment

Choose a reason for hiding this comment

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

@pmachapman made 1 comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on Enkidu93).


machine/corpora/corpora_utils.py line 20 at r1 (raw file):

Previously, ddaspit (Damien Daspit) wrote…

Agreed. The equivalent of InvalidOperationException for Python would probably be RuntimeError.

Done.

Copy link
Copy Markdown
Collaborator

@Enkidu93 Enkidu93 left a comment

Choose a reason for hiding this comment

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

@Enkidu93 reviewed 1 file and all commit messages, and resolved 1 discussion.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on pmachapman).

@pmachapman pmachapman merged commit d942a89 into main May 27, 2026
14 checks passed
@pmachapman pmachapman deleted the alignment_exceptions branch May 27, 2026 20:13
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.

Port 'Improve alignment exception error reporting'

4 participants