Skip to content

Commit 1f05f11

Browse files
authored
Merge pull request #330 from policy-design-lab/release-0.23.0
Release 0.23.0
2 parents a8a6b7d + 9737e47 commit 1f05f11

File tree

8 files changed

+1038
-79
lines changed

8 files changed

+1038
-79
lines changed

CHANGELOG.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,27 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.23.0] - 2025-06-26
8+
9+
### Added
10+
- Add year query parameter to Title-I program and top-level endpoints. [#300](https://github.com/policy-design-lab/pdl-api/issues/300)
11+
- Add year query parameter to SNAP endpoints. [#303](https://github.com/policy-design-lab/pdl-api/issues/303)
12+
- Add year query parameter to Crop Insurance endpoints. [#302](https://github.com/policy-design-lab/pdl-api/issues/302)
13+
- Add year query parameter to Title-II program and top-level endpoints. [#301](https://github.com/policy-design-lab/pdl-api/issues/301)
14+
15+
### Changed
16+
- Update Title II endpoints to include data from 2014 to 2023. [#313](https://github.com/policy-design-lab/pdl-api/issues/313)
17+
- Update Title XI endpoints to include data from 2014 to 2023. [#319](https://github.com/policy-design-lab/pdl-api/issues/319)
18+
- Update API endpoints to make start and end years configurable. [#321](https://github.com/policy-design-lab/pdl-api/issues/321)
19+
- Update ARC PLC data. [#324](https://github.com/policy-design-lab/pdl-api/issues/324)
20+
- Update ARC PLC base acres rules. [#327](https://github.com/policy-design-lab/pdl-api/issues/327)
21+
722
## [0.22.0] - 2025-02-26
823

924
### Added
1025
- Add back summary endpoint to SNAP. [#271](https://github.com/policy-design-lab/pdl-api/issues/271)
1126
- Add top-level endpoints to Title-II. [#270](https://github.com/policy-design-lab/pdl-api/issues/270)
27+
- Add endpoints (proposals and current) to support new model H. [#305](https://github.com/policy-design-lab/pdl-api/issues/305)
1228

1329
### Changed
1430
- Change house api path. [#295](https://github.com/policy-design-lab/pdl-api/issues/295)
@@ -50,7 +66,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5066
- CRP endpoints to use data from the database. [#237](https://github.com/policy-design-lab/pdl-api/issues/237)
5167
- ACEP endpoints to use data from the database. [#239](https://github.com/policy-design-lab/pdl-api/issues/239)
5268
- RCPP endpoints to use data from the database. [#241](https://github.com/policy-design-lab/pdl-api/issues/241)
53-
- ProgramName attribute has been removed from crop insurance's state-distibution output [#255](https://github.com/polciy-design-lab/pdl-api/issues/255)
69+
- ProgramName attribute has been removed from crop insurance's state-distribution output [#255](https://github.com/polciy-design-lab/pdl-api/issues/255)
5470

5571
## [0.17.0] - 2024-08-28
5672

@@ -85,7 +101,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
85101
- Update Title-4 endpoints to use database calls. [#190](https://github.com/policy-design-lab/pdl-api/issues/190)
86102
- Update EQIP IRA data with changed name of US Virgin Islands. [#201](https://github.com/policy-design-lab/pdl-api/issues/201)
87103
- Update EQIP IRA state distribution data [#205](https://githoub.com/policy-design-lab/pdl-api/issues/205)
88-
- Update EQIP IRA summary data with future predctions. [#207](https://github.com/policy-design-lab/pdl-api/issues/207)
104+
- Update EQIP IRA summary data with future predictions. [#207](https://github.com/policy-design-lab/pdl-api/issues/207)
89105
- Update EQIP IRA state distribution data [#208](https://github.com/policy-design-lab/pdl-api/issues/208)
90106
- EQIP IRA state distribution's nationwide data matches with summary [#210](https://github.com/policy-design-lab/pdl-api/issues/210)
91107
- EQIP IRA to use only 50 U.S. state data [#212](https://github.com/policy-design-lab/pdl-api/issues/212)
@@ -225,6 +241,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
225241
### Fixed
226242
- Open API specification file. [#50](https://github.com/policy-design-lab/pdl-api/issues/50)
227243

244+
[0.23.0]: https://github.com/policy-design-lab/pdl-api/compare/0.22.0...0.23.0
228245
[0.22.0]: https://github.com/policy-design-lab/pdl-api/compare/0.21.0...0.22.0
229246
[0.21.0]: https://github.com/policy-design-lab/pdl-api/compare/0.20.0...0.21.0
230247
[0.20.0]: https://github.com/policy-design-lab/pdl-api/compare/0.19.0...0.20.0

Dockerfile

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,40 @@ FROM python:3.9-slim
22

33
ENV POETRY_VIRTUALENVS_CREATE false
44

5-
RUN apt update && apt upgrade -y
5+
RUN apt update \
6+
&& apt upgrade -y \
7+
&& apt install -y gcc libpq-dev \
8+
&& rm -rf /var/lib/apt/lists/*
69

710
WORKDIR /usr/src/pdl-api
811

9-
COPY . .
12+
# Copy app folder and poetry files to the working directory
13+
COPY app /usr/src/pdl-api/app
14+
COPY pyproject.toml poetry.lock README.md /usr/src/pdl-api/
1015

11-
RUN pip install -U pip
12-
RUN pip install poetry
13-
RUN poetry install
16+
RUN pip install -U pip \
17+
&& pip install poetry \
18+
&& poetry install \
19+
&& pip install --upgrade psycopg2-binary # Upgrade psycopg2-binary to avoid error related to SCRAM-SHA-256 authentication when running locally
1420

21+
# The values of these default environment variables can be overridden at runtime
1522
ENV DB_HOST=localhost \
1623
DB_PORT=5432 \
1724
DB_NAME=pdl \
1825
DB_USERNAME=user \
1926
DB_PASSWORD=password \
2027
API_PORT=5000 \
21-
WORKER=4
28+
WORKER=4 \
29+
ALL_PROGRAMS_START_YEAR=2018 \
30+
ALL_PROGRAMS_END_YEAR=2022 \
31+
TITLE_I_START_YEAR=2014 \
32+
TITLE_I_END_YEAR=2021 \
33+
TITLE_II_START_YEAR=2014 \
34+
TITLE_II_END_YEAR=2023 \
35+
CROP_INSURANCE_START_YEAR=2014 \
36+
CROP_INSURANCE_END_YEAR=2023 \
37+
SNAP_START_YEAR=2018 \
38+
SNAP_END_YEAR=2022
2239

2340
WORKDIR /usr/src/pdl-api/app
2441

app/controllers/configs.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,20 @@ class to list all configuration settings required for preprocessing and formatti
2727

2828
# API port, default to 5000
2929
API_PORT = int(os.getenv('API_PORT', '5000'))
30+
31+
# PDL data duration parameters
32+
# NOTE: these are the minimum and maximum years for which data will be retrieved from the database for different endpoints
33+
ALL_PROGRAMS_START_YEAR = int(os.getenv('ALL_PROGRAMS_START_YEAR', '2018')) # Landing Page endpoint
34+
ALL_PROGRAMS_END_YEAR = int(os.getenv('ALL_PROGRAMS_END_YEAR', '2022')) # Landing Page endpoint
35+
36+
TITLE_I_START_YEAR = int(os.getenv('TITLE_I_START_YEAR', '2014'))
37+
TITLE_I_END_YEAR = int(os.getenv('TITLE_I_END_YEAR', '2021'))
38+
39+
TITLE_II_START_YEAR = int(os.getenv('TITLE_II_START_YEAR', '2014'))
40+
TITLE_II_END_YEAR = int(os.getenv('TITLE_II_END_YEAR', '2023'))
41+
42+
CROP_INSURANCE_START_YEAR = int(os.getenv('CROP_INSURANCE_START_YEAR', '2014'))
43+
CROP_INSURANCE_END_YEAR = int(os.getenv('CROP_INSURANCE_END_YEAR', '2023'))
44+
45+
SNAP_START_YEAR = int(os.getenv('SNAP_START_YEAR', '2018'))
46+
SNAP_END_YEAR = int(os.getenv('SNAP_END_YEAR', '2022'))
5.43 MB
Binary file not shown.
5.02 MB
Binary file not shown.

0 commit comments

Comments
 (0)