-
Notifications
You must be signed in to change notification settings - Fork 2
Update 8 19 2025 #273
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
Update 8 19 2025 #273
Conversation
The issue fixed is that some languages have book codes because they have non USFM resources associated with those books, but they do not have ny USFM, we still need to show the books available from these non-USFM resources. This was a regression from a few months ago that I didn't discover until testing zh language.
User can choose to use the faster and better HTML to PDF converter PrinceXml as long as they are OK with it putting a PrinceXml logo on the first page of the PDF (as per PrinceXml non-commercial license). * Default to not using PrinceXML for HTML to PDF conversion The assumption here (which may change later) is that users won't want the Prince PDF logo on the first page of the PDF (which is required by the non-commercial license). * Add backend test for using princexml * Update frontend tests and add a frontend test for princexml
This is a questionable change because it means that we don't catch invalid data in the data API as quickly for the case when content.resource_type is null (which is an invalid state). However, without this commit, if the data API returns content.resource_type null ever again, it zombies this app and others that depend on it as an API which is bad for users. After this commit this type of error will only be detected by a DOC user if they were expecting to see the offending record and it isn't present in the results.
This really speeds up DOC (and thus STET, and Passages apps). The cache duration is set to 3 minutes to approximately cover one user interaction span which greatly improves the perceived speed of the app(s).
Self documenting
Forgot to commit this an update or two ago while back
Also add conditional display of settings based on resources user has chosen
Some changes in the data API make it possible to bring some backend tests back online.
Put bible book name at top center and chapter and chapter number at top right.
It occurred with zh language at one point, but may have been transient.
This occurred once for ont language and ulb resource, but later rectified, so may have been data API related as it seemed to right itself later.
Dzongha (bo) language precipitated this in that it wouldn't render the proper font in PDF. This commit solves this and should solve many others like it.
Changes in results returned by data API
Add test for search by lang_code in STET
|
Hi Lang, I do prefer smaller PRs in general, but no need to break this one up. It will probably take a little time for me to get through it, but I'm looking forward to reviewing it. Thanks for your hard work! |
| (...) | ||
| >>> result[0] | ||
| ('gen', 'Gênesis') | ||
| >>> from doc.domain.resource_lookup import book_codes_for_lang |
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.
I always enjoy seeing Python doctests. They're such an elegant way of expressing the function's contract.
| } | ||
|
|
||
|
|
||
| def normalize_localized_book_name(localized_book_name: str) -> str: |
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.
This is a clever way to be generous in how we receive book names from the field.
This is a rather large PR. I can split it up if you like into smaller PRs, but if it isn't too much trouble to review I submit it in its current form just to save time splitting it up. Each commit message is carefully crafted, so hopefully each commit stands on its own clearly. I really prefer (for your sake) to use smaller PRs. This time the PRs, if separated, would be stacked and the review merge cycle would take many days as each depends on the other in some way with a few exceptions. Again, I am glad to split it if needed. I can cherry pick into different branches and give a succession of PRs one right after the other over several days with a few that could be simultaneous. Here are some of the notable things this PR includes: