Skip to content

Update for non-dev environments#5

Merged
trey-stafford merged 24 commits intomainfrom
update-for-non-dev-envs
Mar 11, 2025
Merged

Update for non-dev environments#5
trey-stafford merged 24 commits intomainfrom
update-for-non-dev-envs

Conversation

@trey-stafford
Copy link
Contributor

@trey-stafford trey-stafford commented Mar 11, 2025

  • Tweaks for supporting development behind the NSIDC.org proxy (e.g., in integration)
  • Remove trailing slash from endpoints
  • Rename auth_finish/ callback endpoint to auth_callback
  • Get flask secret key from envvar (supplied by vault, see: VM configuration for DAT data-access-tool-vm#1)

michaeljb and others added 24 commits March 15, 2018 15:29
Following the guide in the docs to make this work -
http://flask.pocoo.org/docs/0.12/patterns/packages/

Run dev server with:

```
export FLASK_APP=hermes_api
pip install -e .
flask run -h 0.0.0.0
```

* unnest project structure by 1
* add `setup.py` to root of project
* make imports in `__init__.py` relative
* upgrade to flask 0.12
* add `dev.sh` with commands listed above
appease the new plugins
Upgrade to Python 3.7, add flake8-quotes and flake8-import-order [EVEREST-439]

Approved-by: Matt Fisher <matt.fisher@nsidc.org>
* update mypy-stubs submodule
* copy .mypy.ini from hermes-workers
* add type annotations so mypy passes
* use relative imports where possible for internal code
more mypy

Approved-by: Michael Brandt <michael.brandt@nsidc.org>
The webserver provides a header, save it to app.config
EVEREST-430 apiv4

Approved-by: Matt Fisher <matt.fisher@nsidc.org>
EVEREST-382 script interface fixes

Approved-by: Michael Brandt <michael.brandt@nsidc.org>
EVEREST-382 script interface

Approved-by: Michael Brandt <michael.brandt@nsidc.org>
EVEREST-382 PythonScript

Approved-by: Michael Brandt <michael.brandt@nsidc.org>
Approved-by: Matt Fisher <matt.fisher@nsidc.org>
HERMES-72 apache proxy

* fix adding earthdata user to db--when a new user authenticates for the first time

* save dead link with the wayback machine

* upgrade flask-restplus to v0.13.0, use patch for basePath issue

    see noirbizarre/flask-restplus#755 for more details on
    the basePath issue

* changelog [ci skip]

* don't lint the flask-restplus workaround code

Approved-by: Michael Brandt <michael.brandt@nsidc.org>
Still not working quite as I expect...the swagger page that loads expects things
to live at the root, and doesn't understand it's behind a proxy.
This allows redirects to correctly understand that they are behind a proxy with
additional path components that the application wouldn't otherwise know about.
Utilized while setting up proxy rules
* Remove the trailing shalsh from auth endpoints, to be consistent with
`get-links`. This is also standard for endpoints that accept query parameters
and do not represent a collection.

* Rename auth finish -> callback. Resolves TODO.
@trey-stafford trey-stafford merged commit b52cd7b into main Mar 11, 2025
2 checks passed
@trey-stafford trey-stafford deleted the update-for-non-dev-envs branch March 11, 2025 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants