Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
c6e4a71
generalized
dinhlongviolin1 Mar 31, 2025
fd30c26
reorganize request
dinhlongviolin1 Apr 1, 2025
b45717b
isolate is running from reloader method
dinhlongviolin1 Apr 1, 2025
006743c
resolve circular import + make sure tests are still passing
dinhlongviolin1 Apr 1, 2025
651b134
add flask api handler
dinhlongviolin1 Apr 1, 2025
eb547d6
replace request calls with RequestAccessor
dinhlongviolin1 Apr 1, 2025
531d4f4
minor renaming
dinhlongviolin1 Apr 1, 2025
1a55316
wrap http response from flask route
dinhlongviolin1 Apr 1, 2025
e9e4421
no need to wrap response flask
dinhlongviolin1 Apr 1, 2025
4db7dea
rename ctx
dinhlongviolin1 Apr 1, 2025
eb22976
make server manager singleton + make config so fastapi works + async …
dinhlongviolin1 Apr 2, 2025
1770325
handle send_ws_message properly for fastapi
dinhlongviolin1 Apr 2, 2025
c065da9
Potential fix for code scanning alert no. 37: Uncontrolled data used …
dinhlongviolin1 Apr 3, 2025
fb53b3d
Potential fix for code scanning alert no. 30: Uncontrolled data used …
dinhlongviolin1 Apr 3, 2025
74896ae
reformat auto commit
dinhlongviolin1 Apr 3, 2025
18385e6
Merge branch 'develop' into feature/server-generalize
dinhlongviolin1 Apr 3, 2025
a5a6733
revert codeql check
dinhlongviolin1 Apr 3, 2025
6076dd3
update dependencies
dinhlongviolin1 Apr 3, 2025
7450eb1
add extras fastapi
dinhlongviolin1 Apr 3, 2025
ccc6c56
fix type complain
dinhlongviolin1 Apr 3, 2025
d144eb8
add support for notebooks
dinhlongviolin1 Apr 4, 2025
ce078c4
add fastapi test option to pytest
dinhlongviolin1 Apr 5, 2025
d75c0e4
update comment
dinhlongviolin1 Apr 5, 2025
aa8abe7
Merge branch 'develop' into feature/server-generalize
dinhlongviolin1 Apr 5, 2025
b55fff8
move test g request to get_request_meta
dinhlongviolin1 Apr 5, 2025
02b9bfd
all tests fixes
dinhlongviolin1 Apr 11, 2025
dfaf7fd
Merge branch 'develop' into feature/server-generalize
dinhlongviolin1 Apr 11, 2025
a312d1d
change to urllib for python 3.9
dinhlongviolin1 Apr 11, 2025
717c9f8
add websocket client
dinhlongviolin1 Apr 11, 2025
190422a
update tests
dinhlongviolin1 Apr 14, 2025
e6ccc98
Merge branch 'develop' into feature/server-generalize
dinhlongviolin1 Apr 14, 2025
b12ce96
increate port wait time
dinhlongviolin1 Apr 14, 2025
4198515
increase run timeout
dinhlongviolin1 Apr 15, 2025
ecdc590
fix race condition
dinhlongviolin1 Apr 15, 2025
e6423b9
increase race condition timeout
dinhlongviolin1 Apr 16, 2025
474ba65
skip tests on windows
dinhlongviolin1 Apr 16, 2025
66f50ab
Merge branch 'develop' into feature/server-generalize
dinhlongviolin1 May 5, 2025
120bf33
Merge branch 'develop' into feature/server-generalize
dinhlongviolin1 May 28, 2025
a928f09
Merge branch 'develop' into feature/server-generalize
dinhlongviolin1 Jun 4, 2025
9e416e4
all tests passing
dinhlongviolin1 Jun 4, 2025
12a53b4
refactor request
dinhlongviolin1 Jun 6, 2025
a835055
refactor + tests all passed
dinhlongviolin1 Jun 12, 2025
3ff5640
Merge branch 'develop' into feature/server-generalize
dinhlongviolin1 Jun 12, 2025
4f00f5c
remove fastapi
dinhlongviolin1 Jun 12, 2025
23546b5
Merge branch 'feature/server-generalize' of https://github.com/Avaiga…
dinhlongviolin1 Jun 12, 2025
7fe4975
update test config
dinhlongviolin1 Jun 12, 2025
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 .github/workflows/overall-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
uses: ./.github/workflows/partial-tests.yml

