-
-
Notifications
You must be signed in to change notification settings - Fork 3
Detect quote convention from file Paratext project #224
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Enkidu93 reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion
machine/corpora/file_paratext_project_quote_convention_detector.py
line 18 at r1 (raw file):
return (Path(self._project_dir) / file_name).exists() def _open(self, file_name: str) -> Optional[BinaryIO]:
I don't think this method can ever return None
, so you don't need Optional
. Also, you should use StrPath
rather than str
consistently here to match the other file_...
implementation classes.
(Just remembering that this isn't in yet - https://reviewable.io/reviews/sillsdev/silnlp/806#-OZdHeea77ETxx9aywUn. As soon as this is in, I can release a new machine.py version) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #224 +/- ##
=======================================
Coverage 91.11% 91.11%
=======================================
Files 333 333
Lines 21706 21706
=======================================
Hits 19778 19778
Misses 1928 1928 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @ddaspit and @Enkidu93)
machine/corpora/file_paratext_project_quote_convention_detector.py
line 18 at r1 (raw file):
Previously, Enkidu93 (Eli C. Lowry) wrote…
I don't think this method can ever return
None
, so you don't needOptional
. Also, you should useStrPath
rather thanstr
consistently here to match the otherfile_...
implementation classes.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Enkidu93 reviewed 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @ddaspit)
This PR adds a class that can detect the quote convention for a Paratext project from a project directory. This class will primarily be used by SILNLP to detect the quote convention for the source and target projects.
This change is