Closed Joshdpaul closed 1 day ago
@cstephen Thank you for the detailed review! Great job catching all those little things, they are important!
I was able to address all your comments, and took a stab at a 403 template. Not sure if that's the most appropriate code, or if the message should be something else, but we can adjust that pretty easily in future work.
I am still unable to make requests without turning off SSL verification. I get this error:
SSLError
requests.exceptions.SSLError: HTTPSConnectionPool(host='gs.earthmaps.io', port=443): Max retries exceeded with url: /geoserver/wfs?service=WFS&version=2.0.0&request=GetFeature&typeName=demographics:demographics&outputFormat=application/json&propertyName=(id) (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1135)')))
This PR fetches the new fields added to the demographics data during this PR, limits API returns to communities with >=50 people, and improves the CSV output by tranposing the table, adding more detailed descrioptions of the data elements, and re-ordering the fields to match the display order in NCR.
closes #490 closes #489 closes #487 closes #482 closes #476 closes #475
To test:
API_GS_BASE_URL
environmental variable to the development server like so:export API_GS_BASE_URL=https://gs.earthmaps.io/geoserver/
Nabesna should not return data as JSON or CSV
http://127.0.0.1:5000/demographics/AK256 http://127.0.0.1:5000/demographics/AK256?format=csv