coverage:
timeout-minutes: 50
timeout-minutes: 60
runs-on: ubuntu-latest

if: github.event_name == 'pull_request' && github.event.pull_request.base.repo.full_name == github.event.pull_request.head.repo.full_name
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/partial-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

tests:
needs: linter
timeout-minutes: 50
timeout-minutes: 70
strategy:
fail-fast: false
matrix:
Expand Down
5 changes: 3 additions & 2 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ apispec-webframeworks = "==0.5.2"
cookiecutter = "==2.1.1"
deepdiff = "==6.7.1"
flask = "==3.1.0"
flask-cors = "==5.0.0"
flask-socketio = "==5.4.1"
flask-cors = "==5.0.1"
flask-socketio = "==5.5.1"
Flask-RESTful = ">=0.3.9"
gevent = "==24.11.1"
gevent-websocket = "==0.10.1"
Expand Down Expand Up @@ -72,6 +72,7 @@ types-python-dateutil = "*"
types-pytz = "*"
types-toml = ">=0.10.0"
types-tzlocal = "*"
websocket-client = "*"

[requires]
python_version = "3"
Expand Down
1 change: 1 addition & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ markers =
teste2e:End-to-end tests
orchestrator_dispatcher:Orchestrator dispatcher tests
standalone:Tests starting a standalone dispatcher thread
skip_if_not_server:Skip test if not running in specific server mode
2 changes: 1 addition & 1 deletion taipy/_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def _run(*services: _AppType, **kwargs) -> t.Optional[Flask]:
return None

if gui and rest:
gui._set_flask(rest._app) # type: ignore[union-attr]
gui._set_web_server(rest._app) # type: ignore[union-attr]
return gui.run(**kwargs)
else:
app = rest or gui
Expand Down
3 changes: 0 additions & 3 deletions taipy/gui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ demo*/
docker-compose-dev*.yml
Dockerfile.dev

# Ignore jupyter notebook files except the simple_gui.ipynb
!simple_gui.ipynb

# GUI generation
taipy_webapp/

Expand Down
2 changes: 1 addition & 1 deletion taipy/gui/_default_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"debug": False,
"extended_status": False,
"favicon": None,
"flask_log": False,
"server_log": False,
"host": "127.0.0.1",
"light_theme": None,
"margin": "1em",
Expand Down
17 changes: 12 additions & 5 deletions taipy/gui/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import pytz
import tzlocal
from dotenv import dotenv_values
from werkzeug.serving import is_running_from_reloader

from taipy.common.logger._taipy_logger import _TaipyLogger

Expand All @@ -27,6 +26,9 @@
from .partial import Partial
from .utils import _is_in_notebook, _is_true

if t.TYPE_CHECKING:
from .gui import Gui

ConfigParameter = t.Literal[
"allow_unsafe_werkzeug",
"async_mode",
Expand All @@ -40,7 +42,7 @@
"debug",
"extended_status",
"favicon",
"flask_log",
"server_log",
"host",
"light_theme",
"margin",
Expand Down Expand Up @@ -114,7 +116,7 @@
"debug": bool,
"extended_status": bool,
"favicon": t.Optional[str],
"flask_log": bool,
"server_log": bool,
"host": str,
"light_theme": t.Optional[t.Dict[str, t.Any]],
"margin": t.Optional[str],
Expand Down Expand Up @@ -150,13 +152,14 @@ class _Config(object):
r"^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$"
)

def __init__(self) -> None:
def __init__(self, gui: "Gui") -> None:
self.pages: t.List[_Page] = []
self.root_page: t.Optional[_Page] = None
self.routes: t.List[str] = []
self.partials: t.List[Partial] = []
self.partial_routes: t.List[str] = []
self.config: Config = {}
self._gui = gui

def _load(self, config: Config) -> None:
self.config.update(config)
Expand Down Expand Up @@ -290,7 +293,11 @@ def _build_config(self, root_dir, env_filename, kwargs): # pragma: no cover
self._handle_argparse()

def __log_outside_reloader(self, logger, msg):
if not is_running_from_reloader():
if (
hasattr(self._gui, "_server")
and self._gui._server is not None
and not self._gui._server.is_running_from_reloader()
):
logger.info(msg)

def resolve(self):
Expand Down
Loading