Police-Data-Accessibility-Project / data-sources-app

An API and UI for using and maintaining the Data Sources database
MIT License
2 stars 4 forks source link

update sample .env file in readme #321

Closed josh-chamberlain closed 1 week ago

josh-chamberlain commented 3 weeks ago

adds a sample .env file for clarity on what we need to run the app.

Used in automatic_archives but not here: VUE_APP_PDAP_API_KEY Definitely deprecated: VUE_APP_PDAP_TOKEN (not used anywhere)

josh-chamberlain commented 3 weeks ago

@maxachis what do you think about the use of VUE_APP_PDAP_API_KEY in the back end?

I think we could try swapping to a modern variable, or just leaving this because we're working on tests in v2. Or maybe a third option.

maxachis commented 3 weeks ago

@josh-chamberlain A search for VUE_APP_PDAP_API_KEY yields results only in regular_api_checks.py and various (before my time) test files:

image

If the frontier of the backend begins at the endpoints then it's not needed for the backend: I can make calls to the endpoints without it.

As for regular_api_checks.py: upon inspection, I'm not sure why it's called the VUE_APP_PDAP_API_KEY in the first place -- at least in this file, it interacts only with the endpoints by being used for header authorization; it doesn't touch Vue at all.

I'm not sure what you mean by a more modern variable (though I'm open to whatever it is!).

As an aside, a lot of the logic in regular_api_checks.py can probably be migrated (with modifications) to the health-monitoring app, and it probably is a better fit there. A Github Action does not have the same granularity and ease of debugging as a full-fledged application.

josh-chamberlain commented 3 weeks ago

@maxachis ok, thanks for the sanity check! I made an issue to deprecate that code, I think it's covered by health-monitoring and your other tests—we shouldn't need to worry about a line by line refactor.