Skip to content

Commit

Permalink
Update docker
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilwoodruff committed Sep 2, 2024
1 parent 159c120 commit 1ef932e
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 67 deletions.
62 changes: 0 additions & 62 deletions .github/disabled_workflows/push.yaml

This file was deleted.

File renamed without changes.
55 changes: 55 additions & 0 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Push

on:
push:
branches:
- main

jobs:
build:
name: Publish docker images
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout
- name: Log in to the Container registry
uses: docker/login-action
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.POLICYENGINE_DOCKER }}
- name: Build container
run: docker build -f docker/policyengine_us_data.Dockerfile -t ghcr.io/policyengine/policyengine-us-data
- name: Push container
run: docker push ghcr.io/policyengine/policyengine-us-data

lint:
runs-on: ubuntu-latest
name: Lint
steps:
- uses: actions/checkout@v4
- name: Check formatting
uses: "lgeiger/black-action@master"
with:
args: ". -l 79 --check"
publish:
runs-on: ubuntu-latest
name: Publish
steps:
- name: Checkout code
uses: actions/checkout
- name: Set up Python
uses: actions/setup-python
with:
python-version: 3.12
- name: Install package
run: make install
- name: Build package
run: make build
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish
with:
user: __token__
password: ${{ secrets.PYPI }}
skip-existing: true

5 changes: 1 addition & 4 deletions docker/build_and_publish.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
FROM python:latest
COPY . .
RUN make install
RUN make download
RUN make data
RUN make test
RUN make upload

3 changes: 3 additions & 0 deletions docker/policyengine_us_data.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM python:latest
COPY . .
RUN make install
6 changes: 5 additions & 1 deletion policyengine_us_data/utils/loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,14 @@ def build_loss_matrix(dataset: type, time_period):
CPS_DERIVED_TOTALS_2024 = {
"medical_expense": 1_074e9,
"spm_unit_spm_threshold": 3_945e9,
"child_support_expense": 23e9,
"child_support_expense": 33e9,
"child_support_received": 33e9,
"spm_unit_capped_work_childcare_expenses": 348e9,
"spm_unit_capped_housing_subsidy": 35e9,
"tanf": 9e9,
# Alimony could be targeted via SOI
"alimony_income": 13e9,
"alimony_expense": 13e9,
}

for variable_name, target in CPS_DERIVED_TOTALS_2024.items():
Expand Down

0 comments on commit 1ef932e

Please sign in to comment.