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

Fix Jupyter notebooks #127

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Fix Jupyter notebooks #127

merged 1 commit into from
Oct 15, 2024

Conversation

ddaspit
Copy link
Contributor

@ddaspit ddaspit commented Oct 14, 2024

This change is Reviewable

@codecov-commenter
Copy link

codecov-commenter commented Oct 14, 2024

Codecov Report

Attention: Patch coverage is 54.90196% with 23 lines in your changes missing coverage. Please review.

Project coverage is 88.12%. Comparing base (e0e3f08) to head (0e5dc6a).

Files with missing lines Patch % Lines
machine/corpora/parallel_text_corpus.py 47.36% 10 Missing ⚠️
machine/translation/corpus_ops.py 36.36% 7 Missing ⚠️
machine/corpora/scripture_ref.py 0.00% 4 Missing ⚠️
machine/utils/string_utils.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #127      +/-   ##
==========================================
- Coverage   88.14%   88.12%   -0.03%     
==========================================
  Files         273      273              
  Lines       16010    16030      +20     
==========================================
+ Hits        14112    14126      +14     
- Misses       1898     1904       +6     

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

Copy link
Collaborator

@mshannon-sil mshannon-sil left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 6 of 7 files at r1, 4 of 4 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @ddaspit)


machine/corpora/usfm_stylesheet.py line 261 at r2 (raw file):

            first_line_indent = parse_float(entry_text)
            if first_line_indent is not None:
                tag.first_line_indent = int(first_line_indent * 1000)

Nit: It's not clear to me just from reading why first_line_indent is being multiplied by 1000. After looking it up it seems it might be because you need to convert to em or pt. Maybe renaming a variable or adding a comment could help. But if you think it's okay as is, feel free to ignore.

Copy link
Contributor Author

@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.

Reviewable status: 9 of 13 files reviewed, all discussions resolved (waiting on @mshannon-sil)


machine/corpora/usfm_stylesheet.py line 261 at r2 (raw file):

Previously, mshannon-sil wrote…

Nit: It's not clear to me just from reading why first_line_indent is being multiplied by 1000. After looking it up it seems it might be because you need to convert to em or pt. Maybe renaming a variable or adding a comment could help. But if you think it's okay as is, feel free to ignore.

This was inherited from Paratext. I did a bit more investigation into why Paratext was scaling the value by 1000 and discovered that it was because of a weird issue that was specific to Paratext. I changed it so it now stores the original float value. I also realized that left_margin and right_margin are float values as well and fixed them

@ddaspit ddaspit merged commit b7c06c8 into main Oct 15, 2024
13 of 14 checks passed
@ddaspit ddaspit deleted the fix-notebooks branch October 15, 2024 22:33
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.

3 participants