Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Build #169

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/Unit-Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,14 @@ jobs:

- name: Launch Worker
run: |
export OSM_CLIENT_ID=thisisfakeosmcliendid
export OSM_CLIENT_SECRET=thisisclientosm
export APP_SECRET_KEY=thisissecretkey
celery --app API.api_worker worker --loglevel=INFO --queues='raw_default' &

- name: Run Tests
run: |
export OSM_CLIENT_ID=thisisfakeosmcliendid
export OSM_CLIENT_SECRET=thisisclientosm
export APP_SECRET_KEY=thisissecretkey
py.test -v -s
7 changes: 7 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,20 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .

- name: Run uvicorn server
run: |
export OSM_CLIENT_ID=thisisfakeosmcliendid
export OSM_CLIENT_SECRET=thisisclientosm
export APP_SECRET_KEY=thisissecretkey
uvicorn API.main:app &> uvicorn.log &
env:
PORT: 8000
- name: Run celery server
run: |
export OSM_CLIENT_ID=thisisfakeosmcliendid
export OSM_CLIENT_SECRET=thisisclientosm
export APP_SECRET_KEY=thisissecretkey
celery --app API.api_worker worker --loglevel=DEBUG &> worker.log &
- name: Run flower dashboard
run: |
Expand Down
4 changes: 2 additions & 2 deletions config.txt.sample
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ PGDATABASE=rawdata
# for scope. Callback / Redirect URI should be set when the OAuth2 app
# is created on OSM portal. App secret key is a high-entropy string.
[OAUTH]
OSM_CLIENT_ID=0yhbzr7-e0F-DGgyxXOyq2Y4d_sYLflMzVvLIfRtxHg
OSM_CLIENT_SECRET= KI59u4PLCQFAd8Vo2oewaHNmlf2EfTcfGgwWd2VCtk8
OSM_CLIENT_ID=0yhbzr7-e0F-DGgyxXOyq2Y4d_sYLfdflMzVvLIfRtxHg
OSM_CLIENT_SECRET= KI59u4PLCQFAd8Vo2oewaHNmlf2EfTcfGgwWd2VCsdtk8
;OSM_URL=https://www.openstreetmap.org
;OSM_PERMISSION_SCOPE=read_prefs
LOGIN_REDIRECT_URI=http://raw-data-test.example.net:8000/v1/auth/callback/
Expand Down
2 changes: 1 addition & 1 deletion src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def get_oauth_credentials() -> tuple:
"OAUTH", "APP_SECRET_KEY"
)
login_redirect_uri = os.environ.get("LOGIN_REDIRECT_URI") or config.get(
"OAUTH", "LOGIN_REDIRECT_URI"
"OAUTH", "LOGIN_REDIRECT_URI", fallback="http://127.0.0.1:8000/v1/auth/callback"
)
scope = os.environ.get("OSM_PERMISSION_SCOPE") or config.get(
"OAUTH", "OSM_PERMISSION_SCOPE", fallback="read_prefs"
Expand Down
Loading