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 invoke script using dev DB in non-dev #142

Merged
merged 39 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
53a5c2f
Update script to remove old container
rmarow Sep 14, 2023
9cfae4a
Comment out where environment variables were being set unintentionally
rmarow Sep 15, 2023
ecaa06c
Linting
rmarow Sep 15, 2023
da5d4a7
Add envs to mypy function
rmarow Sep 15, 2023
0e8fc1b
Update envarrs to not be hacky
rmarow Sep 15, 2023
fc8e0d5
part 1 setting up blueprint
rmarow Sep 18, 2023
d018d8e
WIP #2 adding application factory
rmarow Sep 18, 2023
c017dbe
Fix circular import issue
rmarow Sep 18, 2023
ce8dbf6
fix blueprint
rmarow Sep 18, 2023
f29779e
remove unused import
rmarow Sep 18, 2023
3b20204
TEMPORARY resolve `app` errors - need to figure out true solution
rmarow Sep 18, 2023
cca5a3f
WIP different blueprint for responses
rmarow Sep 18, 2023
1b8deea
WIP continue `response` blueprint update
rmarow Sep 18, 2023
82a1891
WIP able to startup app, still getting a blueprint error
rmarow Sep 19, 2023
43913df
Remove prefix from route
rmarow Sep 19, 2023
af2192a
Fix import
rmarow Sep 19, 2023
97b1451
WIP - current blocker is login manager
rmarow Sep 19, 2023
724c533
LoginManager
rmarow Sep 19, 2023
90e69b4
Login manager working
rmarow Sep 19, 2023
e619c6f
Login blueprint
rmarow Sep 19, 2023
471175a
Add survey blueprint and remove `app` from user.py
rmarow Sep 19, 2023
f018cbc
Update task/db to use create_app function
rmarow Sep 19, 2023
e6304f6
Import login_bp
rmarow Sep 19, 2023
f929ee9
Attempt at getting login working - not successful
rmarow Sep 20, 2023
e9e563f
Temporarily remove ability to bypass googleSSO
rmarow Sep 20, 2023
5a7ebfc
Remove unused `app` in this file
rmarow Sep 20, 2023
92e2738
Fix login related error and call current_app as recommended by docs
rmarow Sep 21, 2023
25241bd
Add logout blueprint
rmarow Sep 21, 2023
d7c50cb
Update users template to include blueprint
rmarow Sep 21, 2023
53a5177
Add survey blueprint to redirect url
rmarow Sep 21, 2023
376c23e
Add response blueprint
rmarow Sep 21, 2023
ac3fcf0
Start adding response blueprint - response sub pages need their own bp
rmarow Sep 21, 2023
1b1e101
view surveys blueprint
rmarow Sep 21, 2023
af5ca07
remove breakpoint
rmarow Sep 25, 2023
af48db0
Add comments regarding issue #144
rmarow Sep 25, 2023
714e8bf
Merge branch 'non-dev-db-issue' of github.com:nsidc/usaon-vta-survey …
rmarow Sep 25, 2023
4a3113a
Group blueprint imports together to reduce additional spacing
rmarow Sep 25, 2023
1e52cd0
Update path
rmarow Sep 28, 2023
b9bd638
Adding blueprints
rmarow Sep 28, 2023
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
2 changes: 1 addition & 1 deletion scripts/invoke_in_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ args="$@"

# TODO: Do we need this? --user="${UID}" \
# Or this for wrapping the command? bash --login -c \
docker-compose run \
docker-compose run --rm \
usaon-vta-survey \
invoke $args

Expand Down
9 changes: 6 additions & 3 deletions tasks/test.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import os
import sys
from pathlib import Path

from invoke import task

from .util import print_and_run

# TODO: Put this in a function where you want to run pytest
# WARNING: If uncommented this will cause major issues.
# (Will set the variables true for invoke tasks in all envs)
# Causes issues with DB in non-dev envs
# NOTE: This is a hack, we want to be able to run pytest
# without setting environment variables.
os.environ['USAON_VTA_DB_SQLITE'] = 'true'
os.environ['FLASK_DEBUG'] = 'true'
# os.environ['USAON_VTA_DB_SQLITE'] = 'true'
# os.environ['FLASK_DEBUG'] = 'true'
PROJECT_DIR = Path(__file__).resolve().parent.parent
sys.path.append(PROJECT_DIR)

Expand Down