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

Basic background assembly implementation #890

Merged
merged 7 commits into from
Oct 30, 2024
Merged

Conversation

nonprofittechy
Copy link
Member

Fix #788 fix #184

This refactors the document generation functionality in download_list_html into a new function, get_cacheable_documents, and adds some simple events that can be used for background assembly.

Additionally, it adds a single downloadable PDF row to the download screen.

This adds 2 tasks that are available for any bundle:

generate_downloads_with_docx_task and generate_downloads_task. Each task populates the _downloadable_files attribute of the bundle, either with or without the accompanying original DOCX files (when available).

test_aldocument_background_assembly.yml shows an example workflow for using the new background assembly functionality.

@KelizaMcGuire

Copy link

@samglover samglover left a comment

Choose a reason for hiding this comment

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

Not sure I would spot a code problem, but it sounds like a good upgrade.

@nonprofittechy nonprofittechy merged commit 11772f1 into main Oct 30, 2024
4 of 5 checks passed
@nonprofittechy nonprofittechy deleted the background-assembly branch October 30, 2024 20:09
@ekressmiller
Copy link

ekressmiller commented Nov 15, 2024

@nonprofittechy, would it be possible to add the use_previously_cached_files option to send_email as well so that it could likewise use files generated in the background?

@ekressmiller
Copy link

@nonprofittechy, is there a way to use this method while still allowing an "Edit" button (taking you to the review screen) on the download screen?

I just tested:

  1. arrive at the download screen
  2. click button to go to the review screen and change a variable
  3. resume interview, which returns me to the download screen

Since use_previously_cached_files is True, the change I made was not reflected in the assembled docs.

Copy link
Member Author

no, it doesn't work with the edit button. I suggest instructing the user to hit the back button, and making the previous screen a review screen that always appears

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants