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

Sambodeme/revert the overwritten workbook changes #1747

Merged
merged 3 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
8,226 changes: 8,221 additions & 5 deletions backend/schemas/output/excel/json/federal-awards-audit-findings-workbook.json

Large diffs are not rendered by default.

Binary file modified backend/schemas/output/excel/xlsx/additional-ueis-workbook.xlsx
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified backend/schemas/output/excel/xlsx/federal-awards-workbook.xlsx
Binary file not shown.
Binary file modified backend/schemas/output/excel/xlsx/notes-to-sefa-workbook.xlsx
Binary file not shown.
Binary file not shown.
8,197 changes: 8,194 additions & 3 deletions backend/schemas/output/sections/FederalAwardsAuditFindings.schema.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion backend/schemas/scripts/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def make_range(r):
range_start_row = int(r.posn.title_cell[1]) + 1
start_cell = column + str(range_start_row)
last_row = (
r.posn.last_range_cell[1] if r.posn.last_range_cell is not None else MAX_ROWS
r.posn.last_range_cell[1:] if r.posn.last_range_cell is not None else MAX_ROWS
)
full_range = f"${column}${range_start_row}:${column}${last_row}"
return Range(
Expand Down
10 changes: 4 additions & 6 deletions backend/schemas/source/base/Base.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,6 @@ local Compound = {
description: 'Reference Number',
pattern: '^20[2-9][0-9]-[0-9]{3}$',
},
ComplianceRequirement: {
title: 'ComplianceRequirement',
description: 'Compliance requirement type',
pattern: '^A?B?C?E?F?G?H?I?J?L?M?N?P?$',
},

NonEmptyString: Types.string {
minLength: 1,
},
Expand Down Expand Up @@ -412,6 +406,10 @@ local SchemaBase = Types.object {
},
ALNPrefixes: type_aln_prefix,
ThreeDigitExtension: type_three_digit_extension,
ComplianceRequirementTypes: {
description: 'Compliance requirement types',
enum: ComplianceRequirementTypes.requirement_types,
},
},
Validation: Validation,
SchemaBase: SchemaBase,
Expand Down
12 changes: 1 addition & 11 deletions backend/schemas/source/excel/libs/SheetValidations.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,9 @@ local LoanBalanceValidation = {
custom_title: 'Loan Balance',
};

local ComplianceRequirementValidation = {
type: 'custom',
//This formula only checks if valid characters are used, it does not validate alphabetical order
//The json schema validation checks both valid characters and alphabetical order
formula1: '=IF(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(FIRSTCELLREF, "A", ""), "B", ""), "C", ""), "E", ""), "F", ""), "G", ""), "H", ""), "I", ""), "J", ""), "L", ""), "M", ""), "N", ""), "P", "")<>"", "Invalid", "Valid")',
custom_error: 'Expecting a valid combination of the letters: A,B,C,E,F,G,H,I,J,L,M,N,P',
custom_title: 'Compliance requirement',
};

local AwardReferenceValidation = {
type: 'custom',
formula1: '=AND(LEN(FIRSTCELLREF)=10, LEFT(FIRSTCELLREF, 6)="AWARD-", ISNUMBER(VALUE(MID(FIRSTCELLREF, 7, 4))))',
formula1: '=AND(LEN(FIRSTCELLREF)=10, LEFT(FIRSTCELLREF, 6)="AWARD-", ISNUMBER(VALUE(MID(FIRSTCELLREF, 7, 4))), NOT(FIRSTCELLREF="AWARD-0000"))',
custom_error: 'The value should follow the pattern AWARD-#### (where #### is a four-digit number).',
custom_title: 'Award Reference validation',
};
Expand All @@ -102,7 +93,6 @@ local AwardReferenceValidation = {
StringOfLengthTwelve: StringOfSize(12),
YoNValidation: YoNValidation,
ReferenceNumberValidation: ReferenceNumberValidation,
ComplianceRequirementValidation: ComplianceRequirementValidation,
LoanBalanceValidation: LoanBalanceValidation,
AuditReportTypeValidation(namedRange): {
type: 'list',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
local Base = import '../../base/Base.libsonnet';
local Fun = import '../libs/Functions.libsonnet';
local Help = import '../libs/Help.libsonnet';
local SV = import '../libs/SheetValidations.libsonnet';
local Sheets = import '../libs/Sheets.libsonnet';
local findingSheet = 'Form';
local coverSheet = 'Coversheet';
local complianceRequirementTypeSheet = 'ComplianceRequirementTypes';
local title_row = 1;

local meta_cells = [
Expand Down Expand Up @@ -106,7 +108,11 @@ local open_ranges_defns = [
open_range_w20 {
help: Help.unknown,
},
SV.ComplianceRequirementValidation,
SV.RangeLookupValidation {
sheet: complianceRequirementTypeSheet,
lookup_range: 'requirement_type_lookup',
custom_error: 'Please enter a valid Type of Compliance Requirement. (One or more of ABCEFGHIJLMNP, in alphabetical order).',
},
'Type(s) of Compliance Requirement(s)',
'compliance_requirement',
],
Expand Down Expand Up @@ -200,6 +206,22 @@ local sheets = [
open_ranges: Fun.make_open_ranges(title_row, open_ranges_defns),
hide_col_from: 13,
},
{
name: complianceRequirementTypeSheet,
text_ranges: [
{
type: 'text_range',
title: 'Compliance Requirement types',
title_cell: 'A1',
range_name: 'requirement_type_lookup',
last_range_cell: 'A8192',
contents: Base.Compound.ComplianceRequirementTypes,
validation: SV.LookupValidation {
lookup_range: 'requirement_type_lookup',
},
},
],
},
];

local workbook = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ local Parts = {
additionalProperties: false,
properties: {
award_reference: Base.Compound.AwardReference,
compliance_requirement: Base.Compound.ComplianceRequirement,
compliance_requirement: Base.Compound.ComplianceRequirementTypes,
},
required: ['award_reference', 'compliance_requirement'],
},
Expand Down