diff --git a/CHANGELOG.md b/CHANGELOG.md index da291bc..a519005 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Added +- Add endpoint for ARC PLC reconciliation policy. [#332](https://github.com/policy-design-lab/pdl-api/issues/332) + ## [0.24.0] - 2025-07-31 ### Changed diff --git a/app/controllers/data/title-i/proposals/subtitle-a/arc_plc_payments_proposed_obbba.json.gz b/app/controllers/data/title-i/proposals/subtitle-a/arc_plc_payments_proposed_obbba.json.gz new file mode 100644 index 0000000..dd5f034 Binary files /dev/null and b/app/controllers/data/title-i/proposals/subtitle-a/arc_plc_payments_proposed_obbba.json.gz differ diff --git a/app/controllers/data/title-i/subtitle-a/arc_plc_payments_current_obbba.json.gz b/app/controllers/data/title-i/subtitle-a/arc_plc_payments_current_obbba.json.gz new file mode 100644 index 0000000..8fb02f8 Binary files /dev/null and b/app/controllers/data/title-i/subtitle-a/arc_plc_payments_current_obbba.json.gz differ diff --git a/app/controllers/pdl.py b/app/controllers/pdl.py index d9cf9bc..5c97e74 100644 --- a/app/controllers/pdl.py +++ b/app/controllers/pdl.py @@ -32,6 +32,8 @@ COMMOD_STATE_DISTRIBUTION_DATA_JSON = "commodities_state_distribution_data.json" COMMOD_SUBPROGRAMS_DATA_JSON = "commodities_subprograms_data.json" ARC_PLC_DATA_JSON = "arc_plc_payments_current.json.gz" +ARC_PLC_CURRENT_OBBBA_DATA_JSON = "arc_plc_payments_current_obbba.json.gz" # These variable namings will need to be updated the naming once we finalize the scenario names. +ARC_PLC_PROPOSED_OBBBA_DATA_JSON = "arc_plc_payments_proposed_obbba.json.gz" I_PROPOSALS_SUBTITLE_A_DATA_PATH = os.path.join(TITLE_I_DATA_PATH, "proposals", "subtitle-a") ARC_PLC_PROPOSAL_DATA_JSON = "arc_plc_payments_proposed.json.gz" I_SUBTITLE_D_DATA_PATH = os.path.join(TITLE_I_DATA_PATH, "subtitle-d") @@ -460,6 +462,29 @@ def titles_title_i_subtitles_subtitle_a_arc_plc_payments_current_search(): response.headers['Content-Encoding'] = 'gzip' return response +# /pdl/titles/title-i/subtitles/subtitle-a/arc-plc-payments/baseline +def titles_title_i_subtitles_subtitle_a_arc_plc_payments_baseline_search(): + # set the file path + arc_plc_current_obbba_data = os.path.join(I_SUBTITLE_A_DATA_PATH, ARC_PLC_CURRENT_OBBBA_DATA_JSON) + + with open(arc_plc_current_obbba_data, 'rb') as current_obbba_data: + file_data = current_obbba_data.read() + + response = Response(file_data, mimetype='application/json') + response.headers['Content-Encoding'] = 'gzip' + return response + +# /pdl/titles/title-i/subtitles/subtitle-a/arc-plc-payments/obbba +def titles_title_i_subtitles_subtitle_a_arc_plc_payments_obbba_search(): + # set the file path + arc_plc_proposed_obbba_data = os.path.join(I_PROPOSALS_SUBTITLE_A_DATA_PATH, ARC_PLC_PROPOSED_OBBBA_DATA_JSON) + + with open(arc_plc_proposed_obbba_data, 'rb') as proposed_obbba_data: + file_data = proposed_obbba_data.read() + + response = Response(file_data, mimetype='application/json') + response.headers['Content-Encoding'] = 'gzip' + return response # /pdl/titles/title-i/subtitles/subtitle-a/arc-plc-payments/proposed def titles_title_i_subtitles_subtitle_a_arc_plc_payments_proposed_search(): diff --git a/app/pdl.yaml b/app/pdl.yaml index 5774623..d1e70fc 100644 --- a/app/pdl.yaml +++ b/app/pdl.yaml @@ -389,6 +389,46 @@ paths: description: Unauthorized 500: description: Internal error + /pdl/titles/title-i/subtitles/subtitle-a/arc-plc-payments/obbba: + get: + tags: + - "Title I: Commodities - Subtitle A" + summary: Gets the Title I Subtitle A commodities payment distribution for ARC and PLC based on OBBBA. + description: | + Returns the Title I Subtitle A commodities payment distribution data for ARC and PLC based on OBBBA in JSON format. + responses: + 200: + description: Ok + content: + application/json: + schema: + type: string + 400: + description: Bad request + 401: + description: Unauthorized + 500: + description: Internal error + /pdl/titles/title-i/subtitles/subtitle-a/arc-plc-payments/baseline: + get: + tags: + - "Title I: Commodities - Subtitle A" + summary: Gets the baseline Title I Subtitle A commodities payment distribution for ARC and PLC based on OBBBA. + description: | + Returns the baseline Title I Subtitle A commodities payment distribution data for ARC and PLC based on OBBBA in JSON format. + responses: + 200: + description: Ok + content: + application/json: + schema: + type: string + 400: + description: Bad request + 401: + description: Unauthorized + 500: + description: Internal error /pdl/titles/title-i/subtitles/subtitle-a/arc-plc-payments/proposed: get: tags: