Skip to content

Commit

Permalink
Pyodide_rules_engine_test (#172)
Browse files Browse the repository at this point in the history
* Collaboration on CSV test of pyodide

Co-authored-by: Hector Benitez <[email protected]>
Co-authored-by: Leopardfoot <[email protected]>
Co-authored-by: Clayton Schneider <[email protected]>
Co-authored-by: plocket <[email protected]>
Co-authored-by: dwindleduck <[email protected]>
Co-authored-by: Debajyoti Debnath <[email protected]>
Co-authored-by: Alan Pinkert <[email protected]>

* Test the rules engine in pyodide: the keystone.

Co-authored-by: plocket <[email protected]>
Co-authored-by: thatoldplatitude <[email protected]>
Co-authored-by: eriksynn <[email protected]>
Co-authored-by: Leopardfoot <[email protected]>
Co-authored-by: Alan Pinkert <[email protected]>
Co-authored-by: Debajyoti Debnath <[email protected]>

---------

Co-authored-by: Hector Benitez <[email protected]>
Co-authored-by: Leopardfoot <[email protected]>
Co-authored-by: Clayton Schneider <[email protected]>
Co-authored-by: plocket <[email protected]>
Co-authored-by: dwindleduck <[email protected]>
Co-authored-by: Debajyoti Debnath <[email protected]>
Co-authored-by: Alan Pinkert <[email protected]>
Co-authored-by: thatoldplatitude <[email protected]>
Co-authored-by: eriksynn <[email protected]>
  • Loading branch information
10 people authored May 14, 2024
1 parent 648081a commit 702ff96
Show file tree
Hide file tree
Showing 3 changed files with 443 additions and 71 deletions.
6 changes: 5 additions & 1 deletion heat-stack/app/routes/_heat+/single.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ export async function action({ request, params }: ActionFunctionArgs) {
})

if (submission.status !== 'success') {
console.error("submission failed",submission)

if( process.env.NODE_ENV === "development" ) {
// this can have personal identifying information, so only active in development.
console.error("submission failed", submission)
}
return submission.reply()
// submission.reply({
// // You can also pass additional error to the `reply` method
Expand Down
8 changes: 3 additions & 5 deletions heat-stack/app/utils/GeocodeUtil.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
const BASE_URL = "https://geocoding.geo.census.gov";
const ADDRESS_ENDPOINT = "/geocoder/locations/address";
const ADDRESS_ENDPOINT = "/geocoder/locations/onelineaddress";
const params = new URLSearchParams();

class GeocodeUtil {

/**
*
* @param {*} street
* @param {*} city
* @param {*} state
* @param {*} address
* @returns x,y {x,y} lon/lat. If the given address was valid. I've implemented 0 handling here.
* This is the happiest of paths, with hardcoded values also...
*/
async getLL(address) {
params.append("onelineaddress",address);
params.append("address",address);
params.append("format","json");
params.append("benchmark",2020);

Expand Down
Loading

0 comments on commit 702ff96

Please sign in to comment.