Skip to content

Commit

Permalink
Re-add evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilwoodruff committed Aug 15, 2024
1 parent e40ecc9 commit e728f5b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/review_pull_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
from policyengine_us_data.utils.github import set_pr_auto_review_comment

def main():

set_pr_auto_review_comment("Testing!")
df = pd.read_csv(STORAGE_FOLDER / "evaluation.csv")

most_recent_rows = df[df.Date == df.Date.max()].sort_values(["Variable", "Time period"]).set_index(["Variable", "Time period"]).Total
Expand All @@ -13,12 +11,14 @@ def main():
diff = (most_recent_rows - second_most_recent_rows)
# Convert to df
diff = diff.reset_index()
diff = diff[diff.Variable == "household_net_income"]
diff = diff[diff.Variable == "household_net_income"].T
table = diff.to_markdown(index=False)

review_text = f"""## National projection changes\n\n{table}"""
review_text = f"""## National projection changes\n\nThis pull request makes the following changes to economic estimates.\n\n{table}"""

print(review_text)

set_pr_auto_review_comment(review_text)

if __name__ == "__main__":
main()
7 changes: 7 additions & 0 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_NUMBER: ${{ github.event.number }}

steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -22,5 +23,11 @@ jobs:
- name: Install dependencies
run: make install

- name: Run tests
run: make test

- name: Run evaluation
run: make evaluate

- name: Add review comment
run: python .github/review_pull_request.py

0 comments on commit e728f5b

Please sign in to comment.