-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* #2460 Just renaming * #2460 Removed logic that transforms individual named range into string * #2460 Added logic to turn all named ranges into stripped string + logic to turn specific named ranges into integer as needed * #2460 Ensure dollar decimal dollar amounts fail * #2514 Added placeholder code for workbook version check * #2514 Switched WB version from formula to value to unblock failing unit tests * #2514 Code cleaning * #2567 Increased wb rows * #2514 Regenerate workbooks * #2514 Updated workbook version * Removed unnecessary code since version and section name are now set by value in all workbooks * More cleaning * Regenerated test workbooks * #2514 Enforcing version control * #2514 Linting * #2460 Renamed function * Code restructuring
- Loading branch information
Showing
114 changed files
with
87 additions
and
83 deletions.
There are no files selected for viewing
Binary file modified
BIN
+24.4 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/100010-22/additional-eins-100010.xlsx
Binary file not shown.
Binary file modified
BIN
+24.4 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/100010-22/additional-ueis-100010.xlsx
Binary file not shown.
Binary file modified
BIN
+429 KB
(160%)
backend/audit/fixtures/workbooks/should_pass/100010-22/audit-findings-100010.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/100010-22/audit-findings-text-100010.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/100010-22/corrective-action-plan-100010.xlsx
Binary file not shown.
Binary file modified
BIN
+626 KB
(170%)
backend/audit/fixtures/workbooks/should_pass/100010-22/federal-awards-100010.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/100010-22/notes-to-sefa-100010.xlsx
Binary file not shown.
Binary file modified
BIN
+98.4 KB
(150%)
backend/audit/fixtures/workbooks/should_pass/100010-22/secondary-auditors-100010.xlsx
Binary file not shown.
Binary file modified
BIN
+24.4 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/134732-21/additional-eins-134732.xlsx
Binary file not shown.
Binary file modified
BIN
+24.4 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/134732-21/additional-ueis-134732.xlsx
Binary file not shown.
Binary file modified
BIN
+429 KB
(160%)
backend/audit/fixtures/workbooks/should_pass/134732-21/audit-findings-134732.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/134732-21/audit-findings-text-134732.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/134732-21/corrective-action-plan-134732.xlsx
Binary file not shown.
Binary file modified
BIN
+626 KB
(170%)
backend/audit/fixtures/workbooks/should_pass/134732-21/federal-awards-134732.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/134732-21/notes-to-sefa-134732.xlsx
Binary file not shown.
Binary file modified
BIN
+98.4 KB
(150%)
backend/audit/fixtures/workbooks/should_pass/134732-21/secondary-auditors-134732.xlsx
Binary file not shown.
Binary file modified
BIN
+24.4 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/147110-22/additional-eins-147110.xlsx
Binary file not shown.
Binary file modified
BIN
+24.4 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/147110-22/additional-ueis-147110.xlsx
Binary file not shown.
Binary file modified
BIN
+429 KB
(170%)
backend/audit/fixtures/workbooks/should_pass/147110-22/audit-findings-147110.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/147110-22/audit-findings-text-147110.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/147110-22/corrective-action-plan-147110.xlsx
Binary file not shown.
Binary file modified
BIN
+626 KB
(170%)
backend/audit/fixtures/workbooks/should_pass/147110-22/federal-awards-147110.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/147110-22/notes-to-sefa-147110.xlsx
Binary file not shown.
Binary file modified
BIN
+98.4 KB
(150%)
backend/audit/fixtures/workbooks/should_pass/147110-22/secondary-auditors-147110.xlsx
Binary file not shown.
Binary file modified
BIN
+24.4 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/171944-22/additional-eins-171944.xlsx
Binary file not shown.
Binary file modified
BIN
+24.3 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/171944-22/additional-ueis-171944.xlsx
Binary file not shown.
Binary file modified
BIN
+429 KB
(160%)
backend/audit/fixtures/workbooks/should_pass/171944-22/audit-findings-171944.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/171944-22/audit-findings-text-171944.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/171944-22/corrective-action-plan-171944.xlsx
Binary file not shown.
Binary file modified
BIN
+528 KB
(150%)
backend/audit/fixtures/workbooks/should_pass/171944-22/federal-awards-171944.xlsx
Binary file not shown.
Binary file modified
BIN
+42.6 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/171944-22/notes-to-sefa-171944.xlsx
Binary file not shown.
Binary file modified
BIN
+98.4 KB
(150%)
backend/audit/fixtures/workbooks/should_pass/171944-22/secondary-auditors-171944.xlsx
Binary file not shown.
Binary file modified
BIN
+24.4 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/181744-22/additional-eins-181744.xlsx
Binary file not shown.
Binary file modified
BIN
+24.4 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/181744-22/additional-ueis-181744.xlsx
Binary file not shown.
Binary file modified
BIN
+429 KB
(160%)
backend/audit/fixtures/workbooks/should_pass/181744-22/audit-findings-181744.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/181744-22/audit-findings-text-181744.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/181744-22/corrective-action-plan-181744.xlsx
Binary file not shown.
Binary file modified
BIN
+626 KB
(170%)
backend/audit/fixtures/workbooks/should_pass/181744-22/federal-awards-181744.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/181744-22/notes-to-sefa-181744.xlsx
Binary file not shown.
Binary file modified
BIN
+98.4 KB
(150%)
backend/audit/fixtures/workbooks/should_pass/181744-22/secondary-auditors-181744.xlsx
Binary file not shown.
Binary file modified
BIN
+24.4 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/182926-22/additional-eins-182926.xlsx
Binary file not shown.
Binary file modified
BIN
+24.4 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/182926-22/additional-ueis-182926.xlsx
Binary file not shown.
Binary file modified
BIN
+429 KB
(160%)
backend/audit/fixtures/workbooks/should_pass/182926-22/audit-findings-182926.xlsx
Binary file not shown.
Binary file modified
BIN
+42.7 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/182926-22/audit-findings-text-182926.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/182926-22/corrective-action-plan-182926.xlsx
Binary file not shown.
Binary file modified
BIN
+627 KB
(170%)
backend/audit/fixtures/workbooks/should_pass/182926-22/federal-awards-182926.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/182926-22/notes-to-sefa-182926.xlsx
Binary file not shown.
Binary file modified
BIN
+98.4 KB
(150%)
backend/audit/fixtures/workbooks/should_pass/182926-22/secondary-auditors-182926.xlsx
Binary file not shown.
Binary file modified
BIN
+24.4 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/191734-21/additional-eins-191734.xlsx
Binary file not shown.
Binary file modified
BIN
+24.4 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/191734-21/additional-ueis-191734.xlsx
Binary file not shown.
Binary file modified
BIN
+429 KB
(170%)
backend/audit/fixtures/workbooks/should_pass/191734-21/audit-findings-191734.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/191734-21/audit-findings-text-191734.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/191734-21/corrective-action-plan-191734.xlsx
Binary file not shown.
Binary file modified
BIN
+626 KB
(170%)
backend/audit/fixtures/workbooks/should_pass/191734-21/federal-awards-191734.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/191734-21/notes-to-sefa-191734.xlsx
Binary file not shown.
Binary file modified
BIN
+98.4 KB
(150%)
backend/audit/fixtures/workbooks/should_pass/191734-21/secondary-auditors-191734.xlsx
Binary file not shown.
Binary file modified
BIN
+24.4 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/191734-22/additional-eins-191734.xlsx
Binary file not shown.
Binary file modified
BIN
+24.4 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/191734-22/additional-ueis-191734.xlsx
Binary file not shown.
Binary file modified
BIN
+429 KB
(160%)
backend/audit/fixtures/workbooks/should_pass/191734-22/audit-findings-191734.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/191734-22/audit-findings-text-191734.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/191734-22/corrective-action-plan-191734.xlsx
Binary file not shown.
Binary file modified
BIN
+626 KB
(170%)
backend/audit/fixtures/workbooks/should_pass/191734-22/federal-awards-191734.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/191734-22/notes-to-sefa-191734.xlsx
Binary file not shown.
Binary file modified
BIN
+98.4 KB
(150%)
backend/audit/fixtures/workbooks/should_pass/191734-22/secondary-auditors-191734.xlsx
Binary file not shown.
Binary file modified
BIN
+24.4 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/219107-21/additional-eins-219107.xlsx
Binary file not shown.
Binary file modified
BIN
+24.4 KB
(110%)
backend/audit/fixtures/workbooks/should_pass/219107-21/additional-ueis-219107.xlsx
Binary file not shown.
Binary file modified
BIN
+429 KB
(160%)
backend/audit/fixtures/workbooks/should_pass/219107-21/audit-findings-219107.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/219107-21/audit-findings-text-219107.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/219107-21/corrective-action-plan-219107.xlsx
Binary file not shown.
Binary file modified
BIN
+627 KB
(170%)
backend/audit/fixtures/workbooks/should_pass/219107-21/federal-awards-219107.xlsx
Binary file not shown.
Binary file modified
BIN
+42.5 KB
(120%)
backend/audit/fixtures/workbooks/should_pass/219107-21/notes-to-sefa-219107.xlsx
Binary file not shown.
Binary file modified
BIN
+98.4 KB
(150%)
backend/audit/fixtures/workbooks/should_pass/219107-21/secondary-auditors-219107.xlsx
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from django.core.exceptions import ValidationError | ||
import logging | ||
from audit.intakelib.intermediate_representation import ( | ||
get_range_by_name, | ||
) | ||
from audit.intakelib.common import get_message, build_cell_error_tuple | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
AUTHORIZED_VERSIONS = {"1.0.0", "1.0.1", "1.0.2", "1.0.3"} | ||
|
||
|
||
# DESCRIPTION | ||
# This checks if the uploaded workbook version is valid. | ||
def validate_workbook_version(ir): | ||
version_range = get_range_by_name(ir, "version") | ||
errors = [] | ||
for index, version in enumerate(version_range["values"]): | ||
# Check if version is not in the set of valid versions | ||
if version not in AUTHORIZED_VERSIONS: | ||
errors.append( | ||
build_cell_error_tuple( | ||
ir, | ||
version_range, | ||
index, | ||
get_message("check_workbook_version").format(version), | ||
) | ||
) | ||
|
||
if errors: | ||
logger.info("Raising a validation error.") | ||
raise ValidationError(errors) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.