Skip to content

Commit

Permalink
Merge pull request #512 from AndersenLab/fix/genome-browser-not-logge…
Browse files Browse the repository at this point in the history
…d-in

Fix Genome Browser login redirect bug (make endpoints public)
  • Loading branch information
r-vieira authored Oct 31, 2024
2 parents 69d4b24 + 2efe2e0 commit c29bb32
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 21 deletions.
38 changes: 19 additions & 19 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

{
"name": "Run Site-v2 (requires a local Postgres instance or cloud-sql-proxy)",
"type": "python",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/src/modules/site-v2",
"console": "integratedTerminal",
Expand Down Expand Up @@ -44,7 +44,7 @@
},
{
"name": "Run Site (requires a local Postgres instance or cloud-sql-proxy)",
"type": "python",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/src/modules/site",
"console": "integratedTerminal",
Expand Down Expand Up @@ -79,7 +79,7 @@
},
{
"name": "Script: Create NemaScan Task",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/modules/site/scripts/create-nemascan-mapping-task.py",
"cwd": "${workspaceFolder}/src/modules/site",
Expand All @@ -91,7 +91,7 @@
},
{
"name": "Run API pipeline server",
"type": "python",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/src/modules/api/pipeline-task",
"console": "integratedTerminal",
Expand Down Expand Up @@ -121,7 +121,7 @@
},
{
"name": "TEST img_thumb_gen",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/modules/img_thumb_gen/test.py",
"console": "integratedTerminal",
Expand All @@ -135,7 +135,7 @@
},
{
"name": "Run DROP_AND_POPULATE_STRAINS",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/modules/db_operations/main.py",
"console": "integratedTerminal",
Expand All @@ -158,7 +158,7 @@
},
{
"name": "Run DROP_AND_POPULATE_WORMBASE_GENES (WS283)",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/modules/db_operations/main.py",
"console": "integratedTerminal",
Expand All @@ -181,7 +181,7 @@
},
{
"name": "Run DROP_AND_POPULATE_STRAIN_ANNOTATED_VARIANTS",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/modules/db_operations/main.py",
"console": "integratedTerminal",
Expand All @@ -204,7 +204,7 @@
},
{
"name": "Run DROP_AND_POPULATE_PHENOTYPE_METADATA",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/modules/db_operations/main.py",
"console": "integratedTerminal",
Expand All @@ -227,7 +227,7 @@
},
{
"name": "Run DROP_AND_POPULATE_PHENOTYPE_DB",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/modules/db_operations/main.py",
"console": "integratedTerminal",
Expand All @@ -250,7 +250,7 @@
},
{
"name": "Run DROP_AND_POPULATE_PHENOTYPES",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/modules/db_operations/main.py",
"console": "integratedTerminal",
Expand All @@ -273,7 +273,7 @@
},
{
"name": "Run DROP_AND_POPULATE_ALL_TABLES",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/modules/db_operations/main.py",
"console": "integratedTerminal",
Expand All @@ -298,7 +298,7 @@
},
{
"name": "DROP_AND_POPULATE_ALL_TABLES (USE MOCK DATA)",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/modules/db_operations/main.py",
"console": "integratedTerminal",
Expand All @@ -324,7 +324,7 @@
},
{
"name": "Run POPULATE_PHENOTYPES_DATASTORE",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/modules/db_operations/main.py",
"console": "integratedTerminal",
Expand All @@ -346,7 +346,7 @@
},
{
"name": "DB_OP TEST_ECHO",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/modules/db_operations/main.py",
"console": "integratedTerminal",
Expand All @@ -372,7 +372,7 @@
},
{
"name": "DbOp: Recompute Phenotype Report Cached Names",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/modules/db_operations/main.py",
"console": "integratedTerminal",
Expand All @@ -390,7 +390,7 @@
},
{
"name": "Test Indel Finder",
"type": "python",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/src/modules/indel_primer/main.py",
"console": "integratedTerminal",
Expand All @@ -410,7 +410,7 @@
},
{
"name": "Run Site-v2 (local API)",
"type": "python",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/src/modules/site-v2",
"console": "integratedTerminal",
Expand Down Expand Up @@ -440,7 +440,7 @@
},
{
"name": "Run API pipeline server (local site)",
"type": "python",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}/src/modules/api/pipeline-task",
"console": "integratedTerminal",
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,4 +408,13 @@ $ arch -x86_64 brew install openssl
```
Q: I get an `ImportError` when running the API in VSCode:
```
ImportError: cannot import name 'Literal' from 'typing' (/Users/ ... /.pyenv/versions/3.7.12/lib/python3.7/typing.py)
```
A: The VSCode extension `debugpy`, version `v2024.12.0`, appears to break on Python 3.7 -- it's not clear if this is a bug, or intentional dropping of support for older versions.
You can get around this by pinning your extension to `v2024.10.0` -- see [the VSCode docs](https://code.visualstudio.com/updates/v1_30#_install-previous-versions) for instructions.

(If this is a bug, further updates to `debugpy` might fix this issue. Keep an eye on it, and try the newest version if necessary.)

2 changes: 0 additions & 2 deletions src/modules/site-v2/base/views/api/tracks.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ def edit_track(track: BrowserTrackDefault = None, form_data = None, no_cache: bo


@api_tracks_bp.route('/tool/<string:tool_id>', methods=['GET'])
@jwt_required()
@jsonify_request
def get_tool_tracks(tool_id: str):
'''
Expand All @@ -227,7 +226,6 @@ def get_tool_tracks(tool_id: str):


@api_tracks_bp.route('/templates', methods=['GET'])
@jwt_required()
@jsonify_request
def get_track_templates():
'''
Expand Down

0 comments on commit c29bb32

Please sign in to comment.