before_code
stringlengths
14
465k
reviewer_comment
stringlengths
16
64.5k
after_code
stringlengths
9
467k
diff_context
stringlengths
0
97k
file_path
stringlengths
5
226
comment_line
int32
0
26
language
stringclasses
37 values
quality_score
float32
0.07
1
comment_type
stringclasses
9 values
comment_length
int32
16
64.5k
before_lines
int32
1
17.2k
after_lines
int32
1
12.1k
is_negative
bool
2 classes
pr_title
stringlengths
1
308
pr_number
int32
1
299k
repo_name
stringclasses
533 values
repo_stars
int64
321
419k
repo_language
stringclasses
27 values
reviewer_username
stringlengths
0
39
author_username
stringlengths
2
39
This function allows specifying a custom conversion function for data types that cannot be serialized automatically. When Taipy GUI encounters an unsupported type in the data being serialized, it will invoke the provided *converter* function. The returned value from this function will th...
use `_is_function` instead of `callable`
This function allows specifying a custom conversion function for data types that cannot be serialized automatically. When Taipy GUI encounters an unsupported type in the data being serialized, it will invoke the provided *converter* function. The returned value from this function will th...
@@ -1143,6 +1143,41 @@ def __update_state_context(self, payload: dict): for var, val in state_context.items(): self._update_var(var, val, True, forward=False) + + @staticmethod + def set_unsupported_data_converter(converter: t.Optional[t.Callable[[t.Any], t.Any]]) -> None: + ...
taipy/gui/gui.py
26
Python
0.286
suggestion
40
51
51
false
Added a function to support data conversion if type is not supported by the taipy.gui.data module
2,028
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Ujj1225
if (changeDelay === -1) { return; } if (changeDelay === 0) { Promise.resolve().then(() => { dispatch(createSendUpdateAction(updateVarName, val, module, onChange, propagate)); }); } if (delayCa...
~~this should always be called~~ ~~So put outside the if/else block~~ I think you're right this should only be called if there is delayed call on hold Sorry about the noise
setValue(val); if (changeDelay === -1) { return; } if (changeDelay === 0) { Promise.resolve().then(() => { dispatch(createSendUpdateAction(updateVarName, val, module, onChange, propagate)); }); ...
@@ -138,6 +138,20 @@ const Input = (props: TaipyInputProps) => { [changeDelay, dispatch, updateVarName, module, onChange, propagate] ); + const handleBlur = useCallback( + (e: React.FocusEvent<HTMLInputElement>) => { + const val = e.target.value; + if (changeDelay > 0 && ...
frontend/taipy-gui/src/components/Taipy/Input.tsx
26
TypeScript
0.429
suggestion
175
51
51
false
Input control validation on focus out event
2,036
Avaiga/taipy
12,680
Python
FredLL-Avaiga
kart2004
cls._default_config._unique_sections[default_section.name] = default_section elif def_sections := cls._default_config._sections.get(default_section.name, None): def_sections[default_section.id] = default_section else: cls._default_config._sections[default_section....
```suggestion cls._serializer._section_class[section.name] = section.__class__ cls.__json_serializer._section_class[section.name] = section.__class__ ```
cls._default_config._unique_sections[default_section.name] = default_section elif def_sections := cls._default_config._sections.get(default_section.name, None): def_sections[default_section.id] = default_section else: cls._default_config._sections[default_section....
@@ -283,8 +283,8 @@ def _register(cls, section) -> None: sections[section.id] = section else: cls._python_config._sections[section.name] = {section.id: section} - cls._serializer._section_class[section.name] = section.__class__ - cls.__json_serializer._section_class[...
taipy/common/config/config.py
26
Python
0.714
suggestion
172
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
import sys import typing as t from flask import Flask from taipy.core import Orchestrator from taipy.gui import Gui from taipy.rest import Rest if sys.version_info >= (3, 10): from typing import TypeGuard _AppType = t.Union[Gui, Rest, Orchestrator] _AppTypeT = t.TypeVar("_AppTypeT", Gui, Rest, Orchestrator) d...
```suggestion **kwargs: Other parameters to provide to the services. ```
import sys import typing as t from flask import Flask from taipy.core import Orchestrator from taipy.gui import Gui from taipy.rest import Rest if sys.version_info >= (3, 10): from typing import TypeGuard _AppType = t.Union[Gui, Rest, Orchestrator] _AppTypeT = t.TypeVar("_AppTypeT", Gui, Rest, Orchestrator) d...
@@ -30,11 +30,11 @@ def _run(*services: _AppType, **kwargs) -> t.Optional[Flask]: A Taipy service is an instance of a class that runs code as a Web application. - Parameters: + Arguments: *services (Union[`Gui^`, `Rest^`, `Orchestrator^`]): Services to run, as separate arguments.<br/> ...
taipy/_run.py
26
Python
0.571
suggestion
82
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
@classmethod def configure_parquet_data_node( cls, id: str, default_path: Optional[str] = None, engine: Optional[str] = None, compression: Optional[str] = None, read_kwargs: Optional[Dict] = None, write_kwargs: Optional[Dict] = None, exposed_type:...
```suggestion read_kwargs (Optional[dict]): Additional parameters passed to the `pandas.read_parquet()` ```
@classmethod def configure_parquet_data_node( cls, id: str, default_path: Optional[str] = None, engine: Optional[str] = None, compression: Optional[str] = None, read_kwargs: Optional[Dict] = None, write_kwargs: Optional[Dict] = None, exposed_type:...
@@ -496,20 +496,20 @@ class Config: ) -> "DataNodeConfig": """Configure a new Parquet data node configuration. - Parameters: + Arguments: id (str): The unique identifier of the new Parquet data node configuration. default_path (Optional[str]): The default path of ...
taipy/common/config/config.pyi
26
Python
0.714
suggestion
121
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
def configure_parquet_data_node( cls, id: str, default_path: Optional[str] = None, engine: Optional[str] = None, compression: Optional[str] = None, read_kwargs: Optional[Dict] = None, write_kwargs: Optional[Dict] = None, exposed_type: Optional[str] = N...
```suggestion write_kwargs (Optional[dict]): Additional parameters passed to the ```
def configure_parquet_data_node( cls, id: str, default_path: Optional[str] = None, engine: Optional[str] = None, compression: Optional[str] = None, read_kwargs: Optional[Dict] = None, write_kwargs: Optional[Dict] = None, exposed_type: Optional[str] = N...
@@ -496,20 +496,20 @@ class Config: ) -> "DataNodeConfig": """Configure a new Parquet data node configuration. - Parameters: + Arguments: id (str): The unique identifier of the new Parquet data node configuration. default_path (Optional[str]): The default path of ...
taipy/common/config/config.pyi
26
Python
0.571
suggestion
98
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
default_path: Optional[str] = None, engine: Optional[str] = None, compression: Optional[str] = None, read_kwargs: Optional[Dict] = None, write_kwargs: Optional[Dict] = None, exposed_type: Optional[str] = None, scope: Optional[Scope] = None, validity_period...
```suggestion The parameters in *read_kwargs* and *write_kwargs* have a **higher precedence** than the top-level parameters which are also passed to Pandas. ```
default_path: Optional[str] = None, engine: Optional[str] = None, compression: Optional[str] = None, read_kwargs: Optional[Dict] = None, write_kwargs: Optional[Dict] = None, exposed_type: Optional[str] = None, scope: Optional[Scope] = None, validity_period...
@@ -496,20 +496,20 @@ class Config: ) -> "DataNodeConfig": """Configure a new Parquet data node configuration. - Parameters: + Arguments: id (str): The unique identifier of the new Parquet data node configuration. default_path (Optional[str]): The default path of ...
taipy/common/config/config.pyi
26
Python
0.714
suggestion
196
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
[page](../../../../../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations) for more details). If *validity_period* is set to None, the data node is always up-to-date. **properties (dict[str, any]): A keyworded variable l...
```suggestion So it is designed to handle small data values like parameters, and it must be Json serializable. ```
[page](../../../../../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations) for more details). If *validity_period* is set to None, the data node is always up-to-date. **properties (dict[str, any]): A keyworded variable l...
@@ -610,12 +610,12 @@ class Config: ) -> "DataNodeConfig": """Configure a new *in-memory* data node configuration. - Parameters: + Arguments: id (str): The unique identifier of the new in_memory data node configuration. default_data (Optional[any]): The default da...
taipy/common/config/config.pyi
26
Python
0.857
suggestion
132
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
If *validity_period* is set to None, the data node is always up-to-date. **properties (dict[str, any]): A keyworded variable length list of additional arguments. Returns: The new *in-memory* data node configuration. """ # noqa: E501 @classmethod def con...
```suggestion So it is designed to handle small data values like parameters, and it must be Json serializable. ```
If *validity_period* is set to None, the data node is always up-to-date. **properties (dict[str, any]): A keyworded variable length list of additional arguments. Returns: The new *in-memory* data node configuration. """ # noqa: E501 @classmethod def con...
@@ -642,13 +642,13 @@ class Config: ) -> "DataNodeConfig": """Configure a new pickle data node configuration. - Parameters: + Arguments: id (str): The unique identifier of the new pickle data node configuration. default_path (Optional[str]): The path of the pickle...
taipy/common/config/config.pyi
26
Python
0.857
suggestion
132
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
# Copyright 2021-2024 Avaiga Private Limited # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
```suggestion accepts hashable parameters, the `"mongodb_extra_args"` should be converted into a frozenset beforehand. ```
# Copyright 2021-2024 Avaiga Private Limited # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
@@ -20,9 +20,9 @@ def _connect_mongodb( ) -> pymongo.MongoClient: """Create a connection to a Mongo database. The `"mongodb_extra_args"` passed by the user is originally a dictionary, but since `@lru_cache` wrapper only - accepts hashable parameters, the `"mongodb_extra_args"` should be converted into a f...
taipy/core/common/_mongo_connector.py
23
Python
0.786
suggestion
128
48
48
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
@classmethod def _configure_parquet( cls, id: str, default_path: Optional[str] = None, engine: Optional[str] = None, compression: Optional[str] = None, read_kwargs: Optional[Dict] = None, write_kwargs: Optional[Dict] = None, exposed_type: Optional...
```suggestion read_kwargs (Optional[dict]): Additional parameters passed to the `pandas.read_parquet()` ```
@classmethod def _configure_parquet( cls, id: str, default_path: Optional[str] = None, engine: Optional[str] = None, compression: Optional[str] = None, read_kwargs: Optional[Dict] = None, write_kwargs: Optional[Dict] = None, exposed_type: Optional...
@@ -610,20 +610,20 @@ def _configure_parquet( ) -> "DataNodeConfig": """Configure a new Parquet data node configuration. - Parameters: + Arguments: id (str): The unique identifier of the new Parquet data node configuration. default_path (Optional[str]): The defaul...
taipy/core/config/data_node_config.py
26
Python
0.714
suggestion
121
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
def _configure_parquet( cls, id: str, default_path: Optional[str] = None, engine: Optional[str] = None, compression: Optional[str] = None, read_kwargs: Optional[Dict] = None, write_kwargs: Optional[Dict] = None, exposed_type: Optional[str] = None, ...
```suggestion write_kwargs (Optional[dict]): Additional parameters passed to the ```
def _configure_parquet( cls, id: str, default_path: Optional[str] = None, engine: Optional[str] = None, compression: Optional[str] = None, read_kwargs: Optional[Dict] = None, write_kwargs: Optional[Dict] = None, exposed_type: Optional[str] = None, ...
@@ -610,20 +610,20 @@ def _configure_parquet( ) -> "DataNodeConfig": """Configure a new Parquet data node configuration. - Parameters: + Arguments: id (str): The unique identifier of the new Parquet data node configuration. default_path (Optional[str]): The defaul...
taipy/core/config/data_node_config.py
26
Python
0.571
suggestion
98
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
default_path: Optional[str] = None, engine: Optional[str] = None, compression: Optional[str] = None, read_kwargs: Optional[Dict] = None, write_kwargs: Optional[Dict] = None, exposed_type: Optional[str] = None, scope: Optional[Scope] = None, validity_period...
```suggestion The parameters in *read_kwargs* and *write_kwargs* have a **higher precedence** than the top-level parameters which are also passed to Pandas. ```
default_path: Optional[str] = None, engine: Optional[str] = None, compression: Optional[str] = None, read_kwargs: Optional[Dict] = None, write_kwargs: Optional[Dict] = None, exposed_type: Optional[str] = None, scope: Optional[Scope] = None, validity_period...
@@ -610,20 +610,20 @@ def _configure_parquet( ) -> "DataNodeConfig": """Configure a new Parquet data node configuration. - Parameters: + Arguments: id (str): The unique identifier of the new Parquet data node configuration. default_path (Optional[str]): The defaul...
taipy/core/config/data_node_config.py
26
Python
0.714
suggestion
195
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
if write_fct is not None: properties[cls._OPTIONAL_WRITE_FUNCTION_GENERIC_PROPERTY] = write_fct if read_fct_args is not None: properties[cls._OPTIONAL_READ_FUNCTION_ARGS_GENERIC_PROPERTY] = read_fct_args if write_fct_args is not None: properties[cls._OPTIONAL_...
```suggestion So it is designed to handle small data values like parameters, and it must be Json serializable. ```
if write_fct is not None: properties[cls._OPTIONAL_WRITE_FUNCTION_GENERIC_PROPERTY] = write_fct if read_fct_args is not None: properties[cls._OPTIONAL_READ_FUNCTION_ARGS_GENERIC_PROPERTY] = read_fct_args if write_fct_args is not None: properties[cls._OPTIONAL_...
@@ -758,12 +758,12 @@ def _configure_in_memory( ) -> "DataNodeConfig": """Configure a new *in-memory* data node configuration. - Parameters: + Arguments: id (str): The unique identifier of the new in_memory data node configuration. default_data (Optional[any]): Th...
taipy/core/config/data_node_config.py
26
Python
0.857
suggestion
132
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
The new *in-memory* data node configuration. """ # noqa: E501 if default_data is not None: properties[cls._OPTIONAL_DEFAULT_DATA_IN_MEMORY_PROPERTY] = default_data return cls.__configure(id, DataNodeConfig._STORAGE_TYPE_VALUE_IN_MEMORY, scope, validity_period, **propert...
```suggestion So it is designed to handle small data values like parameters, and it must be Json serializable. ```
The new *in-memory* data node configuration. """ # noqa: E501 if default_data is not None: properties[cls._OPTIONAL_DEFAULT_DATA_IN_MEMORY_PROPERTY] = default_data return cls.__configure(id, DataNodeConfig._STORAGE_TYPE_VALUE_IN_MEMORY, scope, validity_period, **propert...
@@ -794,13 +794,13 @@ def _configure_pickle( ) -> "DataNodeConfig": """Configure a new pickle data node configuration. - Parameters: + Arguments: id (str): The unique identifier of the new pickle data node configuration. default_path (Optional[str]): The path of t...
taipy/core/config/data_node_config.py
26
Python
0.857
suggestion
132
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
from ..exceptions.exceptions import UnknownCompressionAlgorithm, UnknownParquetEngine from ..job.job_id import JobId from ._file_datanode_mixin import _FileDataNodeMixin from ._tabular_datanode_mixin import _TabularDataNodeMixin from .data_node import DataNode from .data_node_id import DataNodeId, Edit class ParquetD...
```suggestion - *read_kwargs* (`Optional[dict]`): Additional parameters passed to the ```
from ..exceptions.exceptions import UnknownCompressionAlgorithm, UnknownParquetEngine from ..job.job_id import JobId from ._file_datanode_mixin import _FileDataNodeMixin from ._tabular_datanode_mixin import _TabularDataNodeMixin from .data_node import DataNode from .data_node_id import DataNodeId, Edit class ParquetD...
@@ -45,14 +45,14 @@ class ParquetDataNode(DataNode, _FileDataNodeMixin, _TabularDataNodeMixin): - *compression* (`Optional[str]`): Name of the compression to use. Possible values are *"snappy"*, *"gzip"*, *"brotli"*, or *"none"* (no compression).<br/> The default value is *"snappy"*. - - *read...
taipy/core/data/parquet.py
26
Python
0.571
suggestion
95
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
from .data_node import DataNode from .data_node_id import DataNodeId, Edit class ParquetDataNode(DataNode, _FileDataNodeMixin, _TabularDataNodeMixin): """Data Node stored as a Parquet file. The *properties* attribute can contain the following optional entries: - *default_path* (`str`): The default path ...
```suggestion The parameters in *"read_kwargs"* have a **higher precedence** than the top-level parameters which are also passed to Pandas. - *write_kwargs* (`Optional[dict]`): Additional parameters passed to the ```
from .data_node import DataNode from .data_node_id import DataNodeId, Edit class ParquetDataNode(DataNode, _FileDataNodeMixin, _TabularDataNodeMixin): """Data Node stored as a Parquet file. The *properties* attribute can contain the following optional entries: - *default_path* (`str`): The default path ...
@@ -45,14 +45,14 @@ class ParquetDataNode(DataNode, _FileDataNodeMixin, _TabularDataNodeMixin): - *compression* (`Optional[str]`): Name of the compression to use. Possible values are *"snappy"*, *"gzip"*, *"brotli"*, or *"none"* (no compression).<br/> The default value is *"snappy"*. - - *read...
taipy/core/data/parquet.py
26
Python
0.786
suggestion
240
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
class ParquetDataNode(DataNode, _FileDataNodeMixin, _TabularDataNodeMixin): """Data Node stored as a Parquet file. The *properties* attribute can contain the following optional entries: - *default_path* (`str`): The default path of the Parquet file used at the instantiation of the data node. ...
```suggestion The parameters in *"write_kwargs"* have a **higher precedence** than the top-level parameters which are also passed to Pandas. ```
class ParquetDataNode(DataNode, _FileDataNodeMixin, _TabularDataNodeMixin): """Data Node stored as a Parquet file. The *properties* attribute can contain the following optional entries: - *default_path* (`str`): The default path of the Parquet file used at the instantiation of the data node. ...
@@ -45,14 +45,14 @@ class ParquetDataNode(DataNode, _FileDataNodeMixin, _TabularDataNodeMixin): - *compression* (`Optional[str]`): Name of the compression to use. Possible values are *"snappy"*, *"gzip"*, *"brotli"*, or *"none"* (no compression).<br/> The default value is *"snappy"*. - - *read...
taipy/core/data/parquet.py
26
Python
0.714
suggestion
163
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
def name(self, val) -> None: self.properties["name"] = val def has_tag(self, tag: str) -> bool: """Indicate if the scenario has a given tag. Arguments: tag (str): The tag to search among the set of scenario's tags. Returns: True if the scenario has the ...
```suggestion params (Optional[List[Any]]): The parameters to be passed to the _callback_. ```
def name(self, val) -> None: self.properties["name"] = val def has_tag(self, tag: str) -> bool: """Indicate if the scenario has a given tag. Arguments: tag (str): The tag to search among the set of scenario's tags. Returns: True if the scenario has the ...
@@ -358,10 +358,10 @@ def subscribe(self, callback: Callable[[Scenario, Job], None], params: Optional[ Note: Notification will be available only for jobs created after this subscription. - Parameters: + Arguments: callback (Callable[[Scenario^, Job^], None]): The calla...
taipy/core/scenario/scenario.py
26
Python
0.714
suggestion
108
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
def subscribe(self, callback: Callable[[Scenario, Job], None], params: Optional[List[Any]] = None) -> None: """Subscribe a function to be called on `Job^` status change. The subscription is applied to all jobs created from the scenario's execution. Note: Notification will be av...
```suggestion params (Optional[List[Any]]): The parameters to be passed to the _callback_. ```
def subscribe(self, callback: Callable[[Scenario, Job], None], params: Optional[List[Any]] = None) -> None: """Subscribe a function to be called on `Job^` status change. The subscription is applied to all jobs created from the scenario's execution. Note: Notification will be av...
@@ -373,9 +373,9 @@ def unsubscribe(self, callback: Callable[[Scenario, Job], None], params: Optiona Note: The function will continue to be called for ongoing jobs. - Parameters: + Arguments: callback (Callable[[Scenario^, Job^], None]): The callable function to unsubs...
taipy/core/scenario/scenario.py
26
Python
0.714
suggestion
108
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
Returns: The dictionary of all parent entities. They are grouped by their type (Scenario^, Sequences^, or tasks^) so each key corresponds to a level of the parents and the value is a set of the parent entities. An empty dictionary is returned if the e...
```suggestion params (Optional[List[Any]]): The parameters to be passed to the _callback_. ```
Returns: The dictionary of all parent entities. They are grouped by their type (Scenario^, Sequences^, or tasks^) so each key corresponds to a level of the parents and the value is a set of the parent entities. An empty dictionary is returned if the e...
@@ -264,10 +264,10 @@ def subscribe( Note: Notification will be available only for jobs created after this subscription. - Parameters: + Arguments: callback (Callable[[Sequence^, Job^], None]): The callable function to be called on status change. - ...
taipy/core/sequence/sequence.py
26
Python
0.714
suggestion
108
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
params: Optional[List[Any]] = None, ) -> None: """Subscribe a function to be called on `Job^` status change. The subscription is applied to all jobs created from the sequence's execution. Note: Notification will be available only for jobs created after this subscription....
```suggestion params (Optional[List[Any]]): The parameters to be passed to the _callback_. ```
params: Optional[List[Any]] = None, ) -> None: """Subscribe a function to be called on `Job^` status change. The subscription is applied to all jobs created from the sequence's execution. Note: Notification will be available only for jobs created after this subscription....
@@ -279,9 +279,9 @@ def unsubscribe(self, callback: Callable[[Sequence, Job], None], params: Optiona Note: The function will continue to be called for ongoing jobs. - Parameters: + Arguments: callback (Callable[[Sequence^, Job^], None]): The callable function to unsubs...
taipy/core/sequence/sequence.py
26
Python
0.714
suggestion
108
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
Raises: InsufficientScenarioToCompare^: Raised when only one or no scenario for comparison is provided. NonExistingComparator^: Raised when the scenario comparator does not exist. DifferentScenarioConfigs^: Raised when the provided scenarios do not share the same scen...
```suggestion params (Optional[List[Any]]): The parameters to be passed to the _callback_. ```
Raises: InsufficientScenarioToCompare^: Raised when only one or no scenario for comparison is provided. NonExistingComparator^: Raised when the scenario comparator does not exist. DifferentScenarioConfigs^: Raised when the provided scenarios do not share the same scen...
@@ -685,10 +685,10 @@ def subscribe_scenario( The subscription is applied to all jobs created for the execution of _scenario_. If no scenario is provided, the subscription applies to all scenarios. - Parameters: + Arguments: callback (Callable[[Scenario^, Job^], None]): The function to be cal...
taipy/core/taipy.py
26
Python
0.714
suggestion
104
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
If no scenario is provided, the subscription applies to all scenarios. Arguments: callback (Callable[[Scenario^, Job^], None]): The function to be called on status change. params (Optional[List[Any]]): The arguments to be passed to the _callback_. scenario (Optional[Scenario...
```suggestion params (Optional[List[Any]]): The parameters to be passed to the callback. ```
If no scenario is provided, the subscription applies to all scenarios. Arguments: callback (Callable[[Scenario^, Job^], None]): The function to be called on status change. params (Optional[List[Any]]): The parameters to be passed to the _callback_. scenario (Optional[Scenari...
@@ -706,9 +706,9 @@ def unsubscribe_scenario( If no scenario is provided, the subscription is removed for all scenarios. - Parameters: + Arguments: callback (Callable[[Scenario^, Job^], None]): The function to unsubscribe from. - params (Optional[List[Any]]): The parameters to be passed t...
taipy/core/taipy.py
26
Python
0.714
suggestion
102
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
If no scenario is provided, the subscription is removed for all scenarios. Arguments: callback (Callable[[Scenario^, Job^], None]): The function to unsubscribe from. params (Optional[List[Any]]): The arguments to be passed to the callback. scenario (Optional[Scenario]): The scenario to...
```suggestion params (Optional[List[Any]]): The parameters to be passed to the _callback_. ```
If no scenario is provided, the subscription is removed for all scenarios. Arguments: callback (Callable[[Scenario^, Job^], None]): The function to unsubscribe from. params (Optional[List[Any]]): The parameters to be passed to the callback. scenario (Optional[Scenario]): The scenario t...
@@ -725,10 +725,10 @@ def subscribe_sequence( The subscription is applied to all jobs created for the execution of _sequence_. - Parameters: + Arguments: callback (Callable[[Sequence^, Job^], None]): The callable function to be called on status change. - params (Optional[List...
taipy/core/taipy.py
26
Python
0.714
suggestion
104
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
"""Subscribe a function to be called on job status change. The subscription is applied to all jobs created for the execution of _sequence_. Arguments: callback (Callable[[Sequence^, Job^], None]): The callable function to be called on status change. params (Optional[List[Any]])...
```suggestion params (Optional[List[Any]]): The parameters to be passed to the _callback_. ```
"""Subscribe a function to be called on job status change. The subscription is applied to all jobs created for the execution of _sequence_. Arguments: callback (Callable[[Sequence^, Job^], None]): The callable function to be called on status change. params (Optional[List[Any]])...
@@ -743,10 +743,10 @@ def unsubscribe_sequence( ) -> None: """Unsubscribe a function that is called when the status of a Job changes. - Parameters: + Arguments: callback (Callable[[Sequence^, Job^], None]): The callable function to be called on status change. - params (Optiona...
taipy/core/taipy.py
26
Python
0.714
suggestion
104
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing p...
```suggestion """Hold a user function that will be executed, its parameters, and the results. ```
# http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing p...
@@ -28,7 +28,7 @@ class Task(_Entity, _Labeled): - """Hold a user function that will be executed, its parameters and the results. + """Hold a user function that will be executed, its arguments and the results.
taipy/core/task/task.py
26
Python
0.786
suggestion
103
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
- *state*: the `State^` instance of the caller. """ self.on_page_load: t.Optional[t.Callable] = None """This callback is invoked just before the page content is sent to the front-end. It defaults to the `on_page_load()` global function defined in the Python application....
```suggestion - *params* (Optional): the query parameters provided in the URL. ```
- *state*: the `State^` instance of the caller. """ self.on_page_load: t.Optional[t.Callable] = None """This callback is invoked just before the page content is sent to the front-end. It defaults to the `on_page_load()` global function defined in the Python application....
@@ -308,7 +308,7 @@ def __init__( - *state*: the `State^` instance of the caller. - *page_name*: the name of the page the user is navigating to. - - *params* (Optional): the query parameters provided in the URL. + - *params* (Optional): the query arguments provided in the URL.
taipy/gui/gui.py
26
Python
0.571
suggestion
92
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
"""The function that is called when the status page is shown. It defaults to the `on_status()` global function defined in the Python application. If there is no such function, status page content shows only the status of the server.<br/> The signature of the *on_status* callbac...
```suggestion - *parameters*: An optional dictionary as defined in the `get_user_content_url()^` call. ```
"""The function that is called when the status page is shown. It defaults to the `on_status()` global function defined in the Python application. If there is no such function, status page content shows only the status of the server.<br/> The signature of the *on_status* callbac...
@@ -352,10 +352,10 @@ def __init__( - *state*: the `State^` instance of the caller. - *path*: the path provided to the `get_user_content_url()^` to build the URL. - - *parameters*: An optional dictionary as defined in the `get_user_content_url()^` call. + - *arguments*: An optional dic...
taipy/gui/gui.py
26
Python
0.786
suggestion
116
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
application. If there is no such function, status page content shows only the status of the server.<br/> The signature of the *on_status* callback function must be: - *state*: the `State^` instance of the caller. It must return raw and valid HTML content as a string. "...
```suggestion and the parameters provided in the call to `get_user_content_url()^`. ```
application. If there is no such function, status page content shows only the status of the server.<br/> The signature of the *on_status* callback function must be: - *state*: the `State^` instance of the caller. It must return raw and valid HTML content as a string. "...
@@ -352,10 +352,10 @@ def __init__( - *state*: the `State^` instance of the caller. - *path*: the path provided to the `get_user_content_url()^` to build the URL. - - *parameters*: An optional dictionary as defined in the `get_user_content_url()^` call. + - *arguments*: An optional dic...
taipy/gui/gui.py
26
Python
0.643
suggestion
97
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
f"Gui.invoke_callback(): Exception raised in {_function_name(callback)}", e, ) finally: if this_sid: request.sid = this_sid # type: ignore[attr-defined] return None def broadcast_callback( self, cal...
```suggestion The other parameters should reflect the ones provided in the *args* collection. args: The parameters to send to *callback*, if any. ```
f"Gui.invoke_callback(): Exception raised in {_function_name(callback)}", e, ) finally: if this_sid: request.sid = this_sid # type: ignore[attr-defined] return None def broadcast_callback( self, cal...
@@ -1604,8 +1604,8 @@ def broadcast_callback( callback: The user-defined function to be invoked.<br/> The first parameter of this function must be a `State^` object representing the client for which it is invoked.<br/> - The other parameters should reflect t...
taipy/gui/gui.py
26
Python
0.786
suggestion
180
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
): """Download content to the client. Arguments: state (State^): The current user state as received in any callback. content: File path or file content. See below. name: File name for the content on the client browser (defaults to content name). on_action: Callback function (or ...
```suggestion This callback can use three optional parameters: ```
): """Download content to the client. Arguments: state (State^): The current user state as received in any callback. content: File path or file content. See below. name: File name for the content on the client browser (defaults to content name). on_action: Callback function (or ...
@@ -44,7 +44,7 @@ def download( - *on_action*: this callback is triggered when the transfer of the content is achieved.</br> In this function, you can perform any clean-up operation that could be required after the download is completed.<br/> - This callback can use three optiona...
taipy/gui/gui_actions.py
26
Python
0.643
suggestion
78
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
must be allowed again for the user. Arguments: state (State^): The current user state as received in any callback. """ if state and isinstance(state._gui, Gui): state._gui._resume_actions() else: _warn("'resume_actions()' must be called in the context of a callback.") def ...
```suggestion params: A dictionary of query parameters. ```
must be allowed again for the user. Arguments: state (State^): The current user state as received in any callback. """ if state and isinstance(state._gui, Gui): state._gui._resume_actions() else: _warn("'resume_actions()' must be called in the context of a callback.") def ...
@@ -165,7 +165,7 @@ def navigate( to: The name of the page to navigate to. This can be a page identifier (as created by `Gui.add_page()^` with no leading '/') or a URL.<br/> If omitted, the application navigates to the root page. - params: A dictionary of query parameters. + ...
taipy/gui/gui_actions.py
26
Python
0.571
suggestion
69
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
params: A dictionary of query arguments. tab: When navigating to a page that is not a known page, the page is opened in a tab identified by *tab* (as in [window.open](https://developer.mozilla.org/en-US/docs/Web/API/Window/open)).<br/> The default value creates a new tab for the ...
```suggestion These arguments are added as query parameters to the generated URL and converted into ```
params: A dictionary of query parameters. tab: When navigating to a page that is not a known page, the page is opened in a tab identified by *tab* (as in [window.open](https://developer.mozilla.org/en-US/docs/Web/API/Window/open)).<br/> The default value creates a new tab for the...
@@ -190,7 +190,7 @@ def get_user_content_url( state (State^): The current user state as received in any callback. path: An optional additional path to the URL. params: An optional dictionary sent to the *on_user_content* callback.<br/> - These arguments are added as query parameter...
taipy/gui/gui_actions.py
26
Python
0.714
suggestion
117
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
args (Optional[Sequence]): The remaining arguments, as a List or a Tuple. module_context (Optional[str]): the name of the module that will be used. """ if isinstance(gui, Gui): return gui.invoke_callback(state_id, callback, args, module_context) _warn("'invoke_callback()' must be cal...
```suggestion The other parameters should reflect the ones provided in the *args* collection. args: The parameters to send to *callback*, if any. ```
args (Optional[Sequence]): The remaining arguments, as a List or a Tuple. module_context (Optional[str]): the name of the module that will be used. """ if isinstance(gui, Gui): return gui.invoke_callback(state_id, callback, args, module_context) _warn("'invoke_callback()' must be cal...
@@ -308,8 +308,8 @@ def broadcast_callback( callback: The user-defined function to be invoked.<br/> The first parameter of this function must be a `State^` object representing the client for which it is invoked.<br/> - The other parameters should reflect the ones provided i...
taipy/gui/gui_actions.py
26
Python
0.786
suggestion
172
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
) if not flask_log: log = logging.getLogger("werkzeug") log.disabled = True if not is_running_from_reloader(): _TaipyLogger._get_logger().info(f" * Server starting on http://{host_value}:{port}") else: _TaipyLogger._get_...
```suggestion # flask-socketio specific conditions for 'allow_unsafe_werkzeug' parameters to be popped out of kwargs ```
) if not flask_log: log = logging.getLogger("werkzeug") log.disabled = True if not is_running_from_reloader(): _TaipyLogger._get_logger().info(f" * Server starting on http://{host_value}:{port}") else: _TaipyLogger._get_...
@@ -357,7 +357,7 @@ def run( } if self.__ssl_context is not None: run_config["ssl_context"] = self.__ssl_context - # flask-socketio specific conditions for 'allow_unsafe_werkzeug' parameters to be popped out of kwargs + # flask-socketio specific conditions for 'allow_unsafe_...
taipy/gui/server.py
26
Python
0.714
suggestion
130
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed under t...
```suggestion A Flask application is instantiated and configured using three parameters from the global ```
# # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software distributed under t...
@@ -24,13 +24,13 @@ def __init__(self) -> None: """ Initialize a REST API server. - A Flask application is instantiated and configured using three parameters from the global + A Flask application is instantiated and configured using three arguments from the global
taipy/rest/rest.py
26
Python
0.714
suggestion
117
47
47
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. from fla...
```suggestion However, editing these parameters is only recommended for advanced users. Indeed, the default behavior of the ```
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. from fla...
@@ -24,13 +24,13 @@ def __init__(self) -> None: """ Initialize a REST API server. - A Flask application is instantiated and configured using three parameters from the global + A Flask application is instantiated and configured using three arguments from the global config. ...
taipy/rest/rest.py
26
Python
0.786
suggestion
137
41
41
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
id: str, default_path: Optional[str] = None, engine: Optional[str] = None, compression: Optional[str] = None, read_kwargs: Optional[Dict] = None, write_kwargs: Optional[Dict] = None, exposed_type: Optional[str] = None, scope: Optional[Scope] = None, ...
```suggestion The parameters in *read_kwargs* and *write_kwargs* have a **higher precedence** ```
id: str, default_path: Optional[str] = None, engine: Optional[str] = None, compression: Optional[str] = None, read_kwargs: Optional[Dict] = None, write_kwargs: Optional[Dict] = None, exposed_type: Optional[str] = None, scope: Optional[Scope] = None, ...
@@ -508,8 +508,8 @@ class Config: function. write_kwargs (Optional[dict]): Additional parameters passed to the `pandas.DataFrame.write_parquet()` function.<br/> - The parameters in *read_kwargs* and *write_kwargs* have a **higher precedence** than the - ...
taipy/common/config/config.pyi
26
Python
0.714
suggestion
115
51
51
false
Refactor terminology: Updated 'Parameters' and 'Args' to 'Arguments' for consistency across the codebase.
2,046
Avaiga/taipy
12,680
Python
jrobinAV
DevyManish
# specific language governing permissions and limitations under the License. # ----------------------------------------------------------------------------------------- # To execute this script, make sure that the taipy-gui package is installed in your # Python environment and run: # python <script> # -------------...
I don't think you need min and max: values are based on the dict keys.
# specific language governing permissions and limitations under the License. # ----------------------------------------------------------------------------------------- # To execute this script, make sure that the taipy-gui package is installed in your # Python environment and run: # python <script> # -------------...
@@ -0,0 +1,41 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required b...
doc/gui/examples/controls/slider_labels_dictionary.py
26
Python
0.214
suggestion
70
33
30
false
Add Example for Slider Labels in Taipy GUI
2,077
Avaiga/taipy
12,680
Python
FabienLelaquais
JeevaRamanathan
# Copyright 2021-2024 Avaiga Private Limited # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
```suggestion labels = { 0: "One", 1: "Two", 2: "Three", 3: "Four", 4: "Five", 5: "Six", ``` really showing the added value of key/value pairs.
# Copyright 2021-2024 Avaiga Private Limited # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
@@ -0,0 +1,41 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required b...
doc/gui/examples/controls/slider_labels_dictionary.py
19
Python
0.714
suggestion
178
42
39
false
Add Example for Slider Labels in Taipy GUI
2,077
Avaiga/taipy
12,680
Python
FabienLelaquais
JeevaRamanathan
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # ------...
```suggestion ``` This line is useless: that would be the tab's title.
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # ------...
@@ -0,0 +1,41 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required b...
doc/gui/examples/controls/slider_labels_dictionary.py
26
Python
0.643
suggestion
72
35
32
false
Add Example for Slider Labels in Taipy GUI
2,077
Avaiga/taipy
12,680
Python
FabienLelaquais
JeevaRamanathan
# specific language governing permissions and limitations under the License. # ----------------------------------------------------------------------------------------- # To execute this script, make sure that the taipy-gui package is installed in your # Python environment and run: # python <script> # -------------...
```suggestion <|{value}|slider|labels={labels}|> ```
# specific language governing permissions and limitations under the License. # ----------------------------------------------------------------------------------------- # To execute this script, make sure that the taipy-gui package is installed in your # Python environment and run: # python <script> # -------------...
@@ -0,0 +1,41 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required b...
doc/gui/examples/controls/slider_labels_dictionary.py
26
Python
0.571
suggestion
54
33
30
false
Add Example for Slider Labels in Taipy GUI
2,077
Avaiga/taipy
12,680
Python
FabienLelaquais
JeevaRamanathan
# # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # ----...
as @FabienLelaquais mentioned, can you remove min and max ? and change the labels dictionary to spread from 0 to 100 ?
# # Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the # specific language governing permissions and limitations under the License. # ----...
@@ -0,0 +1,38 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required b...
doc/gui/examples/controls/slider_labels_dictionary.py
26
Python
0.429
question
119
33
33
false
Add Example for Slider Labels in Taipy GUI
2,077
Avaiga/taipy
12,680
Python
FredLL-Avaiga
JeevaRamanathan
return ( <Tooltip title={hover || ""}> <Paper className={`${className} ${getComponentClassName(props.children)}`} sx={boxSx} id={id}> <Grid container rowSpacing={2} sx={gridSx} ref={scrollDivRef}> {rows.length && !rows[0] ? ( <Grid cla...
image={columns[3] && columns[3] != "_tp_index" ? `${row[columns[3]]}` : undefined}
URL.revokeObjectURL(objectURL); } }; }, [objectURLs]); const loadOlder = useCallback( (evt: MouseEvent<HTMLElement>) => { const { start } = evt.currentTarget.dataset; if (start) { loadMoreItems(parseInt(start)); } ...
@@ -424,6 +463,7 @@ const Chat = (props: ChatProps) => { senderId={senderId} message={`${row[columns[1]]}`} name={columns[2] ? `${row[columns[2]]}` : "Unknown"} + image={row[columns[3]] ? `$...
frontend/taipy-gui/src/components/Taipy/Chat.tsx
26
TypeScript
0.5
suggestion
84
51
51
false
Implemented image upload on Chat
2,078
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Satoshi-Sh
await userEvent.click(elt); await userEvent.keyboard("new message"); await userEvent.click(getByRole("button",{ name: /send message/i })) expect(dispatch).toHaveBeenCalledWith({ type: "SEND_ACTION_ACTION", name: "", context: undefined, payl...
create before test and reset after test
await userEvent.click(elt); await userEvent.keyboard("new message"); await userEvent.click(getByRole("button",{ name: /send message/i })) expect(dispatch).toHaveBeenCalledWith({ type: "SEND_ACTION_ACTION", name: "", context: undefined, payl...
@@ -123,15 +123,61 @@ describe("Chat Component", () => { const elt = getByLabelText("message (taipy)"); await userEvent.click(elt); await userEvent.keyboard("new message"); - await userEvent.click(getByRole("button")) + await userEvent.click(getByRole("button",{ name: /send mess...
frontend/taipy-gui/src/components/Taipy/Chat.spec.tsx
26
TypeScript
0.071
suggestion
40
51
51
false
Implemented image upload on Chat
2,078
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Satoshi-Sh
*/ import React, { useMemo, useCallback, KeyboardEvent, MouseEvent, useState, useRef, useEffect, ReactNode, lazy, } from "react"; import { SxProps, Theme, darken, lighten } from "@mui/material/styles"; import Avatar from "@mui/material/Avatar"; import Box from "@mui/material/Box"; ...
Coding rules: separate imports for better tree shaking
*/ import React, { useMemo, useCallback, KeyboardEvent, MouseEvent, useState, useRef, useEffect, ReactNode, lazy, } from "react"; import { SxProps, Theme, darken, lighten } from "@mui/material/styles"; import Avatar from "@mui/material/Avatar"; import Box from "@mui/material/Box"; ...
@@ -34,7 +34,7 @@ import Paper from "@mui/material/Paper"; import Popper from "@mui/material/Popper"; import TextField from "@mui/material/TextField"; import Tooltip from "@mui/material/Tooltip"; -import Send from "@mui/icons-material/Send"; +import {Send, AttachFile} from "@mui/icons-material";
frontend/taipy-gui/src/components/Taipy/Chat.tsx
26
TypeScript
0.286
suggestion
54
51
51
false
Implemented image upload on Chat
2,078
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Satoshi-Sh
attributes=attrs, ) .set_value_and_default(with_update=False) .set_attributes( [ ("on_action", PropertyType.function), ("active", PropertyType.dynamic_boolean, True), ("hover_text", PropertyType.dynamic_string), ...
50MB seems a lot? I'd say 1MB seems right.
attributes=attrs, ) .set_value_and_default(with_update=False) .set_attributes( [ ("on_action", PropertyType.function), ("active", PropertyType.dynamic_boolean, True), ("hover_text", PropertyType.dynamic_string), ...
@@ -99,6 +99,7 @@ class _Factory: ("sender_id",), ("height",), ("page_size", PropertyType.number, 50), + ("max_file_size", PropertyType.number, 50 * 1024 * 1024),
taipy/gui/_renderers/factory.py
26
Python
0.071
suggestion
42
51
51
false
Implemented image upload on Chat
2,078
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Satoshi-Sh
? val : val.toLowerCase() : val : colType === "number" ? parseFloat(val) : colType === "boolean" ? val === "1" ...
I would set it to false by default. What do you think @FabienLelaquais ?
: colType === "boolean" ? val === "1" : colType === "date" ? getDateTime(val) : val : val, type: colType, matchCase: !!match...
@@ -126,44 +139,56 @@ const FilterRow = (props: FilterRowProps) => { const [colId, setColId] = useState<string>(""); const [action, setAction] = useState<string>(""); const [val, setVal] = useState<string>(""); + const [matchCase, setMatchCase] = useState<boolean>(true); // Case-sensitivity state
frontend/taipy-gui/src/components/Taipy/TableFilter.tsx
26
TypeScript
0.214
question
73
51
51
false
#426 case insensitive filtering
2,087
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Rishi-0007
const [matchCase, setMatchCase] = useState<boolean>(true); // Case-sensitivity state const [enableCheck, setEnableCheck] = useState(false); const [enableDel, setEnableDel] = useState(false); // Function to handle case-sensitivity toggle const toggleMatchCase = () => setMatchCase(!matchCase); c...
no need for that the comparison is done on the backend
// Function to handle case-sensitivity toggle const toggleMatchCase = useCallback(() => { setMatchCase((prev) => !prev); }, []); const onColSelect = useCallback( (e: SelectChangeEvent<string>) => { setColId(e.target.value); setEnableCheck(!!getFilterDesc(columns,...
@@ -126,44 +139,56 @@ const FilterRow = (props: FilterRowProps) => { const [colId, setColId] = useState<string>(""); const [action, setAction] = useState<string>(""); const [val, setVal] = useState<string>(""); + const [matchCase, setMatchCase] = useState<boolean>(true); // Case-sensitivity state ...
frontend/taipy-gui/src/components/Taipy/TableFilter.tsx
26
TypeScript
0.214
suggestion
54
51
51
false
#426 case insensitive filtering
2,087
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Rishi-0007
// Function to handle case-sensitivity toggle const toggleMatchCase = () => setMatchCase(!matchCase); const onColSelect = useCallback( (e: SelectChangeEvent<string>) => { setColId(e.target.value); setEnableCheck(!!getFilterDesc(columns, e.target.value, action, val, matchCase...
no need for the new dependency
const onColSelect = useCallback( (e: SelectChangeEvent<string>) => { setColId(e.target.value); setEnableCheck(!!getFilterDesc(columns, e.target.value, action, val)); }, [columns, action, val] ); const onActSelect = useCallback( (e: SelectChangeEvent<...
@@ -126,44 +139,56 @@ const FilterRow = (props: FilterRowProps) => { const [colId, setColId] = useState<string>(""); const [action, setAction] = useState<string>(""); const [val, setVal] = useState<string>(""); + const [matchCase, setMatchCase] = useState<boolean>(true); // Case-sensitivity state ...
frontend/taipy-gui/src/components/Taipy/TableFilter.tsx
26
TypeScript
0.071
suggestion
30
51
51
false
#426 case insensitive filtering
2,087
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Rishi-0007
const { idx, setFilter, columns, colsOrder, filter } = props; const [colId, setColId] = useState<string>(""); const [action, setAction] = useState<string>(""); const [val, setVal] = useState<string>(""); const [matchCase, setMatchCase] = useState<boolean>(true); // Case-sensitivity state const ...
no need for the new dependency
const [val, setVal] = useState<string>(""); const [matchCase, setMatchCase] = useState<boolean>(false); const [enableCheck, setEnableCheck] = useState(false); const [enableDel, setEnableDel] = useState(false); // Function to handle case-sensitivity toggle const toggleMatchCase = useCallback(() ...
@@ -126,44 +139,56 @@ const FilterRow = (props: FilterRowProps) => { const [colId, setColId] = useState<string>(""); const [action, setAction] = useState<string>(""); const [val, setVal] = useState<string>(""); + const [matchCase, setMatchCase] = useState<boolean>(true); // Case-sensitivity state ...
frontend/taipy-gui/src/components/Taipy/TableFilter.tsx
26
TypeScript
0.071
suggestion
32
51
51
false
#426 case insensitive filtering
2,087
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Rishi-0007
} as FilterDesc; } catch (e) { console.info("could not parse value ", val, e); } } }; const FilterRow = (props: FilterRowProps) => { const { idx, setFilter, columns, colsOrder, filter } = props; const [colId, setColId] = useState<string>(""); const [action, setA...
no need for the new dependency
} }; const FilterRow = (props: FilterRowProps) => { const { idx, setFilter, columns, colsOrder, filter } = props; const [colId, setColId] = useState<string>(""); const [action, setAction] = useState<string>(""); const [val, setVal] = useState<string>(""); const [matchCase, setMatchCase] = useS...
@@ -126,44 +139,56 @@ const FilterRow = (props: FilterRowProps) => { const [colId, setColId] = useState<string>(""); const [action, setAction] = useState<string>(""); const [val, setVal] = useState<string>(""); + const [matchCase, setMatchCase] = useState<boolean>(true); // Case-sensitivity state ...
frontend/taipy-gui/src/components/Taipy/TableFilter.tsx
26
TypeScript
0.071
suggestion
30
51
51
false
#426 case insensitive filtering
2,087
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Rishi-0007
onChange={onValueAutoComp} renderInput={(params) => ( <TextField {...params} className="MuiAutocomplete-inputRootDense" label={`${val ? "" : "Empty ...
don't like the data-testid give it a classname
label={`${val ? "" : "Empty "}String`} margin="dense" /> )} sx={autocompleteSx} /> ) : ( <TextField ...
@@ -283,6 +310,17 @@ const FilterRow = (props: FilterRowProps) => { /> )} </Grid> + + {/* Case Sensitivity Toggle */} + <Grid size={3}> + <FormControlLabel + control={ + <Switch checked={mat...
frontend/taipy-gui/src/components/Taipy/TableFilter.tsx
26
TypeScript
0.071
suggestion
47
51
51
false
#426 case insensitive filtering
2,087
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Rishi-0007
columns.append(_PandasDataAccessor.__INDEX_COL) fullrowcount = len(df) # filtering filters = payload.get("filters") if isinstance(filters, list) and len(filters) > 0: query = "" vars = [] for fd in filters: col = fd.get...
we want this to work for **any** action
columns.append(_PandasDataAccessor.__INDEX_COL) fullrowcount = len(df) # filtering filters = payload.get("filters") if isinstance(filters, list) and len(filters) > 0: query = "" vars = [] for fd in filters: col = fd.get...
@@ -267,12 +267,22 @@ def __get_data( # noqa: C901 col = fd.get("col") val = fd.get("value") action = fd.get("action") + match_case = fd.get("matchCase", True) # Retrieve matchCase from the frontend payload + if isinsta...
taipy/gui/data/pandas_data_accessor.py
26
Python
0.071
suggestion
39
51
51
false
#426 case insensitive filtering
2,087
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Rishi-0007
/> ) : ( <TextField value={val || ""} onChange={onValueChange} label={`${val ? "" : "Empty "}String`} margin="dense" /> )} ...
I would add the icon only as an end Adornment to the AutoComplete and TextField within a MUi switch component ```jsx <TextField ... slotProps={{ input: { endAdornment: ( <Switch ...
sx={autocompleteSx} /> ) : ( <TextField value={val || ""} onChange={onValueChange} label={`${val ? "" : "Empty "}String`} margin="dense" ...
@@ -283,6 +304,17 @@ const FilterRow = (props: FilterRowProps) => { /> )} </Grid> +
frontend/taipy-gui/src/components/Taipy/TableFilter.tsx
26
TypeScript
0.857
security
826
51
51
false
#426 case insensitive filtering
2,087
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Rishi-0007
columns = [c[len(col_prefix) :] if c.startswith(col_prefix) else c for c in columns] ret_payload = {"pagekey": payload.get("pagekey", "unknown page")} paged = not payload.get("alldata", False) is_copied = False orig_df = df # add index if not chart if paged: ...
Why did you remove these lines about date col ?
columns = [c[len(col_prefix) :] if c.startswith(col_prefix) else c for c in columns] ret_payload = {"pagekey": payload.get("pagekey", "unknown page")} paged = not payload.get("alldata", False) is_copied = False orig_df = df # add index if not chart if paged: ...
@@ -267,12 +267,21 @@ def __get_data( # noqa: C901 col = fd.get("col") val = fd.get("value") action = fd.get("action") + match_case = fd.get("matchCase", False) + if isinstance(val, str): - if self.__is_date_column(t....
taipy/gui/data/pandas_data_accessor.py
26
Python
0.143
question
47
51
51
false
#426 case insensitive filtering
2,087
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Rishi-0007
is_copied = False orig_df = df # add index if not chart if paged: if _PandasDataAccessor.__INDEX_COL not in df.columns: is_copied = True df = df.assign(**{_PandasDataAccessor.__INDEX_COL: df.index}) if columns and _PandasDataAccess...
you're still not dealing with string comparison (not contains) and matchcase
is_copied = False orig_df = df # add index if not chart if paged: if _PandasDataAccessor.__INDEX_COL not in df.columns: is_copied = True df = df.assign(**{_PandasDataAccessor.__INDEX_COL: df.index}) if columns and _PandasDataAccess...
@@ -267,12 +267,21 @@ def __get_data( # noqa: C901 col = fd.get("col") val = fd.get("value") action = fd.get("action") + match_case = fd.get("matchCase", False) + if isinstance(val, str): - if self.__is_date_column(t....
taipy/gui/data/pandas_data_accessor.py
26
Python
0.214
suggestion
76
51
51
false
#426 case insensitive filtering
2,087
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Rishi-0007
paged = not payload.get("alldata", False) is_copied = False orig_df = df # add index if not chart if paged: if _PandasDataAccessor.__INDEX_COL not in df.columns: is_copied = True df = df.assign(**{_PandasDataAccessor.__INDEX_COL: df.in...
we should test is date column only if val is a string
paged = not payload.get("alldata", False) is_copied = False orig_df = df # add index if not chart if paged: if _PandasDataAccessor.__INDEX_COL not in df.columns: is_copied = True df = df.assign(**{_PandasDataAccessor.__INDEX_COL: df.in...
@@ -269,25 +269,46 @@ def __get_data( # noqa: C901 action = fd.get("action") match_case = fd.get("matchCase", False) - if isinstance(val, str): + # Handle date columns separately from query + if self.__is_date_column(t.cast(pd.DataFrame, ...
taipy/gui/data/pandas_data_accessor.py
26
Python
0.286
suggestion
53
51
51
false
#426 case insensitive filtering
2,087
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Rishi-0007
if isinstance(filters, list) and len(filters) > 0: query = "" vars = [] for fd in filters: col = fd.get("col") val = fd.get("value") action = fd.get("action") match_case = fd.get("matchCase", False) ...
please re-use code and do not duplicate
if isinstance(filters, list) and len(filters) > 0: query = "" vars = [] for fd in filters: col = fd.get("col") val = fd.get("value") action = fd.get("action") match_case = fd.get("matchCase", False) is not False ...
@@ -269,25 +269,46 @@ def __get_data( # noqa: C901 action = fd.get("action") match_case = fd.get("matchCase", False) - if isinstance(val, str): + # Handle date columns separately from query + if self.__is_date_column(t.cast(pd.DataFrame, ...
taipy/gui/data/pandas_data_accessor.py
26
Python
0.143
refactor
39
51
51
false
#426 case insensitive filtering
2,087
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Rishi-0007
paged = not payload.get("alldata", False) is_copied = False orig_df = df # add index if not chart if paged: if _PandasDataAccessor.__INDEX_COL not in df.columns: is_copied = True df = df.assign(**{_PandasDataAccessor.__INDEX_COL: df.in...
why do you change the previous code that was working ? We want to build a query and apply it once. the previous code ```py if isinstance(val, str): if self.__is_date_column(t.cast(pd.DataFrame, df), col): val = datetime.fromisoformat(val[:-1]) ...
paged = not payload.get("alldata", False) is_copied = False orig_df = df # add index if not chart if paged: if _PandasDataAccessor.__INDEX_COL not in df.columns: is_copied = True df = df.assign(**{_PandasDataAccessor.__INDEX_COL: df.in...
@@ -267,18 +267,47 @@ def __get_data( # noqa: C901 col = fd.get("col") val = fd.get("value") action = fd.get("action") - if isinstance(val, str): - if self.__is_date_column(t.cast(pd.DataFrame, df), col): - val ...
taipy/gui/data/pandas_data_accessor.py
26
Python
1
question
1,378
51
51
false
#426 case insensitive filtering
2,087
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Rishi-0007
import { SvgIcon, SvgIconProps } from "@mui/material"; export const MatchCase = (props: SvgIconProps) => ( <SvgIcon {...props} viewBox="0 0 16 16"> <g stroke="currentColor"> <path d="M20 14c0-1.5-.5-2-2-2h-2v-1c0-1 0-1-2-1v9h4c1.5 0 2-.53 2-2zm-8-2c0-1.5-.53-2-2-2H6c-1.5 0-2 .5-2 2v7h2v-3h4v3h2...
`import SvgIcon, { SvgIconProps } from "@mui/material/SvgIcon";` for better tree shaking
/* * Copyright 2021-2024 Avaiga Private Limited * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable l...
@@ -0,0 +1,9 @@ +import { SvgIcon, SvgIconProps } from "@mui/material";
frontend/taipy-gui/src/components/icons/MatchCase.tsx
1
TypeScript
0.429
suggestion
88
10
24
false
#426 case insensitive filtering
2,087
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Rishi-0007
*/ import React, { ChangeEvent, SyntheticEvent, useCallback, useEffect, useMemo, useRef, useState } from "react"; import Autocomplete from "@mui/material/Autocomplete"; import CheckIcon from "@mui/icons-material/Check"; import DeleteIcon from "@mui/icons-material/Delete"; import FilterListIcon from "@mui/icons-materi...
use current coding rules : specific import for better tree shaking ``` import FormControlLabel from "@mui/material/FormControlLabel"; import Switch from "@mui/material/Switch"; ```
*/ import React, { ChangeEvent, SyntheticEvent, useCallback, useEffect, useMemo, useRef, useState } from "react"; import Autocomplete from "@mui/material/Autocomplete"; import CheckIcon from "@mui/icons-material/Check"; import DeleteIcon from "@mui/icons-material/Delete"; import FilterListIcon from "@mui/icons-materi...
@@ -33,6 +33,9 @@ import { AdapterDateFns } from "@mui/x-date-pickers/AdapterDateFnsV3"; import { ColumnDesc, defaultDateFormat, getSortByIndex, iconInRowSx, FilterDesc } from "./tableUtils"; import { getDateTime, getTypeFromDf } from "../../utils"; import { getSuffixedClassNames } from "./utils"; +import SvgIcon fr...
frontend/taipy-gui/src/components/Taipy/TableFilter.tsx
26
TypeScript
0.786
suggestion
186
51
51
false
#426 case insensitive filtering
2,087
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Rishi-0007
">=": "after equal", ">": "after", }, } as Record<string, Record<string, string>>; const gridSx = { p: "0.5em", minWidth: "36rem" }; const autocompleteSx = { "& .MuiInputBase-root": { padding: "0" } }; const badgeSx = { "& .MuiBadge-badge": { height: "10px", minWidth: "10px", ...
remove this If we don't use it, it *is* an error ?
">=": "after equal", ">": "after", }, } as Record<string, Record<string, string>>; const gridSx = { p: "0.5em", minWidth: "36rem" }; const autocompleteSx = { "& .MuiInputBase-root": { padding: "0" } }; const badgeSx = { "& .MuiBadge-badge": { height: "10px", minWidth: "10px", ...
@@ -92,7 +94,14 @@ const getActionsByType = (colType?: string) => (colType && colType in actionsByType && actionsByType[colType]) || (colType === "any" ? { ...actionsByType.string, ...actionsByType.number } : actionsByType.string); -const getFilterDesc = (columns: Record<string, ColumnDesc>, colId?: string,...
frontend/taipy-gui/src/components/Taipy/TableFilter.tsx
26
TypeScript
0.429
refactor
53
51
51
false
#426 case insensitive filtering
2,087
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Rishi-0007
import typing as t from .. import Gui, State from ..utils import _MapDict class MockState(State): """A Mock implementation for `State`. TODO example of use: ```py def test_callback(): ms = MockState(Gui(""), a = 1) on_action(ms) # function to test assert ms.a == 2 ``` ...
```suggestion def get_gui(self) -> Gui: ```
import typing as t from .. import Gui, State from ..utils import _MapDict class MockState(State): """A Mock implementation for `State`. TODO example of use: ```py def test_callback(): ms = MockState(Gui(""), a = 1) on_action(ms) # function to test assert ms.a == 2 ``` ...
@@ -0,0 +1,62 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required b...
taipy/gui/mock/mock_state.py
26
Python
0.429
suggestion
49
51
51
false
Adding a mock State class that can be instantiated and queried while testing
2,101
Avaiga/taipy
12,680
Python
FabienLelaquais
FredLL-Avaiga
def __init__(self, gui: Gui, **kwargs) -> None: super().__setattr__(MockState.__VARS, {k: _MapDict(v) if isinstance(v, dict) else v for k, v in kwargs.items()}) self._gui = gui super().__init__() def get_gui(self) -> "Gui": return self._gui def __getattribute__(self, name:...
Doesn't this prevent MockState to be used as a context manager? The tests seems to respond no...
def __init__(self, gui: Gui, **kwargs) -> None: super().__setattr__(MockState.__VARS, {k: _MapDict(v) if isinstance(v, dict) else v for k, v in kwargs.items()}) self._gui = gui super().__init__() def get_gui(self) -> Gui: return self._gui def __getattribute__(self, name: s...
@@ -0,0 +1,62 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required b...
taipy/gui/mock/mock_state.py
26
Python
0.286
question
97
34
34
false
Adding a mock State class that can be instantiated and queried while testing
2,101
Avaiga/taipy
12,680
Python
FabienLelaquais
FredLL-Avaiga
id: str, default_path: Optional[str] = None, engine: Optional[str] = None, compression: Optional[str] = None, read_kwargs: Optional[Dict] = None, write_kwargs: Optional[Dict] = None, exposed_type: Optional[str] = None, scope: Optional[Scope] = None, ...
@FlorianJacta, I think this is not required. Maybe you changed it by mistake?
id: str, default_path: Optional[str] = None, engine: Optional[str] = None, compression: Optional[str] = None, read_kwargs: Optional[Dict] = None, write_kwargs: Optional[Dict] = None, exposed_type: Optional[str] = None, scope: Optional[Scope] = None, ...
@@ -508,8 +508,8 @@ class Config: function. write_kwargs (Optional[dict]): Additional parameters passed to the `pandas.DataFrame.write_parquet()` function.<br/> - The parameters in *read_kwargs* and *write_kwargs* have a **higher precedence** - ...
taipy/common/config/config.pyi
26
Python
0.286
question
77
51
51
false
Fix dead links in ReadMe
2,110
Avaiga/taipy
12,680
Python
rohitdash08
FlorianJacta
} } catch (error) { console.error(error); } }, [props.date, tz, withTime, max, min]); return ( <ErrorBoundary FallbackComponent={ErrorFallback}> <Tooltip title={hover || ""}> <Box id={id} className={`${className} ${getComponentClassNam...
apply the ternary operator (analogic ? ...) at the viewRenderers property level `viewRenderers={analogic ? analogicRenderers : undefined}` With analogicRenderers defined outside the component
if (min !== undefined) { setStartProps((p) => getProps(p, true, getDateTime(min, tz, withTime), withTime)); } if (max !== undefined) { setEndProps((p) => getProps(p, false, getDateTime(max, tz, withTime), withTime)); } } catch (err...
@@ -109,18 +115,38 @@ const DateSelector = (props: DateSelectorProps) => { <Box id={id} className={`${className} ${getComponentClassName(props.children)}`} sx={boxSx}> {editable ? ( withTime ? ( - <DateTimePicker - ...
frontend/taipy-gui/src/components/Taipy/DateSelector.tsx
26
TypeScript
0.643
suggestion
196
51
51
false
Analogic for date component
2,115
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Tryxns
updateVarName, [ start ? dateToString(newDate, withTime) : otherDate && dateToString(otherDate, withTime), start ...
outside the component ? ie before line 70
const newDate = getTimeZonedDate(v, tz, withTime); const otherDate = start ? dates[1] && getTimeZonedDate(dates[1], tz, withTime) : dates[0] && getTimeZonedDate(dates[0], tz, withTime); dispatch( ...
@@ -117,6 +119,11 @@ const DateRange = (props: DateRangeProps) => { const handleChangeStart = useCallback((v: Date | null) => handleChange(v, true), [handleChange]); const handleChangeEnd = useCallback((v: Date | null) => handleChange(v, false), [handleChange]); + const analogicRenderers = {
frontend/taipy-gui/src/components/Taipy/DateRange.tsx
26
TypeScript
0.071
suggestion
41
51
51
false
Analogic for daterange
2,116
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Tryxns
"metavar": "UPLOAD_FOLDER", "nargs": "?", "default": "", "const": "", "help": "The path to the folder where uploaded files from Taipy GUI will be stored.", }, } __DEBUG_ARGS: Dict[str, Dict] = { "--debug": {"dest": "taipy_debug", "help...
can we not use the same `dest` with action: `store_false` ?
"metavar": "UPLOAD_FOLDER", "nargs": "?", "default": "", "const": "", "help": "The path to the folder where uploaded files from Taipy GUI will be stored.", }, } __DEBUG_ARGS: Dict[str, Dict] = { "--debug": {"dest": "taipy_debug", "help...
@@ -81,21 +81,55 @@ class _GuiCLI(_AbstractCLI): "--no-reloader": {"dest": "taipy_no_reloader", "help": "No reload on code changes", "action": "store_true"}, } + __BROWSER_ARGS: Dict[str, Dict] = { + "--run-browser": { + "dest": "taipy_run_browser", + "help": "Open a new ...
taipy/gui/_gui_cli.py
26
Python
0.429
question
59
51
51
false
Add command line options for run_browser and dark_mode Gui.run() parameters
2,128
Avaiga/taipy
12,680
Python
FredLL-Avaiga
FabienLelaquais
"--debug": {"dest": "taipy_debug", "help": "Turn on debug", "action": "store_true"}, "--no-debug": {"dest": "taipy_no_debug", "help": "Turn off debug", "action": "store_true"}, } __RELOADER_ARGS: Dict[str, Dict] = { "--use-reloader": {"dest": "taipy_use_reloader", "help": "Auto reload o...
Maybe Apply dark mode and removing the 'the' is enough
"--debug": {"dest": "taipy_debug", "help": "Turn on debug", "action": "store_true"}, "--no-debug": {"dest": "taipy_no_debug", "help": "Turn off debug", "action": "store_true"}, } __RELOADER_ARGS: Dict[str, Dict] = { "--use-reloader": {"dest": "taipy_use_reloader", "help": "Auto reload o...
@@ -81,21 +81,55 @@ class _GuiCLI(_AbstractCLI): "--no-reloader": {"dest": "taipy_no_reloader", "help": "No reload on code changes", "action": "store_true"}, } + __BROWSER_ARGS: Dict[str, Dict] = { + "--run-browser": { + "dest": "taipy_run_browser", + "help": "Open a new ...
taipy/gui/_gui_cli.py
26
Python
0.214
suggestion
54
51
51
false
Add command line options for run_browser and dark_mode Gui.run() parameters
2,128
Avaiga/taipy
12,680
Python
dinhlongviolin1
FabienLelaquais
def __load_version_from_path(base_path: str) -> Version: """Load version.json file from base path.""" with open(os.path.join(base_path, "version.json")) as version_file: data = json.load(version_file) return Version(**data) def __write_version_to_path(base_path: str, version: Version) -> None...
These 2 consecutive prints look strange to me. Can you double-check?
def __load_version_from_path(base_path: str) -> Version: """Load version.json file from base path.""" with open(os.path.join(base_path, "version.json")) as version_file: data = json.load(version_file) return Version(**data) def __write_version_to_path(base_path: str, version: Version) -> None...
@@ -79,10 +79,12 @@ def __setup_dev_version(version: Version, _base_path: str, name: Optional[str] = name = f"{name}_VERSION" if name else "VERSION" print(f"{name}={version.dev_name}") # noqa: T201 - version.bump_ext_version() + print(f"NEW_{name}={version.dev_name}") # noqa: T201
tools/release/setup_version.py
26
Python
0.214
question
70
51
51
false
Modify Release Action to Bump development versions and create a PR
2,139
Avaiga/taipy
12,680
Python
jrobinAV
joaoandre-avaiga
name = f"{name}_VERSION" if name else "VERSION" print(f"{name}={version.name}") # noqa: T201 if __name__ == "__main__": paths = ( [sys.argv[1]] if sys.argv[1] != "ALL" else [ f"taipy{os.sep}common", f"taipy{os.sep}core", f"taipy{os.sep}rest", ...
It's not clear to me. Here is my understanding of the flow: - We dev release using the version in the version.json files. - We bump up the version and write the version.json files - We commit and push the changes If this is correct, I don't get why you changed the version before releasing.
print(f"{name}={version.name}") # noqa: T201 if __name__ == "__main__": paths = ( [sys.argv[1]] if sys.argv[1] != "ALL" else [ f"taipy{os.sep}common", f"taipy{os.sep}core", f"taipy{os.sep}rest", f"taipy{os.sep}gui", f"taipy{o...
@@ -119,6 +121,7 @@ def __setup_prod_version(version: Version, target_version: str, branch_name: str if _environment == "dev": __setup_dev_version(_version, _path, _name) + bump_ext_version(_version, _path)
tools/release/setup_version.py
26
Python
0.5
suggestion
305
30
28
false
Modify Release Action to Bump development versions and create a PR
2,139
Avaiga/taipy
12,680
Python
jrobinAV
joaoandre-avaiga
const className = useClassNames(props.libClassName, props.dynamicClassName, props.className); const baseLayout = useDynamicJsonProperty(props.layout, props.defaultLayout || "", emptyLayout); const hover = useDynamicProperty(props.hoverText, props.defaultHoverText, undefined); const theme = useTheme(); ...
we want to keep support of "none" case insensitive
const className = useClassNames(props.libClassName, props.dynamicClassName, props.className); const baseLayout = useDynamicJsonProperty(props.layout, props.defaultLayout || "", emptyLayout); const hover = useDynamicProperty(props.hoverText, props.defaultHoverText, undefined); const theme = useTheme(); ...
@@ -87,7 +87,7 @@ const Metric = (props: MetricProps) => { }, [props.colorMap, props.max]); const data = useMemo(() => { - const mode = props.type === "none" ? [] : ["gauge"]; + const mode = props.type === null [] : ["gauge"];
frontend/taipy-gui/src/components/Taipy/Metric.tsx
26
TypeScript
0.214
security
50
51
51
false
Metric: Add support for None
2,147
Avaiga/taipy
12,680
Python
FredLL-Avaiga
codingis4noobs2
const className = useClassNames(props.libClassName, props.dynamicClassName, props.className); const baseLayout = useDynamicJsonProperty(props.layout, props.defaultLayout || "", emptyLayout); const hover = useDynamicProperty(props.hoverText, props.defaultHoverText, undefined); const theme = useTheme(); ...
As I wrote, I'd like it to be compared in a case insensitive way
const className = useClassNames(props.libClassName, props.dynamicClassName, props.className); const baseLayout = useDynamicJsonProperty(props.layout, props.defaultLayout || "", emptyLayout); const hover = useDynamicProperty(props.hoverText, props.defaultHoverText, undefined); const theme = useTheme(); ...
@@ -87,7 +87,7 @@ const Metric = (props: MetricProps) => { }, [props.colorMap, props.max]); const data = useMemo(() => { - const mode = props.type === "none" ? [] : ["gauge"]; + const mode = props.type === "none" || props.type == null ? [] : ["gauge"];
frontend/taipy-gui/src/components/Taipy/Metric.tsx
26
TypeScript
0.214
security
64
51
51
false
Metric: Add support for None
2,147
Avaiga/taipy
12,680
Python
FredLL-Avaiga
codingis4noobs2
const className = useClassNames(props.libClassName, props.dynamicClassName, props.className); const baseLayout = useDynamicJsonProperty(props.layout, props.defaultLayout || "", emptyLayout); const hover = useDynamicProperty(props.hoverText, props.defaultHoverText, undefined); const theme = useTheme(); ...
what if props.type is undefined ?
const className = useClassNames(props.libClassName, props.dynamicClassName, props.className); const baseLayout = useDynamicJsonProperty(props.layout, props.defaultLayout || "", emptyLayout); const hover = useDynamicProperty(props.hoverText, props.defaultHoverText, undefined); const theme = useTheme(); ...
@@ -87,7 +87,7 @@ const Metric = (props: MetricProps) => { }, [props.colorMap, props.max]); const data = useMemo(() => { - const mode = props.type === "none" ? [] : ["gauge"]; + const mode = props.type == null || props.type.toLowerCase() === "none" ? [] : ["gauge"];
frontend/taipy-gui/src/components/Taipy/Metric.tsx
26
TypeScript
0.214
question
33
51
51
false
Metric: Add support for None
2,147
Avaiga/taipy
12,680
Python
FredLL-Avaiga
codingis4noobs2
const className = useClassNames(props.libClassName, props.dynamicClassName, props.className); const baseLayout = useDynamicJsonProperty(props.layout, props.defaultLayout || "", emptyLayout); const hover = useDynamicProperty(props.hoverText, props.defaultHoverText, undefined); const theme = useTheme(); ...
you need to declare type as string|null
const className = useClassNames(props.libClassName, props.dynamicClassName, props.className); const baseLayout = useDynamicJsonProperty(props.layout, props.defaultLayout || "", emptyLayout); const hover = useDynamicProperty(props.hoverText, props.defaultHoverText, undefined); const theme = useTheme(); ...
@@ -87,7 +87,7 @@ const Metric = (props: MetricProps) => { }, [props.colorMap, props.max]); const data = useMemo(() => { - const mode = props.type === "none" ? [] : ["gauge"]; + const mode = props.type == null || (typeof props.type === "string" && props.type.toLowerCase() === "none") ? [] : ["...
frontend/taipy-gui/src/components/Taipy/Metric.tsx
26
TypeScript
0.214
suggestion
39
51
51
false
Metric: Add support for None
2,147
Avaiga/taipy
12,680
Python
FredLL-Avaiga
codingis4noobs2
}); }); it("applies style correctly when height is undefined", async () => { const { container } = render(<Metric />); await waitFor(() => { const elt = container.querySelector(".js-plotly-plot"); expect(elt).toHaveStyle({ width: "100%", ...
I'd rather see None as it would be if the user specifies type=None in tgb
}); }); it("applies style correctly when height is undefined", async () => { const { container } = render(<Metric />); await waitFor(() => { const elt = container.querySelector(".js-plotly-plot"); expect(elt).toHaveStyle({ width: "100%", ...
@@ -286,8 +286,18 @@ describe("Metric Component", () => { }); }); - it("processes type prop correctly when type is none", async () => { - const { container } = render(<Metric type="none" />); + it("processes type prop correctly when type is none (string)", async () => { + const { co...
frontend/taipy-gui/src/components/Taipy/Metric.spec.tsx
26
TypeScript
0.429
suggestion
73
51
51
false
Metric: Add support for None
2,147
Avaiga/taipy
12,680
Python
FredLL-Avaiga
codingis4noobs2
control_type=control_type, element_name="Alert", attributes=attrs, ) .set_value_and_default(var_type=PropertyType.dynamic_string) .set_attributes( [ ("severity", PropertyType.dynamic_string), ("variant", PropertyType...
no need for these to be dynamic (string is enough)
control_type=control_type, element_name="Alert", attributes=attrs, ) .set_value_and_default(var_type=PropertyType.dynamic_string) .set_attributes( [ ("severity", PropertyType.dynamic_string), ("variant", PropertyType...
@@ -99,6 +99,8 @@ class _Factory: ("active", PropertyType.dynamic_boolean, True), ("hover_text", PropertyType.dynamic_string), ("width", PropertyType.string_or_number), + ("size", PropertyType.dynamic_string),
taipy/gui/_renderers/factory.py
26
Python
0.214
suggestion
50
51
51
false
added more mui classes for buttons
2,159
Avaiga/taipy
12,680
Python
FredLL-Avaiga
JeevaRamanathan
interface StatusDel extends StatusType { hidden?: boolean; id?: string; } interface StatusListProps extends TaipyBaseProps, TaipyHoverProps { value: Array<[string, string] | StatusType> | [string, string] | StatusType; defaultValue?: string; withoutClose?: boolean; withIcons?: boolean; cu...
How could this throw an exception except if this is not a string ? Better test the type and ignore if it is not a string
interface StatusDel extends StatusType { hidden?: boolean; id?: string; } interface StatusListProps extends TaipyBaseProps, TaipyHoverProps { value: Array<[string, string] | StatusType> | [string, string] | StatusType; defaultValue?: string; withoutClose?: boolean; withIcons?: boolean; cu...
@@ -95,6 +97,16 @@ const StatusList = (props: StatusListProps) => { const [opened, setOpened] = useState(false); const [multiple, setMultiple] = useState(false); const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null); + const content = useMemo(() => { + if (props.customIcon) { + ...
frontend/taipy-gui/src/components/Taipy/StatusList.tsx
26
TypeScript
0.571
question
121
51
51
false
feat: Status controls could have a way to have icons instead of the default letters
2,177
Avaiga/taipy
12,680
Python
FredLL-Avaiga
Vaibhav91one
# Initialize the set of visual elements for this extension library self.elements = { # A static element that displays its properties in a fraction "fraction": Element( "numerator", { "numerator": ElementProperty(PropertyType.num...
can comment this to show that it is the generated name from the python name
# Initialize the set of visual elements for this extension library self.elements = { # A static element that displays its properties in a fraction "fraction": Element( "numerator", { "numerator": ElementProperty(PropertyType.num...
@@ -33,6 +33,14 @@ def __init__(self) -> None: # element, exported as ExampleLabel in front-end/src/index.ts react_component="ExampleLabel", ), + "basic_table": Element( + "data", + { + "data": ElementProperty(Pro...
doc/gui/extension/example_library/example_library.py
26
Python
0.214
suggestion
75
51
51
false
Example for tabular data
2,184
Avaiga/taipy
12,680
Python
FredLL-Avaiga
namnguyen20999
# Initialize the set of visual elements for this extension library self.elements = { # A static element that displays its properties in a fraction "fraction": Element( "numerator", { "numerator": ElementProperty(PropertyType.num...
```suggestion # element, exported as GameTable in front-end/src/index.ts ```
# Initialize the set of visual elements for this extension library self.elements = { # A static element that displays its properties in a fraction "fraction": Element( "numerator", { "numerator": ElementProperty(PropertyType.num...
@@ -33,13 +33,14 @@ def __init__(self) -> None: # element, exported as ExampleLabel in front-end/src/index.ts react_component="ExampleLabel", ), - "basic_table": Element( + "game_table": Element( "data", { ...
doc/gui/extension/example_library/example_library.py
26
Python
0.571
suggestion
94
51
51
false
Example for tabular data
2,184
Avaiga/taipy
12,680
Python
FabienLelaquais
namnguyen20999
import pandas as pd from example_library import ExampleLibrary from taipy.gui import Gui chessboard = [ ["♖", "♘", "♗", "♕", "♔", "♗", "♘", "♖"], ["♙", "♙", "♙", "♙", "♙", "♙", "♙", "♙"], ["", "", "", "", "", "", "", ""], ["", "", "", "", "", "", "", ""], ["", "", "", "", "", "", "", ""], ["",...
```suggestion Gui(page, libraries=[ExampleLibrary()]).run(title="Chess Game") ```
# Copyright 2021-2024 Avaiga Private Limited # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
@@ -0,0 +1,37 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required b...
doc/gui/extension/table_chess_game.py
26
Python
0.571
suggestion
87
27
33
false
Example for tabular data
2,184
Avaiga/taipy
12,680
Python
FabienLelaquais
namnguyen20999
self.elements = { # A static element that displays its properties in a fraction "fraction": Element( "numerator", { "numerator": ElementProperty(PropertyType.number), "denominator": ElementProperty(PropertyType.numbe...
This line can be commented too
self.elements = { # A static element that displays its properties in a fraction "fraction": Element( "numerator", { "numerator": ElementProperty(PropertyType.number), "denominator": ElementProperty(PropertyType.numbe...
@@ -33,6 +33,15 @@ def __init__(self) -> None: # element, exported as ExampleLabel in front-end/src/index.ts react_component="ExampleLabel", ), + "game_table": Element( + "data", + { + "data": ElementProperty(Prop...
doc/gui/extension/example_library/example_library.py
26
Python
0.071
suggestion
31
51
51
false
Example for tabular data
2,184
Avaiga/taipy
12,680
Python
FredLL-Avaiga
namnguyen20999
// This file is the entry point of the JavaScript bundle loaded by the // element library. // // All the React components that are used by elements should be imported, // indicating their source file name, then exported. // // Note that we export the 'ColoredLabel' component as 'ExampleLabel', which is // the name used...
```suggestion import GameTable from "./GameTable"; ```
// This file is the entry point of the JavaScript bundle loaded by the // element library. // // All the React components that are used by elements should be imported, // indicating their source file name, then exported. // // Note that we export the 'ColoredLabel' component as 'ExampleLabel', which is // the name used...
@@ -7,5 +7,6 @@ // Note that we export the 'ColoredLabel' component as 'ExampleLabel', which is // the name used in the element declaration in the element library. import ColoredLabel from "./ColoredLabel"; +import GameTable from "./BasicTable";
doc/gui/extension/example_library/front-end/src/index.ts
10
TypeScript
0.571
suggestion
56
13
13
false
Example for tabular data
2,184
Avaiga/taipy
12,680
Python
FabienLelaquais
namnguyen20999
# Copyright 2021-2024 Avaiga Private Limited # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
Please split the <|file_selector|> and <|image|> fragments in two lines to make them more obvious to see. Also, the callback function should be declared before the page definition, for homogeneity.
# Copyright 2021-2024 Avaiga Private Limited # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
@@ -0,0 +1,36 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required b...
doc/gui/examples/controls/file_selector_image.py
25
Python
0.429
suggestion
198
37
38
false
file_selector example
2,194
Avaiga/taipy
12,680
Python
FabienLelaquais
FredLL-Avaiga
# Copyright 2021-2024 Avaiga Private Limited # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
If you really want to stress a specific Page Builder API feature, please let me know what that is. Otherwise, Markdown would be the default code example implementation.
# Copyright 2021-2024 Avaiga Private Limited # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
doc/gui/examples/controls/file_selector_simple.py
1
Python
0.357
suggestion
169
26
26
false
file_selector example
2,194
Avaiga/taipy
12,680
Python
FabienLelaquais
FredLL-Avaiga
base_json.update( { "flask_version": str(metadata.version("flask") or ""), "backend_version": self.__get_version(), "host": f'{self._get_config("host", "localhost")}:{self._get_config("port", "default")}', "pytho...
can you write some python test to ensure that __upload_files works the same before and after your changes ?
base_json.update( { "flask_version": str(metadata.version("flask") or ""), "backend_version": self.__get_version(), "host": f'{self._get_config("host", "localhost")}:{self._get_config("port", "default")}', "pytho...
@@ -989,6 +989,8 @@ def __upload_files(self): context = request.form.get("context", None) upload_data = request.form.get("upload_data", None) multiple = "multiple" in request.form and request.form["multiple"] == "True" +
taipy/gui/gui.py
26
Python
0.429
question
107
51
51
false
New feature implementation/#2189 Add support for uploading nested folders
2,206
Avaiga/taipy
12,680
Python
FredLL-Avaiga
JosuaCarl
uploadData?: string; } const handleDragOver = (evt: DragEvent) => { evt.stopPropagation(); evt.preventDefault(); evt.dataTransfer && (evt.dataTransfer.dropEffect = "copy"); }; const defaultSx = { minWidth: "0px" }; const FileSelector = (props: FileSelectorProps) => { const { id, o...
I would check for selectionType?.toLowerCase().startsWith("d") || selectionType?.toLowerCase()).startsWith("folder")
uploadData?: string; } const handleDragOver = (evt: DragEvent) => { evt.stopPropagation(); evt.preventDefault(); evt.dataTransfer && (evt.dataTransfer.dropEffect = "copy"); }; const defaultSx = { minWidth: "0px" }; const FileSelector = (props: FileSelectorProps) => { const { id, o...
@@ -68,14 +68,14 @@ const FileSelector = (props: FileSelectorProps) => { defaultLabel = "", updateVarName = "", multiple = false, - selectFolder = false, + selectionType = "file", extensions = ".csv,.xlsx", dropMessage = "Drop here to Upload", label, ...
frontend/taipy-gui/src/components/Taipy/FileSelector.tsx
26
TypeScript
0.5
suggestion
116
51
51
false
New feature implementation/#2189 Add support for uploading nested folders
2,206
Avaiga/taipy
12,680
Python
FredLL-Avaiga
JosuaCarl
.set_attributes( [ ("on_action", PropertyType.function), ("active", PropertyType.dynamic_boolean, True), ("render", PropertyType.dynamic_boolean, True), ("auto", PropertyType.boolean, False), ("bypass_preview", PropertyT...
don't set default value here In this case, it will add the property which is not necessary
.set_attributes( [ ("on_action", PropertyType.function), ("active", PropertyType.dynamic_boolean, True), ("render", PropertyType.dynamic_boolean, True), ("auto", PropertyType.boolean, False), ("bypass_preview", PropertyT...
@@ -262,7 +262,7 @@ class _Factory: ("on_action", PropertyType.function), ("active", PropertyType.dynamic_boolean, True), ("multiple", PropertyType.boolean, False), - ("select_folder", PropertyType.boolean, False), + ("selection_type", Pro...
taipy/gui/_renderers/factory.py
26
Python
0.214
suggestion
91
51
51
false
New feature implementation/#2189 Add support for uploading nested folders
2,206
Avaiga/taipy
12,680
Python
FredLL-Avaiga
JosuaCarl
from taipy.gui import Gui, Icon, State, get_state_id, invoke_callback, invoke_long_callback # The Wikipedia API used to generate content for a date wiki_url = "https://en.wikipedia.org/api/rest_v1/feed/onthisday/{type}/{month}/{day}" event_types = { "happen": "events", "passé": "events", "born": "births", ...
What do you mean? What does making it a state variable change that?
# The Wikipedia API used to generate content for a date wiki_url = "https://en.wikipedia.org/api/rest_v1/feed/onthisday/{type}/{month}/{day}" event_types = { "happen": "events", "passé": "events", "born": "births", "né": "births", "dead": "deaths", "mort": "deaths", } user_agent = "https://taip...
@@ -0,0 +1,181 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required ...
doc/gui/examples/controls/chat-streaming.py
26
Python
0.286
question
68
51
51
false
chat streaming example
2,213
Avaiga/taipy
12,680
Python
FabienLelaquais
FredLL-Avaiga
break type_event = type_event if type_event else "events" month = None day = None for m in re.finditer(r"(\d\d?)", request): if month is None: month = m.group() elif day is None: day = m.group() break if month is None: month = ...
Extract from the if construct.
# Display the request state.messages.append((f"{len(state.messages)}", args[2], args[3])) state.refresh("messages") # Analyse the request request = args[2].lower() type_event = None for word in event_types: if word in request: type_event = event_types[word] ...
@@ -0,0 +1,181 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required ...
doc/gui/examples/controls/chat-streaming.py
26
Python
0.143
refactor
30
31
42
false
chat streaming example
2,213
Avaiga/taipy
12,680
Python
FabienLelaquais
FredLL-Avaiga
# Copyright 2021-2024 Avaiga Private Limited # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
It would be nice to have at least a comment for each function, indicating vaguely what it does and who invokes it.
# Copyright 2021-2024 Avaiga Private Limited # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
doc/gui/examples/controls/chat-streaming.py
1
Python
0.357
suggestion
114
26
26
false
chat streaming example
2,213
Avaiga/taipy
12,680
Python
FabienLelaquais
FredLL-Avaiga
state_id, set_message, ["requesting Wikipedia ..."], ) request = wiki_url.format(type=event_type, month=month, day=day) req = requests.get(request, headers={"accept": "application/json; charset=utf-8;", "User-Agent": user_agent}) # handle the response if req.status_code == 20...
```suggestion # Invoked by the 'on_action' callback of the chat control when the user presses the Send button ```
state_id, set_message, ["Fetching information from Wikipedia ..."], ) request = wiki_url.format(type=event_type, month=month, day=day) req = requests.get(request, headers={"accept": "application/json; charset=utf-8;", "User-Agent": user_agent}) # Handle the response if req.st...
@@ -0,0 +1,192 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required ...
doc/gui/examples/controls/chat-streaming.py
26
Python
0.786
suggestion
115
51
51
false
chat streaming example
2,213
Avaiga/taipy
12,680
Python
FabienLelaquais
FredLL-Avaiga
# To execute this script, make sure that the taipy-gui package is installed in your # Python environment and run: # python <script> # ----------------------------------------------------------------------------------------- import datetime import re import time import typing as t import requests # type: ignore[im...
```suggestion # The list of messages ```
# To execute this script, make sure that the taipy-gui package is installed in your # Python environment and run: # python <script> # ----------------------------------------------------------------------------------------- import datetime import re import time import typing as t import requests # type: ignore[im...
@@ -0,0 +1,192 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required ...
doc/gui/examples/controls/chat-streaming.py
26
Python
0.429
suggestion
42
51
51
false
chat streaming example
2,213
Avaiga/taipy
12,680
Python
FabienLelaquais
FredLL-Avaiga
# ----------------------------------------------------------------------------------------- import datetime import re import time import typing as t import requests # type: ignore[import-untyped] from taipy.gui import Gui, Icon, State, get_state_id, invoke_callback, invoke_long_callback # The Wikipedia API used to ...
```suggestion # The two users of this app ```
# ----------------------------------------------------------------------------------------- import datetime import re import time import typing as t import requests # type: ignore[import-untyped] from taipy.gui import Gui, Icon, State, get_state_id, invoke_callback, invoke_long_callback # The Wikipedia API used to ...
@@ -0,0 +1,192 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required ...
doc/gui/examples/controls/chat-streaming.py
26
Python
0.5
suggestion
47
51
51
false
chat streaming example
2,213
Avaiga/taipy
12,680
Python
FabienLelaquais
FredLL-Avaiga
from taipy.gui import Gui, Icon, State, get_state_id, invoke_callback, invoke_long_callback # The Wikipedia API used to generate content for a date wiki_url = "https://en.wikipedia.org/api/rest_v1/feed/onthisday/{type}/{month}/{day}" event_types = { "happen": "events", "passé": "events", "born": "births",...
```suggestion # Initialize the user state ```
from taipy.gui import Gui, Icon, State, get_state_id, invoke_callback, invoke_long_callback # The Wikipedia API used to generate content for a date wiki_url = "https://en.wikipedia.org/api/rest_v1/feed/onthisday/{type}/{month}/{day}" event_types = { "happen": "events", "passé": "events", "born": "births",...
@@ -0,0 +1,192 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required ...
doc/gui/examples/controls/chat-streaming.py
26
Python
0.5
suggestion
47
51
51
false
chat streaming example
2,213
Avaiga/taipy
12,680
Python
FabienLelaquais
FredLL-Avaiga
# The Wikipedia API used to generate content for a date wiki_url = "https://en.wikipedia.org/api/rest_v1/feed/onthisday/{type}/{month}/{day}" event_types = { "happen": "events", "passé": "events", "born": "births", "né": "births", "dead": "deaths", "mort": "deaths", } user_agent = "https://taip...
```suggestion # Messages are for this user only ```
# The Wikipedia API used to generate content for a date wiki_url = "https://en.wikipedia.org/api/rest_v1/feed/onthisday/{type}/{month}/{day}" event_types = { "happen": "events", "passé": "events", "born": "births", "né": "births", "dead": "deaths", "mort": "deaths", } user_agent = "https://taip...
@@ -0,0 +1,192 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required ...
doc/gui/examples/controls/chat-streaming.py
26
Python
0.643
suggestion
57
51
51
false
chat streaming example
2,213
Avaiga/taipy
12,680
Python
FabienLelaquais
FredLL-Avaiga
"happen": "events", "passé": "events", "born": "births", "né": "births", "dead": "deaths", "mort": "deaths", } user_agent = "https://taipy.io/demo" # the list of messages messages: list[tuple[str, str, str]] = [] # (Message id, message, sender) # the users users = [ ["wikipedia", Icon("ht...
```suggestion # Add the image if there is one in the Wikipedia returned data ```
"happen": "events", "passé": "events", "born": "births", "né": "births", "dead": "deaths", "mort": "deaths", } user_agent = "https://taipy.io/demo" # The list of messages messages: list[tuple[str, str, str]] = [] # (Message id, message, sender) # The two users of this app users = [ ["wiki...
@@ -0,0 +1,192 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required ...
doc/gui/examples/controls/chat-streaming.py
26
Python
0.571
suggestion
82
51
51
false
chat streaming example
2,213
Avaiga/taipy
12,680
Python
FabienLelaquais
FredLL-Avaiga
"né": "births", "dead": "deaths", "mort": "deaths", } user_agent = "https://taipy.io/demo" # the list of messages messages: list[tuple[str, str, str]] = [] # (Message id, message, sender) # the users users = [ ["wikipedia", Icon("https://www.wikipedia.org/static/apple-touch/wikipedia.png", "Wikipedia...
```suggestion if (pos := msg_content.find(text)) > -1: ``` may be less readable. Your choice.
"né": "births", "dead": "deaths", "mort": "deaths", } user_agent = "https://taipy.io/demo" # The list of messages messages: list[tuple[str, str, str]] = [] # (Message id, message, sender) # The two users of this app users = [ ["wikipedia", Icon("https://www.wikipedia.org/static/apple-touch/wikipedia....
@@ -0,0 +1,192 @@ +# Copyright 2021-2024 Avaiga Private Limited +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required ...
doc/gui/examples/controls/chat-streaming.py
26
Python
0.714
suggestion
100
51
51
false
chat streaming example
2,213
Avaiga/taipy
12,680
Python
FabienLelaquais
FredLL-Avaiga