-
Notifications
You must be signed in to change notification settings - Fork 7
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
Search MVP #2419
Search MVP #2419
Conversation
Terraform plan for dev No changes. Your infrastructure matches the configuration.
✅ Plan applied in Deploy to Development and Management Environment #311 |
Terraform plan for meta No changes. Your infrastructure matches the configuration.
✅ Plan applied in Deploy to Development and Management Environment #311 |
Minimum allowed coverage is Generated by 🐒 cobertura-action against 70a34f3 |
…S/FAC into mh/implement-mvp-search-form-2369
* Search Summary * Some title info, make tables take up the full width of the page
* fleshing out search view * rm leftover list comprehension * cog-over search fix, only search public * more tests * quick pass at displaying search results
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.
Tested locally:
- Created and submitted a few complete audits.
- Ran cypress E2E.
- Tested blank query, UEI query, and cog/over query (which was not successful, noted below).
- Spot-checked results view.
Left a few comments inline for east-coast-morning, but didn't review the Django models/views as closely as I would've liked for today.
{% endfor %} | ||
</tbody> | ||
</table> | ||
<nav aria-label="Pagination" class="usa-pagination"> |
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.
The pagination looks like a placeholder right now, right?
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.
Yes, I believe @jperson1 is looking into enabling pagination
file_obj = get_object_or_404(SingleAuditReportFile, sac=sac) | ||
return f"singleauditreport/{file_obj.filename}" | ||
else: | ||
file_obj = get_object_or_404(ExcelFile, sac=sac, form_section=file_type) |
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.
Search doesn't support excel downloads, does it?
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.
It is supposed to. For the first version, we're passing back the Excel docs so that auditors can review what they submitted. In the case of large audits, they often use tools to do this. So, we're passing the submitted objects back.
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.
The plumbing is in place for excel downloads, but it's effectively unreachable code - we currently only have PdfDownloadView which hardcodes "report" for file_type
.
I missed the XLSX Workbook download link on the summary page - I see that in figma now. Should we update this PR to include XLSX downloads or push that to 1.5?
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.
Also, figma shows a single XLSX download link -- is that intended to return a zip of all workbooks?
|
||
return response | ||
except ClientError: | ||
raise Http404("File not found") |
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.
Does a 404 percolate (somewhat) nicely up to the user, so if something goes wrong we're able to debug/figure it out?
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.
app_name = "dissemination" | ||
|
||
urlpatterns = [ | ||
path("pdf/<str:report_id>", views.PdfDownloadView.as_view(), name="PdfDownload"), |
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.
Do we put XLSX docs under the pdf
path/pattern? Or, are XLSX not part of this ticket?
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.
Not part of this PR, will be a separate path/pattern. Download plumbing for XLSX is in place, would just need to stand up a View
similar to PdfDownloadView
from dissemination.forms import SearchForm | ||
from dissemination.search import search_general | ||
from dissemination.models import ( | ||
General, |
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.
Do we allow search of multiple UEIs, multiple EINs, and secondary auditors? It looks like "no," so I'll add it to the 1.5 increment.
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.
Right, 1.5
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.
Code looks good. I cannot run this while traveling.
I created an epic to track next steps:
we can refine that later as needed. Feel free to add other work to it.
Because I can't run it, I'm going to only leave this as a comment. I can't do a full review from where I'm at. Looks good as a read.
* Add management command and workflow for generating live test data from historical exports (#2569) * First commit of E2E improvements For running in production-like environments. * add e2e generator workflow and profile changes * lint * double os * more linting somehow * don't do generation via profile * Linting. Runs defaults * invoke via workflow instead of profile * Apply suggestions from code review * lint --------- Co-authored-by: Matt Jadud <[email protected]> * add workflow call to e2e data generator (#2571) * This makes sure all of the named ranges exist (#2586) * This makes sure all of the named ranges exist Updates the ALN code slightly, and adds a new check that looks at the workbook templates, and makes sure that all of the named ranges in the template are in the file being submitted by the user * Removed unused code and implemented logic to retrieve named range names * Fix for string parsing issue --------- Co-authored-by: Hassan D. M. Sambo <[email protected]> * Add barebones feature allowing users to send submissions back to in progress from ready for certification (#2572) * Add barebones feature allowing users to send submissions back to in progress from ready for certification. * Coverage appeasement offering. * More coverage appeasement. * More coverage appeasement; this does fix an actual minor bug, though. * Reduce test coverage pass threshold. * Improve lock icon. * Improve lock icon. * Certification Unlock Copy & Styling Updates (#2595) * Ready for certification - remove bolded & reformat * Submissions homepage - icon on own line & format * Certification unlock - format, copy, links. * upload-cancel -> form-cancel * "Straight quotation marks boo" Co-authored-by: Tadhg O'Higgins <[email protected]> --------- Co-authored-by: Tadhg O'Higgins <[email protected]> * Search MVP (#2419) * Add basic search form * Add dummy results table * move search to dissem app, impl basic form (#2431) * Basic styles for search sidebar * Style up results column * [DRAFT] Search Summary (#2480) * Search Summary * Some title info, make tables take up the full width of the page * Linting - py whitespace & imports, html closed tag * Summary view tests (#2512) * Flesh out Search view (#2494) * fleshing out search view * rm leftover list comprehension * cog-over search fix, only search public * more tests * quick pass at displaying search results * Add explainer text * Remove filter chicklets (for now) * Add pagination component * Rm download all results button * Add alt text * Search - Pre-populate Form, Summary Link, Link Icons, Formatting (#2538) * URLS - Add a backslash to the search url * Search - Link to summary, icon size, formatting * Summary - remove "back" button, formatting. * Search - prepopulate form after making a search * Remove usused import * Don't run methods on empty data, kids * Search - Move UEI and ALN above the name field * Djlint reformatting * Search - Audit Year (#2547) * URLS - Add a backslash to the search url * Search - Link to summary, icon size, formatting * Summary - remove "back" button, formatting. * Search - prepopulate form after making a search * Remove usused import * Don't run methods on empty data, kids * Search - Move UEI and ALN above the name field * Djlint reformatting * Search - Add audit year * search_general params default to none * Tests - test_audit_year, search_general cleanups * Revert "Merge branch 'mh/implement-mvp-search-form-2369' into jp/search-audit-year" This reverts commit 7c99f95, reversing changes made to 30b2743. * Remove unused Y/N choices * PDF downloads via Search (#2520) * first pass at pdf downloads via search * re-add AWS_S3_ENDPOINT_URL * re-add download link * linter * fix cog_or_over field name mismatch * fix search tests * check if file exists in s3, else 404 * log warning if file not found in S3 --------- Co-authored-by: Matt Henry <[email protected]> Co-authored-by: Tim Ballard <[email protected]> Co-authored-by: Tim Ballard <[email protected]> Co-authored-by: James Person <[email protected]> Co-authored-by: James Person <[email protected]> * fix cg internal endpoint setting (#2613) * Add mgiration file that should have been in 2572. (#2615) * API app cleanup (#2596) * rm IndexView * rm SACViewSet * Bump Actions (#2624) * Bump to v0.13.0 * Bump setup-node to v4 * Media Backups! (#2610) * pseudo code for s3 tar implementation * add awscli to allow list * File Rename * All commands Just need to sort creds now * update command file * Update proxy allow list for s3tar * Script for backing up the media * chmod +x * Remove mediabackup * add media backups * Bind service with additional instances * Removing allowlist modifications * Using this workflow to test/debug * Update * Update * File Rename * Reformat Media Backups Workflow * remove media backups from prod (for now) * Remove mediabackups folder as well * Remove from apply This will be handled in its own workflow * Database and Media Backups Commented out prod for future iteration * rename file * full path of aws (#2636) * Removing old workbook_generator tool (#2635) Co-authored-by: Phil Dominguez <“[email protected]”> --------- Co-authored-by: Dan Swick <[email protected]> Co-authored-by: Matt Jadud <[email protected]> Co-authored-by: Hassan D. M. Sambo <[email protected]> Co-authored-by: Tadhg O'Higgins <[email protected]> Co-authored-by: James Person <[email protected]> Co-authored-by: Matt Henry <[email protected]> Co-authored-by: Matt Henry <[email protected]> Co-authored-by: Tim Ballard <[email protected]> Co-authored-by: Tim Ballard <[email protected]> Co-authored-by: James Person <[email protected]> Co-authored-by: Alex Steel <[email protected]> Co-authored-by: Phil Dominguez <“[email protected]”>
Addresses #2369
Navigate to search page at
/dissemination/search
PR checklist: submitters
main
into your branch shortly before creating the PR. (You should also be mergingmain
into your branch regularly during development.)PR checklist: reviewers
make docker-clean; make docker-first-run && docker compose up
; then rundocker compose exec web /bin/bash -c "python manage.py test"
The larger the PR, the stricter we should be about these points.