Skip to content

Commit

Permalink
Merge pull request #784 from PolicyEngine/backend_var_fix
Browse files Browse the repository at this point in the history
Shift default variable addition from front end to back end
  • Loading branch information
nikhilwoodruff authored Sep 27, 2023
2 parents b99f97d + 8c7852d commit ed8598a
Show file tree
Hide file tree
Showing 15 changed files with 24,369 additions and 0 deletions.
9 changes: 9 additions & 0 deletions changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- bump: patch
changes:
changed:
- Add script to add default variables to household situation
before enqueuing for calculation
- Add endpoint for updating existing households
- Add test US household that contains variables not present
in the policyengine-us package
- Add various tests for new features
5 changes: 5 additions & 0 deletions policyengine_api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
get_metadata,
get_household,
post_household,
update_household,
get_policy,
set_policy,
get_policy_search,
Expand Down Expand Up @@ -55,6 +56,10 @@

app.route("/<country_id>/household", methods=["POST"])(post_household)

app.route("/<country_id>/household/<household_id>", methods=["PUT"])(
update_household
)

app.route("/<country_id>/policy/<policy_id>", methods=["GET"])(get_policy)

app.route("/<country_id>/policy", methods=["POST"])(set_policy)
Expand Down
1 change: 1 addition & 0 deletions policyengine_api/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def seed(self):
self.query(query)

except Exception as e:
continue
print(
f"Error while seeding database with record {filename}: {e}",
file=sys.stdout,
Expand Down
Loading

0 comments on commit ed8598a

Please sign in to comment.