Closed FredLL-Avaiga closed 11 months ago
current status: β
Overall Coverage
Lines Covered Coverage Threshold Status 5276 4522 86% 85% π’ New Files
No new covered files...
Modified Files
File Coverage Status src/taipy/gui/_renderers/builder.py 83% π’ src/taipy/gui/_renderers/factory.py 99% π’ src/taipy/gui/gui.py 87% π’ src/taipy/gui/types.py 92% π’ src/taipy/gui/utils/init.py 100% π’ src/taipy/gui/utils/_evaluator.py 88% π’ src/taipy/gui/utils/types.py 86% π’ TOTAL 91% π’ updated for commit:
1f74dda
by actionπ
gui
Branches coverage not met for global: expected >=80%, but got 62.432675044883304% | St.:grey_question: |
Category | Percentage | Covered / Total |
---|---|---|---|---|
π’ | Statements | 80.85% | 2293/2836 | |
π‘ | Branches | 62.43% | 1391/2228 | |
π‘ | Functions | 75.38% | 401/532 | |
π’ | Lines | 81.21% | 2127/2619 |
334 tests passing in 36 suites.
Report generated by π§ͺjest coverage report action from 1f74dda0747b36e3fa74c29e67e336e2b70e9407
Good catch, tx
On Sat, Nov 18, 2023, 13:12 dinhlongnguyen @.***> wrote:
@.**** approved this pull request.
LGTM
In src/taipy/gui/gui.py https://github.com/Avaiga/taipy-gui/pull/1017#discussion_r1398198682:
@@ -686,27 +686,48 @@ def _get_user_content_url( return f"/{Gui.__USER_CONTENT_URL}/{path or ''}?{urlencode(qargs)}"
def __serve_user_content(self, path: str) -> t.Any:
- if hasattr(self, "on_user_content") and callable(self.on_user_content):
- self.__set_client_id_in_context()
- self.__set_client_id_in_context()
- qargs: t.Dict[str, str] = {}
- qargs.update(request.args)
- qargs.pop(Gui.__ARG_CLIENT_ID, None)
- cb_function_name = qargs.get("custom_user_content_cb")
- cb_function = None
- if cb_function_name:
- cb_function = self._get_user_function(cb_function_name)
- if not callable(cb_function):
- parts = cb_function_name.split(".", 2)
From what I am seeing in the code we only make use of 2 items in the split. Max split should be 1 instead of 2 if you want a list of 2 elements according to this https://www.w3schools.com/python/ref_string_split.asp.
β Reply to this email directly, view it on GitHub https://github.com/Avaiga/taipy-gui/pull/1017#pullrequestreview-1738391014, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVQBA5F4IUK7E6Y5BN6CEOTYFCQ4FAVCNFSM6AAAAAA7QHBBLKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTOMZYGM4TCMBRGQ . You are receiving this because you were assigned.Message ID: @.***>
Addresses the generic part of taipy#444.
The user can create content provider functions that, depending on a content type (set to the content property of a
part
), converts it into HTML code that Taipy can integrate in a page.A provider would be declared as :
Then using the provider is as simple as