Skip to content

Commit 4e1e753

Browse files
authored
Update RPC Describe example to use Flask JWT Headers locator (#703)
* Standardize exception messages * Update RPC Describe example to use Flask JWT Headers locator * Create a interceptor on Browse using angular modules * Create a mechanism to refresh token when the request is invalid (401) See here: https://flask-jwt-extended.readthedocs.io/en/stable/refreshing_tokens.html#explicit-refreshing-with-refresh-tokens Resolve: #370
1 parent 90e0584 commit 4e1e753

File tree

28 files changed

+656
-411
lines changed

28 files changed

+656
-411
lines changed

.github/workflows/on_update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ jobs:
135135
python-version: ${{ matrix.python-version }}
136136
allow-prereleases: true
137137
- run: |
138-
find examples/ -name "tox.ini" -print0 | xargs -0 -I {} -P 1 uv run tox run -e py,py-async -c {}
138+
find examples/ -name "pyproject.toml" -print0 | xargs -0 -I {} -P 4 uv run tox run -e py,py-async -c {}
139139
140140
integration-tests:
141141
name: Integration tests | Docker [${{ matrix.platform }} | ${{ matrix.python-version }}]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ test-cov-unit:
4444

4545

4646
test-examples: clean
47-
@find examples/ -name "tox.ini" -print0 | xargs -0 -I {} -P 4 uv run tox run -e py,py-async -c {}
47+
@find examples/ -name "pyproject.toml" -print0 | xargs -0 -I {} -P 4 uv run tox run -e py,py-async -c {}
4848

4949
test-release: clean test
5050
$(shell ./bin/docker-compose-test.sh)

examples/javascript/uv.lock

Lines changed: 31 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/minimal-async/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ Flask-JSONRPC = { path = "../../", editable = true }
4545
pythonpath = "src/"
4646
testpaths = ["src/minimal_async", "tests"]
4747
filterwarnings = ["error"]
48+
markers = [
49+
"parallel_threads: mark test to run in parallel threads",
50+
]
4851

4952
[tool.tox]
5053
requires = [

examples/minimal-async/uv.lock

Lines changed: 31 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/minimal/uv.lock

Lines changed: 31 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/modular/src/modular/app.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@
2828

2929
from flask import Flask
3030

31-
from api.user import user
32-
from api.article import article
33-
3431
from flask_jsonrpc import JSONRPC
32+
from modular.api.user import user
33+
from modular.api.article import article
3534

3635
app = Flask('modular')
3736
jsonrpc = JSONRPC(app, '/api', enable_web_browsable_api=True)

examples/modular/uv.lock

Lines changed: 31 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/multiplesite/uv.lock

Lines changed: 31 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/openrpc/tests/test_app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,8 @@ def test_rpc_describe(client: 'FlaskClient') -> None:
247247
'validation': True,
248248
},
249249
'rpc.describe': {
250-
'name': 'rpc.describe',
251250
'description': 'Service description for JSON-RPC 2.0',
251+
'name': 'rpc.describe',
252252
'notification': False,
253253
'params': [],
254254
'returns': {
@@ -270,10 +270,10 @@ def test_rpc_describe(client: 'FlaskClient') -> None:
270270
},
271271
'rpc.discover': {
272272
'name': 'rpc.discover',
273-
'notification': False,
273+
'notification': True,
274274
'params': [],
275275
'returns': {'name': 'default', 'type': 'Null'},
276276
'type': 'method',
277-
'validation': False,
277+
'validation': True,
278278
},
279279
}

0 commit comments

Comments
 (0)