-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into jmm/1729
- Loading branch information
Showing
77 changed files
with
1,941 additions
and
412 deletions.
There are no files selected for viewing
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,19 @@ | ||
--- | ||
name: Auto Merge Pull Request With Approved Label | ||
on: | ||
repository_dispatch: | ||
types: [ ready-to-merge ] | ||
jobs: | ||
auto-merge: | ||
name: Auto Merge The Created Pull Request | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: write | ||
steps: | ||
- id: automerge | ||
name: Auto Merge a PR with the correct labels | ||
uses: pascalgn/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.DEPLOY_TOKEN }} | ||
MERGE_LABELS: "automerge,autogenerated" | ||
MERGE_METHOD: "merge" |
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,40 @@ | ||
--- | ||
name: Create Release | ||
on: | ||
# schedule: | ||
# - cron: '0 18 * * 3' | ||
workflow_dispatch: null | ||
|
||
jobs: | ||
release: | ||
permissions: write-all | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: prod | ||
|
||
- name: Get Current Date | ||
id: date | ||
run: | | ||
echo "date=$(date +%Y%m%d)" >> $GITHUB_OUTPUT | ||
- name: Changelog | ||
uses: Bullrich/generate-release-changelog@master | ||
id: changelog | ||
env: | ||
REPO: ${{ github.repository }} | ||
|
||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v1.${{ steps.date.outputs.date }} | ||
release_name: Release for ${{ steps.date.outputs.date }} | ||
body: | | ||
${{ steps.changelog.outputs.changelog }} | ||
draft: false | ||
prerelease: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
def audit_findings(sac_dict): | ||
""" | ||
Checks that the number of audit findings in the Federal Awards and Audit Findings | ||
sections are consistent. | ||
""" | ||
all_sections = sac_dict["sf_sac_sections"] | ||
awards_outer = all_sections.get("federal_awards", {}) | ||
awards = awards_outer.get("federal_awards", []) if awards_outer else [] | ||
finds_outer = all_sections.get("findings_text", {}) | ||
findings = finds_outer.get("findings_text_entries", []) if finds_outer else [] | ||
# If both empty, that's consistent: | ||
if not awards and not findings: | ||
return [] | ||
if awards: | ||
# How to determine if findings is required? Loop through the awards? | ||
num_expected = sum(_.get("number_of_audit_findings", 0) for _ in findings) | ||
# For now, just check for non-zero | ||
if num_expected and not awards: | ||
return [ | ||
{ | ||
"error": "There are findings listed in Federal Awards " | ||
" but none in Findings Text" | ||
} | ||
] | ||
|
||
if False > 1: | ||
return [{"error": "error message"}] | ||
return [] |
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
42 changes: 42 additions & 0 deletions
42
backend/audit/fixtures/json/federal-awards--test0001test--simple-pass.json
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,42 @@ | ||
{ | ||
"FederalAwards": { | ||
"auditee_uei": "TEST0001TEST", | ||
"total_amount_expended": 12345, | ||
"federal_awards": [ | ||
{ | ||
"program": { | ||
"federal_agency_prefix": "42", | ||
"three_digit_extension": "RD", | ||
"additional_award_identification": 1234, | ||
"program_name": "FLOWER DREAMING", | ||
"is_major": "N", | ||
"audit_report_type": "", | ||
"number_of_audit_findings": 0, | ||
"amount_expended": 500, | ||
"federal_program_total": 500 | ||
}, | ||
"loan_or_loan_guarantee": { | ||
"is_guaranteed": "N", | ||
"loan_balance_at_audit_period_end": 0 | ||
}, | ||
"direct_or_indirect_award": { | ||
"is_direct": "N", | ||
"entities": [ | ||
{ | ||
"passthrough_name": "Lothlórien", | ||
"passthrough_identifying_number": "54321" | ||
} | ||
] | ||
}, | ||
"cluster": { | ||
"cluster_name": "N/A", | ||
"cluster_total": 0 | ||
}, | ||
"subrecipients": { | ||
"is_passed": "N" | ||
}, | ||
"award_reference": "AWARD-0001" | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.