before_code stringlengths 30 149k | reviewer_comment stringlengths 16 20.6k | after_code stringlengths 30 163k | diff_context stringlengths 0 22.4k | file_path stringlengths 6 155 | comment_line int64 0 26 | language stringclasses 19
values | quality_score float64 0.07 1 | comment_type stringclasses 9
values | comment_length int64 16 20.6k | before_lines int64 2 4.61k | after_lines int64 2 4.4k | is_negative bool 2
classes | pr_title stringlengths 7 140 | pr_number int64 18 61.2k | repo_name stringclasses 29
values | repo_stars int64 321 56k | repo_language stringclasses 14
values | reviewer_username stringclasses 378
values | author_username stringclasses 739
values | user stringlengths 361 200k | assistant stringlengths 16 20.6k | system stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
import threading
import typing as t
from ._warnings import _warn
from .gui import Gui
from .state import State
def download(
state: State, content: t.Any, name: t.Optional[str] = "", on_action: t.Optional[t.Union[str, t.Callable]] = ""
):
"""Download content to the client.
Arguments:
state (Stat... | ```suggestion
[*data_url_max_size*](../../userman/advanced_features/configuration/gui-config.md#p-data_url_max_size) configuration
``` | import threading
import typing as t
from ._warnings import _warn
from .gui import Gui
from .state import State
def download(
state: State, content: t.Any, name: t.Optional[str] = "", on_action: t.Optional[t.Union[str, t.Callable]] = ""
):
"""Download content to the client.
Arguments:
state (Stat... | @@ -34,7 +34,7 @@ def download(
- a string: the value must be an existing path name to the file that gets downloaded or
the URL to the resource you want to download.
- a buffer (such as a `bytes` object): if the size of the buffer is smaller than
- the [*data_url_max_size*](../../... | taipy/gui/gui_actions.py | 26 | Python | 0.786 | suggestion | 147 | 51 | 51 | false | Doc/#1007 improve doc navigability | 1,743 | Avaiga/taipy | 12,680 | Python | jrobinAV | FlorianJacta | Review this pull request change.
Language: Python
File: taipy/gui/gui_actions.py
PR Title: Doc/#1007 improve doc navigability
BEFORE CODE: import threading
import typing as t
from ._warnings import _warn
from .gui import Gui
from .state import State
def download(
state: State, content: t.Any, name: t.Optiona... | ```suggestion
[*data_url_max_size*](../../userman/advanced_features/configuration/gui-config.md#p-data_url_max_size) configuration
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import { uploadFile } from "../../src/workers/fileupload";
import { Socket, io } from "socket.io-client";
import { DataManager, ModuleData } from "./dataManager";
import { initSocket } from "./socket";
import { TaipyWsAdapter, WsAdapter } from "./wsAdapter";
import { WsMessageType } from "../../src/context/wsUtils";
i... | ```suggestion
type RequestDataOptions = {
``` | import { uploadFile } from "../../src/workers/fileupload";
import { Socket, io } from "socket.io-client";
import { nanoid } from 'nanoid';
import { DataManager, ModuleData, RequestDataOptions } from "./dataManager";
import { initSocket } from "./socket";
import { TaipyWsAdapter, WsAdapter } from "./wsAdapter";
import ... | @@ -24,8 +24,28 @@ export type OnEvent =
| OnWsStatusUpdate;
type Route = [string, string];
type RequestDataCallback = (taipyApp: TaipyApp, encodedName: string, dataEventKey: string, value: unknown) => void;
+type ColumnName = string;
+type RequestOptions = { | frontend/taipy-gui/base/src/app.ts | 26 | TypeScript | 0.571 | suggestion | 47 | 51 | 51 | false | Frontend Decouple | Expose Data Layer | 1,757 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | dinhlongviolin1 | Review this pull request change.
Language: TypeScript
File: frontend/taipy-gui/base/src/app.ts
PR Title: Frontend Decouple | Expose Data Layer
BEFORE CODE: import { uploadFile } from "../../src/workers/fileupload";
import { Socket, io } from "socket.io-client";
import { DataManager, ModuleData } from "./dataManage... | ```suggestion
type RequestDataOptions = {
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
params.pop("client_id", None)
params.pop("v", None)
nav_page = self.on_navigate(self.__get_state(), page_name, params)
if nav_page != page_name:
if isinstance(nav_page, str):
if self._navigate(nav_pag... | How do you deal with functions that are in the scope ?
I saw json messages ... | if isinstance(nav_page, str):
if self._navigate(nav_page):
return ("Root page cannot be re-routed by on_navigate().", 302)
else:
_warn(f"on_navigate() returned an invalid page name '{nav_page}'.")
... | @@ -2346,7 +2346,7 @@ def _bind_custom_page_variables(self, page: CustomPage, client_id: t.Optional[st
if (
(not page._binding_variables or k in page._binding_variables)
and not k.startswith("_")
- and not isinstance(v, (Modul... | taipy/gui/gui.py | 26 | Python | 0.214 | question | 79 | 51 | 51 | false | Frontend Decouple | Expose Data Layer | 1,757 | Avaiga/taipy | 12,680 | Python | FredLL-Avaiga | dinhlongviolin1 | Review this pull request change.
Language: Python
File: taipy/gui/gui.py
PR Title: Frontend Decouple | Expose Data Layer
BEFORE CODE: params.pop("client_id", None)
params.pop("v", None)
nav_page = self.on_navigate(self.__get_state(), page_name, params)
... | How do you deal with functions that are in the scope ?
I saw json messages ... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# _data_request_counter = 1
def __send_var_list_update( # noqa C901
self,
modified_vars: t.List[str],
front_var: t.Optional[str] = None,
):
ws_dict = {}
values = {v: _getscopeattr_drill(self, v) for v in modified_vars if _is_moduled_variable(v)}
if not valu... | change the comment and remove the dead code |
def __send_var_list_update( # noqa C901
self,
modified_vars: t.List[str],
front_var: t.Optional[str] = None,
):
ws_dict = {}
values = {v: _getscopeattr_drill(self, v) for v in modified_vars if _is_moduled_variable(v)}
if not values:
return
fo... | @@ -1052,7 +1051,11 @@ def __send_var_list_update( # noqa C901
modified_vars.remove(k)
for _var in modified_vars:
newvalue = values.get(_var)
- if isinstance(newvalue, _TaipyData):
+ resource_handler = get_current_resource_handler()
+ custom_page_... | taipy/gui/gui.py | 26 | Python | 0.143 | suggestion | 43 | 51 | 51 | false | Frontend Decouple | Expose Data Layer | 1,757 | Avaiga/taipy | 12,680 | Python | FredLL-Avaiga | dinhlongviolin1 | Review this pull request change.
Language: Python
File: taipy/gui/gui.py
PR Title: Frontend Decouple | Expose Data Layer
BEFORE CODE:
# _data_request_counter = 1
def __send_var_list_update( # noqa C901
self,
modified_vars: t.List[str],
front_var: t.Optional[str] = None,
):
... | change the comment and remove the dead code | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
if w.category is not DeprecationWarning and w.category is not PendingDeprecationWarning:
keep_value = False
break
if not keep_value:
# do not send data that... | not necessary if you remove _TaipyData from the list | ws_dict[_var] = newvalue
# TODO: What if value == newvalue?
self.__send_ws_update_with_dict(ws_dict)
def __update_state_context(self, payload: dict):
# apply state context if any
state_context = payload.get("state_context")
if isinstance(state_context, dict):
... | @@ -1119,6 +1118,14 @@ def __update_state_context(self, payload: dict):
def __request_data_update(self, var_name: str, payload: t.Any) -> None:
# Use custom attrgetter function to allow value binding for _MapDict
newvalue = _getscopeattr_drill(self, var_name)
+ resource_handler = get_curre... | taipy/gui/gui.py | 26 | Python | 0.286 | suggestion | 52 | 51 | 51 | false | Frontend Decouple | Expose Data Layer | 1,757 | Avaiga/taipy | 12,680 | Python | FredLL-Avaiga | dinhlongviolin1 | Review this pull request change.
Language: Python
File: taipy/gui/gui.py
PR Title: Frontend Decouple | Expose Data Layer
BEFORE CODE: if w.category is not DeprecationWarning and w.category is not PendingDeprecationWarning:
keep_value = False
... | not necessary if you remove _TaipyData from the list | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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... | May be this should be protected from being documented (_utils.py) or at least each function being marked as "NOT DOCUMENTED" to prevent the RefMan to show that, for the time being.
| # 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... | taipy/gui/custom/utils.py | 1 | Python | 0.429 | suggestion | 182 | 26 | 26 | false | Frontend Decouple | Expose Data Layer | 1,757 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | dinhlongviolin1 | Review this pull request change.
Language: Python
File: taipy/gui/custom/utils.py
PR Title: Frontend Decouple | Expose Data Layer
BEFORE CODE: # 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 Li... | May be this should be protected from being documented (_utils.py) or at least each function being marked as "NOT DOCUMENTED" to prevent the RefMan to show that, for the time being.
| You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
# 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... | `a some text` doesnt sound right at all | # 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,31 @@
+# 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/blocks/pane-anchor.py | 22 | Python | 0.214 | suggestion | 39 | 32 | 32 | false | Add pane code samples | 1,759 | Avaiga/taipy | 12,680 | Python | dinhlongviolin1 | FabienLelaquais | Review this pull request change.
Language: Python
File: doc/gui/examples/blocks/pane-anchor.py
PR Title: Add pane code samples
BEFORE CODE: # 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 Licen... | `a some text` doesnt sound right at all | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
def _get_frame(self):
if not hasattr(self, "_frame"):
raise RuntimeError(f"Page '{type(self).__name__}' was not registered correctly.")
return self._frame
def _get_module_name(self) -> t.Optional[str]:
return (
None
if (frame := self._get_frame()) is... | What would you expose ' get_style()' for? |
def _get_frame(self):
if not hasattr(self, "_frame"):
raise RuntimeError(f"Page '{type(self).__name__}' was not registered correctly.")
return self._frame
def _get_module_name(self) -> t.Optional[str]:
return (
None
if (frame := self._get_frame()) is... | @@ -140,3 +141,10 @@ def render(self, gui) -> str:
if self._renderer is not None:
return self._renderer.render(gui)
return "<h1>No renderer found for page</h1>"
+
+ def set_style(self, style: t.Dict[str, t.Dict[str, str]]):
+ self.__style = style if isinstance(style, dict) else ... | taipy/gui/page.py | 26 | Python | 0.071 | question | 42 | 28 | 36 | false | page styling | 1,765 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | FredLL-Avaiga | Review this pull request change.
Language: Python
File: taipy/gui/page.py
PR Title: page styling
BEFORE CODE:
def _get_frame(self):
if not hasattr(self, "_frame"):
raise RuntimeError(f"Page '{type(self).__name__}' was not registered correctly.")
return self._frame
def _get_modu... | What would you expose ' get_style()' for? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import os
import typing as t
def get_style(style: t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, str]]]]):
if isinstance(style, dict):
style_arr = []
for k, v in style.items():
if isinstance(v, dict):
rules= []
for vk, vv in v.ite... | I'm afraid it's worse than that...
t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, str]]]]]]]] why not? |
import os
import typing as t
def get_style(style: t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, t.Any]]]]):
if isinstance(style, dict):
style_arr = []
for k, v in style.items():
if isinstance(v, dict):
rules= []
for vk, vv in v.i... | @@ -0,0 +1,20 @@
+
+import os
+import typing as t
+
+
+def get_style(style: t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, str]]]]): | taipy/gui/utils/_css.py | 6 | Python | 0.429 | question | 206 | 21 | 21 | false | page styling | 1,765 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | FredLL-Avaiga | Review this pull request change.
Language: Python
File: taipy/gui/utils/_css.py
PR Title: page styling
BEFORE CODE:
import os
import typing as t
def get_style(style: t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, str]]]]):
if isinstance(style, dict):
style_arr = []
for k, v in styl... | I'm afraid it's worse than that...
t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, str]]]]]]]] why not? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import os
import typing as t
def get_style(style: t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, str]]]]):
if isinstance(style, dict):
style_arr = []
for k, v in style.items():
if isinstance(v, dict):
rules= []
for vk, vv in v.ite... | Do you really need a ' real' line skip? |
import os
import typing as t
def get_style(style: t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, t.Any]]]]):
if isinstance(style, dict):
style_arr = []
for k, v in style.items():
if isinstance(v, dict):
rules= []
for vk, vv in v.i... | @@ -0,0 +1,20 @@
+
+import os
+import typing as t
+
+
+def get_style(style: t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, str]]]]):
+ if isinstance(style, dict):
+ style_arr = []
+ for k, v in style.items():
+ if isinstance(v, dict):
+ rules= []
+ ... | taipy/gui/utils/_css.py | 19 | Python | 0.071 | question | 40 | 21 | 21 | false | page styling | 1,765 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | FredLL-Avaiga | Review this pull request change.
Language: Python
File: taipy/gui/utils/_css.py
PR Title: page styling
BEFORE CODE:
import os
import typing as t
def get_style(style: t.Union[str, t.Dict[str, t.Union[str, t.Dict[str, str]]]]):
if isinstance(style, dict):
style_arr = []
for k, v in styl... | Do you really need a ' real' line skip? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
data = super().get()
if isinstance(data, (list, tuple)) and len(data) == 1:
data = data[0]
if isinstance(data, Scenario):
try:
if scenario := core_get(data.id):
dag = scenario._get_dag()
nodes = {}
... | No test on `storage_type()` here? | data = super().get()
if isinstance(data, (list, tuple)) and len(data) == 1:
data = data[0]
if isinstance(data, Scenario):
try:
if scenario := core_get(data.id):
dag = scenario._get_dag()
nodes = {}
... | @@ -131,16 +131,26 @@ def get(self):
if scenario := core_get(data.id):
dag = scenario._get_dag()
nodes = {}
- for id, node in dag.nodes.items():
- entityType = _GuiCoreScenarioDagAdapter.get_entity_type(node)
+ ... | taipy/gui_core/_adapters.py | 26 | Python | 0.357 | question | 33 | 51 | 51 | false | Show additional data nodes in DAG | 1,771 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | FredLL-Avaiga | Review this pull request change.
Language: Python
File: taipy/gui_core/_adapters.py
PR Title: Show additional data nodes in DAG
BEFORE CODE: data = super().get()
if isinstance(data, (list, tuple)) and len(data) == 1:
data = data[0]
if isinstance(data, Scenario):
try:
... | No test on `storage_type()` here? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
let val =
Number(evt.currentTarget.querySelector("input")?.value || 0) -
(step || 1) * (stepMultiplier || 10);
if (min !== undefined && val < min) {
val = min;
}
setVal... | ```
const val = evt.currentTarget.querySelector(multiline?"textarea":"input")?.value;
``` | const handleAction = useCallback(
(evt: KeyboardEvent<HTMLDivElement>) => {
if (evt.shiftKey && type === "number") {
if (evt.key === "ArrowUp") {
let val =
Number(evt.currentTarget.querySelector("input")?.value || 0) +
... | @@ -148,7 +162,9 @@ const Input = (props: TaipyInputProps) => {
evt.preventDefault();
}
} else if (!evt.shiftKey && !evt.ctrlKey && !evt.altKey && actionKeys.includes(evt.key)) {
- const val = multiline ? evt.currentTarget.querySelector("textarea")?.valu... | frontend/taipy-gui/src/components/Taipy/Input.tsx | 26 | TypeScript | 0.571 | suggestion | 91 | 51 | 51 | false | Fix change_delay in input | 1,774 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | namnguyen20999 | Review this pull request change.
Language: TypeScript
File: frontend/taipy-gui/src/components/Taipy/Input.tsx
PR Title: Fix change_delay in input
BEFORE CODE: let val =
Number(evt.currentTarget.querySelector("input")?.value || 0) -
(step || 1) * (s... | ```
const val = evt.currentTarget.querySelector(multiline?"textarea":"input")?.value;
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
import { Socket } from "socket.io-client";
export type ModuleData = Record<string, VarName>;
export type VarName = Record<string, VarData>;
export interface VarData {
type: string;
value: unknown;
encoded_name: string;
}
declare class DataManager {
_data: Record<string, unknown>;
_init_data: Module... | Why single quotes? (contrary to elsewhere) | import { Socket } from 'socket.io-client';
export type ModuleData = Record<string, VarName>;
export type VarName = Record<string, VarData>;
export interface VarData {
type: string;
value: unknown;
encoded_name: string;
data_update: boolean;
}
export type ColumnName = string;
export type RequestDataOpti... | @@ -1,44 +1,66 @@
-import { Socket } from "socket.io-client";
+import { Socket } from 'socket.io-client'; | frontend/taipy-gui/base/src/packaging/taipy-gui-base.d.ts | 1 | TypeScript | 0.071 | question | 42 | 26 | 26 | false | update types gui base | 1,793 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | dinhlongviolin1 | Review this pull request change.
Language: TypeScript
File: frontend/taipy-gui/base/src/packaging/taipy-gui-base.d.ts
PR Title: update types gui base
BEFORE CODE: import { Socket } from "socket.io-client";
export type ModuleData = Record<string, VarName>;
export type VarName = Record<string, VarData>;
export inter... | Why single quotes? (contrary to elsewhere) | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
color: props.color ? props.color : undefined,
},
},
linearProgressFullWidthSx: {
width: "100%",
"& .MuiLinearProgress-bar": {
background: props.color ? props.color : undefined,
},
... | Do we really need this attribute?? | color: props.color ? props.color : undefined,
},
},
linearProgressFullWidthSx: {
width: "100%",
"& .MuiLinearProgress-bar": {
background: props.color ? props.color : undefined,
},
... | @@ -110,7 +118,7 @@ const Progress = (props: ProgressBarProps) => {
return showValue && value !== undefined ? (
linear ? (
- <Box sx={boxWithFlexDirectionSx}>
+ <Box sx={boxWithFlexDirectionSx} data-testid="linear-progress-container"> | frontend/taipy-gui/src/components/Taipy/Progress.tsx | 26 | TypeScript | 0.071 | question | 34 | 51 | 51 | false | Adding width property to linear & circular progress | 1,797 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | namnguyen20999 | Review this pull request change.
Language: TypeScript
File: frontend/taipy-gui/src/components/Taipy/Progress.tsx
PR Title: Adding width property to linear & circular progress
BEFORE CODE: color: props.color ? props.color : undefined,
},
},
linearProgressFu... | Do we really need this attribute?? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
"""Deprecated. Use the `Orchestrator^` service class with `taipy.Orchestrator()` instead."""
``` | # 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,28 @@
+# 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/core/_core.py | 19 | Python | 0.786 | suggestion | 116 | 29 | 30 | false | feature/#1734 Recreate the Core service | 1,799 | Avaiga/taipy | 12,680 | Python | jrobinAV | toan-quach | Review this pull request change.
Language: Python
File: taipy/core/_core.py
PR Title: feature/#1734 Recreate the Core service
BEFORE CODE: # 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 Licens... | ```suggestion
"""Deprecated. Use the `Orchestrator^` service class with `taipy.Orchestrator()` instead."""
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
"The `Core` service is deprecated and replaced by the `Orchestrator` service. "
"An `Orchestrator` instance has been instantiated instead."
``` | # 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,28 @@
+# 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/core/_core.py | 26 | Python | 0.786 | suggestion | 184 | 29 | 30 | false | feature/#1734 Recreate the Core service | 1,799 | Avaiga/taipy | 12,680 | Python | jrobinAV | toan-quach | Review this pull request change.
Language: Python
File: taipy/core/_core.py
PR Title: feature/#1734 Recreate the Core service
BEFORE CODE: # 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 Licens... | ```suggestion
"The `Core` service is deprecated and replaced by the `Orchestrator` service. "
"An `Orchestrator` instance has been instantiated instead."
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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... | I believe we need to update this test message as well | # 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... | @@ -12,105 +12,19 @@
import pytest
-from taipy.config import Config
-from taipy.config.exceptions.exceptions import ConfigurationUpdateBlocked
-from taipy.core import Orchestrator
-from taipy.core._orchestrator._dispatcher import _DevelopmentJobDispatcher, _StandaloneJobDispatcher
-from taipy.core._orchestrator._o... | tests/core/test_core.py | 26 | Python | 0.214 | suggestion | 53 | 31 | 32 | false | feature/#1734 Recreate the Core service | 1,799 | Avaiga/taipy | 12,680 | Python | trgiangdo | toan-quach | Review this pull request change.
Language: Python
File: tests/core/test_core.py
PR Title: feature/#1734 Recreate the Core service
BEFORE CODE: # 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 Li... | I believe we need to update this test message as well | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
container
className={getSuffixedClassNames(className, sender ? "-sent" : "-received")}
size={12}
sx={noAnchorSx}
justifyContent={sender ? "flex-end" : undefined}
>
<Grid sx={sender ? senderMsgSx : undefined}>
{(!sender || sh... | I would have called these classes
`taipy-chat-<mode>-[incoming|outgoing]-message`
and probably add
`taipy-chat-[incoming|outgoing]-message` as well
and maybe add
`taipy-chat-message`
What say you?
| mode: string;
}
const ChatRow = (props: ChatRowProps) => {
const { senderId, message, name, className, getAvatar, index, showSender, mode } = props;
const sender = senderId == name;
const avatar = getAvatar(name, sender);
return (
<Grid
container
className={getSuffi... | @@ -156,7 +166,11 @@ const ChatRow = (props: ChatRowProps) => {
{!sender ? <Box sx={avatarColSx}>{avatar}</Box> : null}
<Stack>
<Box sx={sender ? rightNameSx : leftNameSx}>{name}</Box>
- <Paper sx={sender ? senderP... | frontend/taipy-gui/src/components/Taipy/Chat.tsx | 26 | TypeScript | 0.571 | question | 230 | 51 | 51 | false | chat: add a mode specific class to the messages | 1,812 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | FredLL-Avaiga | Review this pull request change.
Language: TypeScript
File: frontend/taipy-gui/src/components/Taipy/Chat.tsx
PR Title: chat: add a mode specific class to the messages
BEFORE CODE: container
className={getSuffixedClassNames(className, sender ? "-sent" : "-received")}
size={12}
... | I would have called these classes
`taipy-chat-<mode>-[incoming|outgoing]-message`
and probably add
`taipy-chat-[incoming|outgoing]-message` as well
and maybe add
`taipy-chat-message`
What say you?
| You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
const nags = ags.filter((ag) => ag !== groupBy);
if (ags.length == nags.length) {
nags.push(groupBy);
}
return nags;
});
}
e.stopPropagation();
}, []);
const [colsOrder, columns, styles, tooltips, ha... | ```suggestion
} else {
``` | const nags = ags.filter((ag) => ag !== groupBy);
if (ags.length == nags.length) {
nags.push(groupBy);
}
return nags;
});
}
e.stopPropagation();
}, []);
const [colsOrder, columns, styles, tooltips, ha... | @@ -277,32 +277,35 @@ const AutoLoadingTable = (props: TaipyTableProps) => {
e.stopPropagation();
}, []);
- const [colsOrder, columns, styles, tooltips, handleNan, filter] = useMemo(() => {
+ const [colsOrder, columns, styles, tooltips, handleNan, filter, partialEditable] = useMemo(() => {
... | frontend/taipy-gui/src/components/Taipy/AutoLoadingTable.tsx | 26 | TypeScript | 0.429 | suggestion | 48 | 51 | 51 | false | table partial editable should show add and delete action if not false | 1,813 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | FredLL-Avaiga | Review this pull request change.
Language: TypeScript
File: frontend/taipy-gui/src/components/Taipy/AutoLoadingTable.tsx
PR Title: table partial editable should show add and delete action if not false
BEFORE CODE: const nags = ags.filter((ag) => ag !== groupBy);
if (ags.length == nag... | ```suggestion
} else {
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
const formatConfig = useFormatConfig();
const module = useModule();
const refresh = props.data && typeof props.data.__taipy_refresh === "boolean";
const className = useClassNames(props.libClassName, props.dynamicClassName, props.className);
const active = useDynamicProperty(props.active, props.defa... | ```suggestion
} else {
``` | const formatConfig = useFormatConfig();
const module = useModule();
const refresh = props.data && typeof props.data.__taipy_refresh === "boolean";
const className = useClassNames(props.libClassName, props.dynamicClassName, props.className);
const active = useDynamicProperty(props.active, props.defa... | @@ -131,32 +131,35 @@ const PaginatedTable = (props: TaipyPaginatedTableProps) => {
const hover = useDynamicProperty(props.hoverText, props.defaultHoverText, undefined);
const baseColumns = useDynamicJsonProperty(props.columns, props.defaultColumns, defaultColumns);
- const [colsOrder, columns, styles, t... | frontend/taipy-gui/src/components/Taipy/PaginatedTable.tsx | 26 | TypeScript | 0.429 | suggestion | 48 | 51 | 51 | false | table partial editable should show add and delete action if not false | 1,813 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | FredLL-Avaiga | Review this pull request change.
Language: TypeScript
File: frontend/taipy-gui/src/components/Taipy/PaginatedTable.tsx
PR Title: table partial editable should show add and delete action if not false
BEFORE CODE: const formatConfig = useFormatConfig();
const module = useModule();
const refresh = props.d... | ```suggestion
} else {
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
def re_evaluate_expr(self, gui: Gui, var_name: str) -> t.Set[str]: # noqa C901
"""
This function will execute when the _update_var function is handling
an expression with only a single variable
"""
modified_vars: t.Set[str] = set()
# Verify that the current hash is an... | I think >= 0 would be clearer & intuitive | except Exception as e:
_warn(f"Exception raised evaluating {expr_string}", e)
def re_evaluate_expr(self, gui: Gui, var_name: str) -> t.Set[str]: # noqa C901
"""
This function will execute when the _update_var function is handling
an expression with only a single variabl... | @@ -293,15 +295,23 @@ def re_evaluate_expr(self, gui: Gui, var_name: str) -> t.Set[str]:
expr_original = self.__hash_to_expr[var_name]
temp_expr_var_map = self.__expr_to_var_map[expr_original]
if len(temp_expr_var_map) <= 1:
+ index_in_array = int(m[0]) if (m := _Ev... | taipy/gui/utils/_evaluator.py | 26 | Python | 0.071 | suggestion | 41 | 51 | 51 | false | bind indexed variables | 1,824 | Avaiga/taipy | 12,680 | Python | namnguyen20999 | FredLL-Avaiga | Review this pull request change.
Language: Python
File: taipy/gui/utils/_evaluator.py
PR Title: bind indexed variables
BEFORE CODE: def re_evaluate_expr(self, gui: Gui, var_name: str) -> t.Set[str]: # noqa C901
"""
This function will execute when the _update_var function is handling
an e... | I think >= 0 would be clearer & intuitive | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
except Exception as e:
_warn(f"Exception raised evaluating {expr_string}", e)
def re_evaluate_expr(self, gui: Gui, var_name: str) -> t.Set[str]: # noqa C901
"""
This function will execute when the _update_var function is handling
an expression with only a single variable... | maybe for better clarity: `next(iter(temp_expr_var_map.values()), None) if temp_expr_var_map else var_name` | _setscopeattr(gui, var_name, expr_evaluated)
if holder is not None:
holder.set(expr_evaluated)
except Exception as e:
_warn(f"Exception raised evaluating {expr_string}", e)
def re_evaluate_expr(self, gui: Gui, var_name: str) -> t.Set[str]: # noqa C901
... | @@ -293,15 +295,23 @@ def re_evaluate_expr(self, gui: Gui, var_name: str) -> t.Set[str]:
expr_original = self.__hash_to_expr[var_name]
temp_expr_var_map = self.__expr_to_var_map[expr_original]
if len(temp_expr_var_map) <= 1:
+ index_in_array = int(m[0]) if (m := _Ev... | taipy/gui/utils/_evaluator.py | 26 | Python | 0.571 | suggestion | 107 | 51 | 51 | false | bind indexed variables | 1,824 | Avaiga/taipy | 12,680 | Python | namnguyen20999 | FredLL-Avaiga | Review this pull request change.
Language: Python
File: taipy/gui/utils/_evaluator.py
PR Title: bind indexed variables
BEFORE CODE: except Exception as e:
_warn(f"Exception raised evaluating {expr_string}", e)
def re_evaluate_expr(self, gui: Gui, var_name: str) -> t.Set[str]: # noqa C901
... | maybe for better clarity: `next(iter(temp_expr_var_map.values()), None) if temp_expr_var_map else var_name` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
self.__expr_to_hash[holder_expr] = hash_name
# expression is only the first part ...
expr = expr.split(".")[0]
self.__expr_to_var_map[holder_expr] = {expr: expr}
if a_list := self.__var_to_expr_list.get(expr):
if holder_expr not in a_list:
a_list.appen... | Why do we need the empty declaration here | self.__expr_to_holders[expr] = {holder}
self.__expr_to_hash[holder_expr] = hash_name
# expression is only the first part ...
expr = expr.split(".")[0]
self.__expr_to_var_map[holder_expr] = {expr: expr}
if a_list := self.__var_to_expr_list.get(expr):
if hol... | @@ -198,6 +201,7 @@ def __get_holder_hash(holder: t.Type[_TaipyBase], expr_hash: str) -> str:
return f"{holder.get_hash()}_{_get_client_var_name(expr_hash)}"
def __evaluate_holder(self, gui: Gui, holder: t.Type[_TaipyBase], expr: str) -> t.Optional[_TaipyBase]:
+ expr_hash = "" | taipy/gui/utils/_evaluator.py | 26 | Python | 0.071 | suggestion | 41 | 51 | 51 | false | bind indexed variables | 1,824 | Avaiga/taipy | 12,680 | Python | dinhlongviolin1 | FredLL-Avaiga | Review this pull request change.
Language: Python
File: taipy/gui/utils/_evaluator.py
PR Title: bind indexed variables
BEFORE CODE: self.__expr_to_hash[holder_expr] = hash_name
# expression is only the first part ...
expr = expr.split(".")[0]
self.__expr_to_var_map[holder_expr] = {ex... | Why do we need the empty declaration here | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
useDynamicProperty,
useFormatConfig,
useModule,
} from "../../utils/hooks";
import TableFilter, { FilterDesc } from "./TableFilter";
import { getSuffixedClassNames, getUpdateVar } from "./utils";
import { emptyArray } from "../../utils";
interface RowData {
colsOrder: string[];
columns: Record<stri... | `useCheckbox`? `checkbox` (😒)? | useDynamicProperty,
useFormatConfig,
useModule,
} from "../../utils/hooks";
import TableFilter, { FilterDesc } from "./TableFilter";
import { getSuffixedClassNames, getUpdateVar } from "./utils";
import { emptyArray } from "../../utils";
interface RowData {
colsOrder: string[];
columns: Record<stri... | @@ -94,6 +94,7 @@ interface RowData {
lineStyle?: string;
nanValue?: string;
compRows?: RowType[];
+ renderLightBool?: boolean; | frontend/taipy-gui/src/components/Taipy/AutoLoadingTable.tsx | 26 | TypeScript | 0.286 | question | 30 | 51 | 51 | false | Table cell bool rendering | 1,825 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | FredLL-Avaiga | Review this pull request change.
Language: TypeScript
File: frontend/taipy-gui/src/components/Taipy/AutoLoadingTable.tsx
PR Title: Table cell bool rendering
BEFORE CODE: useDynamicProperty,
useFormatConfig,
useModule,
} from "../../utils/hooks";
import TableFilter, { FilterDesc } from "./TableFilter";
i... | `useCheckbox`? `checkbox` (😒)? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
!onValidation && setEdit(false);
}, [onValidation]);
return (
<TableCell
{...getCellProps(colDesc, tableCellProps)}
className={
onValidation ? getSuffixedClassNames(className || "tpc", edit ? "-editing" : "-editable") : className
}
... | What about using the property as the place to define those texts?
Like... `|use_checkbox=False;True|` or
```
check_values = ("Off", "On")
|use_checkbox={check_values}|
```
If `|use_checkbox|` (`tgb.table(..., use_checkbox=True)`) then False/True would be the 'default`...
|
const boolTitle = useMemo(() => {
if (!colDesc.type?.startsWith("bool") || !colDesc.lov || colDesc.lov.length == 0) {
return boolVal ? "True": "False";
}
return colDesc.lov[boolVal ? 1: 0];
}, [colDesc.type, boolVal, colDesc.lov]);
useEffect(() => {
!onValidat... | @@ -472,14 +475,27 @@ export const EditableCell = (props: EditableCellProps) => {
{edit ? (
colDesc.type?.startsWith("bool") ? (
<Box sx={cellBoxSx}>
+ lightBool ? (
+ <input
+ ... | frontend/taipy-gui/src/components/Taipy/tableUtils.tsx | 26 | TypeScript | 0.857 | question | 279 | 51 | 51 | false | Table cell bool rendering | 1,825 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | FredLL-Avaiga | Review this pull request change.
Language: TypeScript
File: frontend/taipy-gui/src/components/Taipy/tableUtils.tsx
PR Title: Table cell bool rendering
BEFORE CODE: !onValidation && setEdit(false);
}, [onValidation]);
return (
<TableCell
{...getCellProps(colDesc, tableCellProps)}... | What about using the property as the place to define those texts?
Like... `|use_checkbox=False;True|` or
```
check_values = ("Off", "On")
|use_checkbox={check_values}|
```
If `|use_checkbox|` (`tgb.table(..., use_checkbox=True)`) then False/True would be the 'default`...
| You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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... | A class is not an entry point is 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... | @@ -9,12 +9,41 @@
# 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.
-"""# Taipy Config
+"""# Taipy Config package
-The Taipy Config package is a Python library designed t... | taipy/config/__init__.py | 16 | Python | 0.071 | question | 36 | 41 | 41 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/__init__.py
PR Title: Improve ref man
BEFORE CODE: # 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... | A class is not an entry point is it? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
```python
from taipy.config import Config
from taipy.config import Frequency
from taipy.config import Scope
data_node_cfg = Config.configure_data_node("my_data_node", scope=Scope.SCENARIO)
Config.configure_scenario("my_scenario", additional_data_node_configs=[data_node_cfg], frequency=Frequency... | ```suggestion
The three objects are exposed in the `taipy^` package directly for convenience.
```
? | ```python
from taipy.config import Config
from taipy.config import Frequency
from taipy.config import Scope
data_node_cfg = Config.configure_data_node("my_data_node", scope=Scope.SCENARIO)
Config.configure_scenario("my_scenario", additional_data_node_configs=[data_node_cfg], frequency=Frequency... | @@ -9,12 +9,41 @@
# 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.
-"""# Taipy Config
+"""# Taipy Config package
-The Taipy Config package is a Python library designed t... | taipy/config/__init__.py | 26 | Python | 0.714 | question | 106 | 51 | 51 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/__init__.py
PR Title: Improve ref man
BEFORE CODE: ```python
from taipy.config import Config
from taipy.config import Frequency
from taipy.config import Scope
data_node_cfg = Config.configure_data_node("my_data_node", scope=Sc... | ```suggestion
The three objects are exposed in the `taipy^` package directly for convenience.
```
? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
`Issue` is a dataclass that represents an issue detected during the configuration check
``` | # 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... | @@ -15,8 +15,11 @@
@dataclass
class Issue:
- """
- An issue detected in the configuration.
+ """An issue detected in the configuration.
+
+ An `Issue` is a dataclass that represents an issue detected during the configuration check | taipy/config/checker/issue.py | 20 | Python | 0.714 | suggestion | 111 | 45 | 45 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/checker/issue.py
PR Title: Improve ref man
BEFORE CODE: # 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 obt... | ```suggestion
`Issue` is a dataclass that represents an issue detected during the configuration check
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
`IssueCollector` is a generic class that collects issues detected during the validation
``` | # 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... | @@ -15,8 +15,13 @@
class IssueCollector:
- """
- A collection of issues (instances of class `Issue^`).
+ """A collection of configuration issues (instances of class `Issue^`).
+
+ An `IssueCollector` is a generic class that collects issues detected during the validation | taipy/config/checker/issue_collector.py | 20 | Python | 0.714 | suggestion | 111 | 45 | 45 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/checker/issue_collector.py
PR Title: Improve ref man
BEFORE CODE: # 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. Y... | ```suggestion
`IssueCollector` is a generic class that collects issues detected during the validation
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
#
# 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.
impor... | I don't really like this notion of entry point... | #
# 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.
impor... | @@ -27,7 +27,91 @@
class Config:
- """Configuration singleton."""
+ """Singleton class that manages the configuration of a Taipy application.
+
+ The `Config` singleton is the main entry point for configuring a Taipy application. | taipy/config/config.py | 26 | Python | 0.071 | suggestion | 49 | 51 | 51 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/config.py
PR Title: Improve ref man
BEFORE CODE: #
# 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 expre... | I don't really like this notion of entry point... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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.
import ... | ```suggestion
In particular, this class provides:
``` | # 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.
import ... | @@ -27,7 +27,91 @@
class Config:
- """Configuration singleton."""
+ """Singleton class that manages the configuration of a Taipy application.
+
+ The `Config` singleton is the main entry point for configuring a Taipy application.
+ In particular, the class provides: | taipy/config/config.py | 26 | Python | 0.571 | suggestion | 59 | 51 | 51 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/config.py
PR Title: Improve ref man
BEFORE CODE: # 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... | ```suggestion
In particular, this class provides:
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
from ._config_comparator._config_comparator import _ConfigComparator
from ._serializer._json_serializer import _JsonSerializer
from ._serializer._toml_serializer import _TomlSerializer
from .checker._checker import _Checker
from .checker.issue_collector import IssueCollector
from .common._classproperty import _Classpro... | ```suggestion
- `configure_data_node()^`: Configure a data node adding and returning a `DataNodeConfig^`.
``` | from ._config_comparator._config_comparator import _ConfigComparator
from ._serializer._json_serializer import _JsonSerializer
from ._serializer._toml_serializer import _TomlSerializer
from .checker._checker import _Checker
from .checker.issue_collector import IssueCollector
from .common._classproperty import _Classpro... | @@ -27,7 +27,91 @@
class Config:
- """Configuration singleton."""
+ """Singleton class that manages the configuration of a Taipy application.
+
+ The `Config` singleton is the main entry point for configuring a Taipy application.
+ In particular, the class provides:
+
+ 1. Various methods to configu... | taipy/config/config.py | 26 | Python | 0.714 | suggestion | 119 | 51 | 51 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/config.py
PR Title: Improve ref man
BEFORE CODE: from ._config_comparator._config_comparator import _ConfigComparator
from ._serializer._json_serializer import _JsonSerializer
from ._serializer._toml_serializer import _TomlSerializer
from .checker... | ```suggestion
- `configure_data_node()^`: Configure a data node adding and returning a `DataNodeConfig^`.
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
from ._serializer._json_serializer import _JsonSerializer
from ._serializer._toml_serializer import _TomlSerializer
from .checker._checker import _Checker
from .checker.issue_collector import IssueCollector
from .common._classproperty import _Classproperty
from .common._config_blocker import _ConfigBlocker
from .global... | ```suggestion
- `configure_task()^`: Configure a task adding and returning a `TaskConfig^`.
``` | from ._serializer._json_serializer import _JsonSerializer
from ._serializer._toml_serializer import _TomlSerializer
from .checker._checker import _Checker
from .checker.issue_collector import IssueCollector
from .common._classproperty import _Classproperty
from .common._config_blocker import _ConfigBlocker
from .global... | @@ -27,7 +27,91 @@
class Config:
- """Configuration singleton."""
+ """Singleton class that manages the configuration of a Taipy application.
+
+ The `Config` singleton is the main entry point for configuring a Taipy application.
+ In particular, the class provides:
+
+ 1. Various methods to configu... | taipy/config/config.py | 26 | Python | 0.714 | suggestion | 105 | 51 | 51 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/config.py
PR Title: Improve ref man
BEFORE CODE: from ._serializer._json_serializer import _JsonSerializer
from ._serializer._toml_serializer import _TomlSerializer
from .checker._checker import _Checker
from .checker.issue_collector import IssueC... | ```suggestion
- `configure_task()^`: Configure a task adding and returning a `TaskConfig^`.
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
from ._serializer._toml_serializer import _TomlSerializer
from .checker._checker import _Checker
from .checker.issue_collector import IssueCollector
from .common._classproperty import _Classproperty
from .common._config_blocker import _ConfigBlocker
from .global_app.global_app_config import GlobalAppConfig
from .sectio... | ```suggestion
- `configure_scenario()^`: Configure a scenario adding and returning a `ScenarioConfig^`.
``` | from ._serializer._toml_serializer import _TomlSerializer
from .checker._checker import _Checker
from .checker.issue_collector import IssueCollector
from .common._classproperty import _Classproperty
from .common._config_blocker import _ConfigBlocker
from .global_app.global_app_config import GlobalAppConfig
from .sectio... | @@ -27,7 +27,91 @@
class Config:
- """Configuration singleton."""
+ """Singleton class that manages the configuration of a Taipy application.
+
+ The `Config` singleton is the main entry point for configuring a Taipy application.
+ In particular, the class provides:
+
+ 1. Various methods to configu... | taipy/config/config.py | 26 | Python | 0.714 | suggestion | 117 | 51 | 51 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/config.py
PR Title: Improve ref man
BEFORE CODE: from ._serializer._toml_serializer import _TomlSerializer
from .checker._checker import _Checker
from .checker.issue_collector import IssueCollector
from .common._classproperty import _Classproperty... | ```suggestion
- `configure_scenario()^`: Configure a scenario adding and returning a `ScenarioConfig^`.
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
from .checker._checker import _Checker
from .checker.issue_collector import IssueCollector
from .common._classproperty import _Classproperty
from .common._config_blocker import _ConfigBlocker
from .global_app.global_app_config import GlobalAppConfig
from .section import Section
from .unique_section import UniqueSection... | ```suggestion
- `load()^`: Load a TOML configuration file. (This overrides the Python configuration)
``` | from .checker._checker import _Checker
from .checker.issue_collector import IssueCollector
from .common._classproperty import _Classproperty
from .common._config_blocker import _ConfigBlocker
from .global_app.global_app_config import GlobalAppConfig
from .section import Section
from .unique_section import UniqueSection... | @@ -27,7 +27,91 @@
class Config:
- """Configuration singleton."""
+ """Singleton class that manages the configuration of a Taipy application.
+
+ The `Config` singleton is the main entry point for configuring a Taipy application.
+ In particular, the class provides:
+
+ 1. Various methods to configu... | taipy/config/config.py | 26 | Python | 0.714 | suggestion | 114 | 51 | 51 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/config.py
PR Title: Improve ref man
BEFORE CODE: from .checker._checker import _Checker
from .checker.issue_collector import IssueCollector
from .common._classproperty import _Classproperty
from .common._config_blocker import _ConfigBlocker
from .... | ```suggestion
- `load()^`: Load a TOML configuration file. (This overrides the Python configuration)
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
Here is a non-exhaustive list of configuration method examples:
- `configure_data_node`: Configure a data node adding and returning a `DataNodeConfig^`.
- `configure_task`: Configure a task adding and returning a `TaskConfig^`.
- `configure_scenario`: Configure a scenario adding and re... | ```suggestion
!!! example "Advanced use case"
``` |
Here is a non-exhaustive list of configuration method examples:
- `configure_data_node()^`: Configure a data node adding and returning a `DataNodeConfig^`.
- `configure_task()^`: Configure a task adding and returning a `TaskConfig^`.
- `configure_scenario()^`: Configure a scenario addi... | @@ -27,7 +27,91 @@
class Config:
- """Configuration singleton."""
+ """Singleton class that manages the configuration of a Taipy application.
+
+ The `Config` singleton is the main entry point for configuring a Taipy application.
+ In particular, the class provides:
+
+ 1. Various methods to configu... | taipy/config/config.py | 26 | Python | 0.643 | suggestion | 59 | 51 | 51 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/config.py
PR Title: Improve ref man
BEFORE CODE:
Here is a non-exhaustive list of configuration method examples:
- `configure_data_node`: Configure a data node adding and returning a `DataNodeConfig^`.
- `configure_task`:... | ```suggestion
!!! example "Advanced use case"
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
- `configure_data_node`: Configure a data node adding and returning a `DataNodeConfig^`.
- `configure_task`: Configure a task adding and returning a `TaskConfig^`.
- `configure_scenario`: Configure a scenario adding and returning a `ScenarioConfig^`.
- `load`: Load a TOML configuration ... | ```suggestion
The configuration can be done in three ways: Python code, configuration files, or
``` |
- `configure_data_node()^`: Configure a data node adding and returning a `DataNodeConfig^`.
- `configure_task()^`: Configure a task adding and returning a `TaskConfig^`.
- `configure_scenario()^`: Configure a scenario adding and returning a `ScenarioConfig^`.
- `load()^`: Load a TOML co... | @@ -27,7 +27,91 @@
class Config:
- """Configuration singleton."""
+ """Singleton class that manages the configuration of a Taipy application.
+
+ The `Config` singleton is the main entry point for configuring a Taipy application.
+ In particular, the class provides:
+
+ 1. Various methods to configu... | taipy/config/config.py | 26 | Python | 0.714 | suggestion | 113 | 51 | 51 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/config.py
PR Title: Improve ref man
BEFORE CODE:
- `configure_data_node`: Configure a data node adding and returning a `DataNodeConfig^`.
- `configure_task`: Configure a task adding and returning a `TaskConfig^`.
- `config... | ```suggestion
The configuration can be done in three ways: Python code, configuration files, or
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
- `configure_data_node`: Configure a data node adding and returning a `DataNodeConfig^`.
- `configure_task`: Configure a task adding and returning a `TaskConfig^`.
- `configure_scenario`: Configure a scenario adding and returning a `ScenarioConfig^`.
- `load`: Load a TOML configuration f... | ```suggestion
environment variables. All configuration manners are ultimately merged (overriding the previous way
``` | - `configure_data_node()^`: Configure a data node adding and returning a `DataNodeConfig^`.
- `configure_task()^`: Configure a task adding and returning a `TaskConfig^`.
- `configure_scenario()^`: Configure a scenario adding and returning a `ScenarioConfig^`.
- `load()^`: Load a TOML con... | @@ -27,7 +27,91 @@
class Config:
- """Configuration singleton."""
+ """Singleton class that manages the configuration of a Taipy application.
+
+ The `Config` singleton is the main entry point for configuring a Taipy application.
+ In particular, the class provides:
+
+ 1. Various methods to configu... | taipy/config/config.py | 26 | Python | 0.714 | suggestion | 131 | 51 | 51 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/config.py
PR Title: Improve ref man
BEFORE CODE: - `configure_data_node`: Configure a data node adding and returning a `DataNodeConfig^`.
- `configure_task`: Configure a task adding and returning a `TaskConfig^`.
- `configu... | ```suggestion
environment variables. All configuration manners are ultimately merged (overriding the previous way
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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 the License is distributed on
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied... | I don't understant why you duplicate the doc. | # 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 the License is distributed on
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied... | @@ -26,7 +26,91 @@ from .section import Section
from .unique_section import UniqueSection
class Config:
- """Configuration singleton."""
+ """Singleton class that manages the configuration of a Taipy application. | taipy/config/config.pyi | 26 | Python | 0.071 | refactor | 45 | 51 | 51 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/config.pyi
PR Title: Improve ref man
BEFORE CODE: # 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 unde... | I don't understant why you duplicate the doc. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
"""# Exceptions raised by the `taipy.config^` package."""
``` | # 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... | @@ -9,13 +9,5 @@
# 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.
-# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in co... | taipy/config/exceptions/__init__.py | 12 | Python | 0.714 | suggestion | 77 | 14 | 14 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/exceptions/__init__.py
PR Title: Improve ref man
BEFORE CODE: # 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 m... | ```suggestion
"""# Exceptions raised by the `taipy.config^` package."""
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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... | I don't understand this.
"The role of the subclasses of `Section^` is to define..."? | # 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... | @@ -18,9 +18,30 @@
class Section:
- """A Section as a consistent part of the Config.
+ """An abstract class representing a subdivision of the configuration class `Config^`.
+
+ Each Section implementation class defines a semantically consistent set of settings | taipy/config/section.py | 23 | Python | 0.357 | question | 87 | 48 | 48 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/section.py
PR Title: Improve ref man
BEFORE CODE: # 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 ... | I don't understand this.
"The role of the subclasses of `Section^` is to define..."? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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... | And DataNode itself right?
```suggestion
"""Classes related to data nodes."""
``` | # 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... | @@ -8,6 +8,7 @@
# 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 th... | taipy/core/data/__init__.py | 11 | Python | 0.571 | suggestion | 86 | 26 | 26 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/core/data/__init__.py
PR Title: Improve ref man
BEFORE CODE: # 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 obtai... | And DataNode itself right?
```suggestion
"""Classes related to data nodes."""
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
some functions should not be invoked in some specific contexts. You can protect
``` | # 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... | @@ -8,6 +8,19 @@
# 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 t... | taipy/core/reason/__init__.py | 14 | Python | 0.643 | suggestion | 99 | 39 | 39 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/core/reason/__init__.py
PR Title: Improve ref man
BEFORE CODE: # 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 obt... | ```suggestion
some functions should not be invoked in some specific contexts. You can protect
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
like a Boolean value: True if the operation can be performed and False otherwise. If
``` | # 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... | @@ -8,6 +8,19 @@
# 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 t... | taipy/core/reason/__init__.py | 16 | Python | 0.714 | suggestion | 104 | 41 | 41 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/core/reason/__init__.py
PR Title: Improve ref man
BEFORE CODE: # 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 obt... | ```suggestion
like a Boolean value: True if the operation can be performed and False otherwise. If
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
such calls by calling other methods that return a `ReasonCollection^`. This object can act
``` | # 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... | @@ -8,6 +8,19 @@
# 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 t... | taipy/core/reason/__init__.py | 15 | Python | 0.714 | suggestion | 110 | 40 | 40 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/core/reason/__init__.py
PR Title: Improve ref man
BEFORE CODE: # 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 obt... | ```suggestion
such calls by calling other methods that return a `ReasonCollection^`. This object can act
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
reasons as a list of `Reason^` objects.
``` | # 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... | @@ -8,6 +8,19 @@
# 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 t... | taipy/core/reason/__init__.py | 18 | Python | 0.571 | suggestion | 59 | 43 | 43 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/core/reason/__init__.py
PR Title: Improve ref man
BEFORE CODE: # 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 obt... | ```suggestion
reasons as a list of `Reason^` objects.
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
This package exposes the `ReasonCollection^` class and all
``` | # 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... | @@ -8,6 +8,19 @@
# 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 t... | taipy/core/reason/__init__.py | 20 | Python | 0.571 | suggestion | 78 | 44 | 44 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/core/reason/__init__.py
PR Title: Improve ref man
BEFORE CODE: # 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 obt... | ```suggestion
This package exposes the `ReasonCollection^` class and all
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
"""Package for the Taipy Rest API."""
``` | # 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... | @@ -8,7 +8,7 @@
# 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 th... | taipy/rest/api/__init__.py | 11 | Python | 0.571 | suggestion | 57 | 15 | 15 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | jrobinAV | Review this pull request change.
Language: Python
File: taipy/rest/api/__init__.py
PR Title: Improve ref man
BEFORE CODE: # 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... | ```suggestion
"""Package for the Taipy Rest API."""
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
The role of the subclasses of this class is to define semantically consistent sets of settings
``` | # 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... | @@ -18,9 +18,30 @@
class Section:
- """A Section as a consistent part of the Config.
+ """An abstract class representing a subdivision of the configuration class `Config^`.
+
+ Each Section implementation class defines a semantically consistent set of settings | taipy/config/section.py | 23 | Python | 0.714 | suggestion | 118 | 48 | 48 | false | Improve ref man | 1,827 | Avaiga/taipy | 12,680 | Python | jrobinAV | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/section.py
PR Title: Improve ref man
BEFORE CODE: # 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 ... | ```suggestion
The role of the subclasses of this class is to define semantically consistent sets of settings
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
@classmethod
def _cancel(cls, job: Union[str, Job]) -> None:
job = cls._get(job) if isinstance(job, str) else job
from .._orchestrator._orchestrator_factory import _OrchestratorFactory
_OrchestratorFactory._build_orchestrator().cancel_job(job)
@classmethod
def _get_latest(cls... | ```suggestion
if job:= cls._get(job, None) is None:
reason_collector._add_reason(job_id, EntityDoesNotExist(job_id))
return reason_collector
``` |
@classmethod
def _cancel(cls, job: Union[str, Job]) -> None:
job = cls._get(job) if isinstance(job, str) else job
from .._orchestrator._orchestrator_factory import _OrchestratorFactory
_OrchestratorFactory._build_orchestrator().cancel_job(job)
@classmethod
def _get_latest(cls... | @@ -92,9 +92,14 @@ def _is_deletable(cls, job: Union[Job, JobId]) -> ReasonCollection:
reason_collector = ReasonCollection()
if isinstance(job, str):
- job = cls._get(job)
+ job_id = job
+ job = cls._get(job, None) | taipy/core/job/_job_manager.py | 26 | Python | 0.714 | suggestion | 192 | 36 | 35 | false | feature/#1805 added checking if entity exists | 1,836 | Avaiga/taipy | 12,680 | Python | jrobinAV | toan-quach | Review this pull request change.
Language: Python
File: taipy/core/job/_job_manager.py
PR Title: feature/#1805 added checking if entity exists
BEFORE CODE:
@classmethod
def _cancel(cls, job: Union[str, Job]) -> None:
job = cls._get(job) if isinstance(job, str) else job
from .._orchestrator... | ```suggestion
if job:= cls._get(job, None) is None:
reason_collector._add_reason(job_id, EntityDoesNotExist(job_id))
return reason_collector
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
def _cancel(cls, job: Union[str, Job]) -> None:
job = cls._get(job) if isinstance(job, str) else job
from .._orchestrator._orchestrator_factory import _OrchestratorFactory
_OrchestratorFactory._build_orchestrator().cancel_job(job)
@classmethod
def _get_latest(cls, task: Task) -> O... | I believe we don't need that.
```suggestion
``` | def _cancel(cls, job: Union[str, Job]) -> None:
job = cls._get(job) if isinstance(job, str) else job
from .._orchestrator._orchestrator_factory import _OrchestratorFactory
_OrchestratorFactory._build_orchestrator().cancel_job(job)
@classmethod
def _get_latest(cls, task: Task) -> O... | @@ -92,9 +92,14 @@ def _is_deletable(cls, job: Union[Job, JobId]) -> ReasonCollection:
reason_collector = ReasonCollection()
if isinstance(job, str):
- job = cls._get(job)
+ job_id = job
+ job = cls._get(job, None)
+ else:
+ job_id = job.id | taipy/core/job/_job_manager.py | 26 | Python | 0.429 | suggestion | 49 | 34 | 33 | false | feature/#1805 added checking if entity exists | 1,836 | Avaiga/taipy | 12,680 | Python | jrobinAV | toan-quach | Review this pull request change.
Language: Python
File: taipy/core/job/_job_manager.py
PR Title: feature/#1805 added checking if entity exists
BEFORE CODE: def _cancel(cls, job: Union[str, Job]) -> None:
job = cls._get(job) if isinstance(job, str) else job
from .._orchestrator._orchestrator_fac... | I believe we don't need that.
```suggestion
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
_OrchestratorFactory._build_orchestrator().cancel_job(job)
@classmethod
def _get_latest(cls, task: Task) -> Optional[Job]:
jobs_of_task = list(filter(lambda job: task in job, cls._get_all()))
if len(jobs_of_task) == 0:
return None
if len(jobs_of_task) == 1:
... | From the previous comment, the case where the job can be None is already handled.
```suggestion
if not job.is_finished():
``` |
_OrchestratorFactory._build_orchestrator().cancel_job(job)
@classmethod
def _get_latest(cls, task: Task) -> Optional[Job]:
jobs_of_task = list(filter(lambda job: task in job, cls._get_all()))
if len(jobs_of_task) == 0:
return None
if len(jobs_of_task) == 1:
... | @@ -92,9 +92,14 @@ def _is_deletable(cls, job: Union[Job, JobId]) -> ReasonCollection:
reason_collector = ReasonCollection()
if isinstance(job, str):
- job = cls._get(job)
+ job_id = job
+ job = cls._get(job, None)
+ else:
+ job_id = job.id
- ... | taipy/core/job/_job_manager.py | 26 | Python | 0.857 | suggestion | 136 | 30 | 29 | false | feature/#1805 added checking if entity exists | 1,836 | Avaiga/taipy | 12,680 | Python | jrobinAV | toan-quach | Review this pull request change.
Language: Python
File: taipy/core/job/_job_manager.py
PR Title: feature/#1805 added checking if entity exists
BEFORE CODE:
_OrchestratorFactory._build_orchestrator().cancel_job(job)
@classmethod
def _get_latest(cls, task: Task) -> Optional[Job]:
jobs_of_tas... | From the previous comment, the case where the job can be None is already handled.
```suggestion
if not job.is_finished():
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
cls._dispatcher.stop(wait, timeout)
cls._dispatcher = None
return cls._dispatcher
@classmethod
def __build_standalone_job_dispatcher(cls, force_restart=False):
if isinstance(cls._dispatcher, _StandaloneJobDispatcher):
if force_restart:
cls._dispat... | I guess you ll want to use the _using_enterprise function from common package. | if cls._dispatcher is not None and not isinstance(cls._dispatcher, _DevelopmentJobDispatcher):
cls._dispatcher.stop(wait, timeout)
cls._dispatcher = None
return cls._dispatcher
@classmethod
def __build_standalone_job_dispatcher(cls, force_restart=False):
if isinstanc... | @@ -87,7 +87,13 @@ def __build_standalone_job_dispatcher(cls, force_restart=False):
def __build_development_job_dispatcher(cls):
if isinstance(cls._dispatcher, _StandaloneJobDispatcher):
cls._dispatcher.stop()
- cls._dispatcher = _DevelopmentJobDispatcher(typing.cast(_AbstractOrchestra... | taipy/core/_orchestrator/_orchestrator_factory.py | 26 | Python | 0.286 | suggestion | 78 | 42 | 43 | false | feature/#1805 added checking if entity exists | 1,836 | Avaiga/taipy | 12,680 | Python | jrobinAV | toan-quach | Review this pull request change.
Language: Python
File: taipy/core/_orchestrator/_orchestrator_factory.py
PR Title: feature/#1805 added checking if entity exists
BEFORE CODE: cls._dispatcher.stop(wait, timeout)
cls._dispatcher = None
return cls._dispatcher
@classmethod
def __bui... | I guess you ll want to use the _using_enterprise function from common package. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
if self.is_completed():
return self._status_change_records["COMPLETED"]
elif self.is_failed():
return self._status_change_records["FAILED"]
elif self.is_canceled():
return self._status_change_records["CANCELED"]
elif self.is... | can we replace hard-coded `"RUNNING"` with a constant instead? | if self.is_completed():
return self._status_change_records[Status.COMPLETED.name]
elif self.is_failed():
return self._status_change_records[Status.FAILED.name]
elif self.is_canceled():
return self._status_change_records[Status.CANCELED.... | @@ -148,36 +148,107 @@ def creation_date(self, val):
@property
@_self_reload(_MANAGER_NAME)
- def execution_started_at(self) -> Optional[datetime]:
- return self._execution_started_at
+ def submitted_time(self) -> datetime:
+ """Get the date time when the job was submitted.
- @execu... | taipy/core/job/job.py | 26 | Python | 0.429 | question | 63 | 51 | 51 | false | Feature/#1704 - Store the status changes in a records | 1,837 | Avaiga/taipy | 12,680 | Python | toan-quach | trgiangdo | Review this pull request change.
Language: Python
File: taipy/core/job/job.py
PR Title: Feature/#1704 - Store the status changes in a records
BEFORE CODE: if self.is_completed():
return self._status_change_records["COMPLETED"]
elif self.is_failed():
return sel... | can we replace hard-coded `"RUNNING"` with a constant instead? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
- If the job is not finished, the execution time is the duration
from the running time to the current time.
"""
if "RUNNING" not in self._status_change_records:
return None
if self.is_finished():
return (self.finished_time - self._status... | hmmm this might cause alot of reload yeah? | - If the job is not finished, the execution time is the duration
from the running time to the current time.
"""
if Status.RUNNING.name not in self._status_change_records:
return None
if self.is_finished():
return (self.finished_at - self... | @@ -148,36 +148,107 @@ def creation_date(self, val):
@property
@_self_reload(_MANAGER_NAME)
- def execution_started_at(self) -> Optional[datetime]:
- return self._execution_started_at
+ def submitted_time(self) -> datetime:
+ """Get the date time when the job was submitted.
- @execu... | taipy/core/job/job.py | 26 | Python | 0.143 | question | 43 | 51 | 51 | false | Feature/#1704 - Store the status changes in a records | 1,837 | Avaiga/taipy | 12,680 | Python | toan-quach | trgiangdo | Review this pull request change.
Language: Python
File: taipy/core/job/job.py
PR Title: Feature/#1704 - Store the status changes in a records
BEFORE CODE: - If the job is not finished, the execution time is the duration
from the running time to the current time.
"""
... | hmmm this might cause alot of reload yeah? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
return tp_get(self._submit_entity_id)
@property # type: ignore
@_self_reload(_MANAGER_NAME)
def status(self):
return self._status
@status.setter # type: ignore
@_self_setter(_MANAGER_NAME)
def status(self, val):
self._status_change_records[val.name] = datetime.now()
... | The wording time is confusing. Usually, the running time is the duration of a program run. HEre it is the instant. What about having APIs like:
is_submitted -> bool: Returns True if the job has submitted status, false otherwise.
submitted() -> None: Sets the status to submitted and returns None.
submitted_at -> d... | return tp_get(self._submit_entity_id)
@property # type: ignore
@_self_reload(_MANAGER_NAME)
def status(self):
return self._status
@status.setter # type: ignore
@_self_setter(_MANAGER_NAME)
def status(self, val):
self._status_change_records[val.name] = datetime.now()
... | @@ -148,36 +148,111 @@ def creation_date(self, val):
@property
@_self_reload(_MANAGER_NAME)
- def execution_started_at(self) -> Optional[datetime]:
- return self._execution_started_at
+ def submitted_time(self) -> datetime: | taipy/core/job/job.py | 26 | Python | 0.5 | nitpick | 460 | 51 | 51 | false | Feature/#1704 - Store the status changes in a records | 1,837 | Avaiga/taipy | 12,680 | Python | jrobinAV | trgiangdo | Review this pull request change.
Language: Python
File: taipy/core/job/job.py
PR Title: Feature/#1704 - Store the status changes in a records
BEFORE CODE: return tp_get(self._submit_entity_id)
@property # type: ignore
@_self_reload(_MANAGER_NAME)
def status(self):
return self._status
... | The wording time is confusing. Usually, the running time is the duration of a program run. HEre it is the instant. What about having APIs like:
is_submitted -> bool: Returns True if the job has submitted status, false otherwise.
submitted() -> None: Sets the status to submitted and returns None.
submitted_at -> d... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
).total_seconds()
return (datetime.now() - self._status_change_records[Status.PENDING.name]).total_seconds()
@property
@_self_reload(_MANAGER_NAME)
def blocked_duration(self) -> Optional[float]:
"""Get the duration of the job in the blocked state in seconds.
Returns:
... | Is it correct?
What if the job got blocked, unblocked(pending), running, and completed?
Your method returns the difference between the completion time and the blocked time. while we expect to return PENDING - BLOCKED.
Let me propose something like the following:
```suggestion
if self.is_blocked():
... | ).total_seconds()
return (datetime.now() - self._status_change_records[Status.PENDING.name]).total_seconds()
@property
@_self_reload(_MANAGER_NAME)
def blocked_duration(self) -> Optional[float]:
"""Get the duration of the job in the blocked state in seconds.
Returns:
... | @@ -148,36 +148,111 @@ def creation_date(self, val):
@property
@_self_reload(_MANAGER_NAME)
- def execution_started_at(self) -> Optional[datetime]:
- return self._execution_started_at
+ def submitted_time(self) -> datetime:
+ """Get the date time when the job was submitted.
- @execu... | taipy/core/job/job.py | 26 | Python | 1 | suggestion | 1,110 | 51 | 51 | false | Feature/#1704 - Store the status changes in a records | 1,837 | Avaiga/taipy | 12,680 | Python | jrobinAV | trgiangdo | Review this pull request change.
Language: Python
File: taipy/core/job/job.py
PR Title: Feature/#1704 - Store the status changes in a records
BEFORE CODE: ).total_seconds()
return (datetime.now() - self._status_change_records[Status.PENDING.name]).total_seconds()
@property
@_self_reloa... | Is it correct?
What if the job got blocked, unblocked(pending), running, and completed?
Your method returns the difference between the completion time and the blocked time. while we expect to return PENDING - BLOCKED.
Let me propose something like the following:
```suggestion
if self.is_blocked():
... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
assert all(isinstance(job.run_time, datetime) for job in jobs)
assert all(isinstance(job.finished_time, datetime) for job in jobs)
jobs_1s = jobs[0] if jobs[0].task.config_id == "task_config_id_1" else jobs[1]
jobs_2s = jobs[0] if jobs[0].task.config_id == "task_config_id_2" else jobs[1]
assert jobs... | Why not use the assert_true_after_time? It has been designed for that.
| assert all(isinstance(job.submitted_at, datetime) for job in jobs)
assert all(isinstance(job.run_at, datetime) for job in jobs)
assert all(isinstance(job.finished_at, datetime) for job in jobs)
jobs_1s = jobs[0] if jobs[0].task.config_id == "task_config_id_1" else jobs[1]
jobs_2s = jobs[0] if jobs[0... | @@ -562,19 +558,18 @@ def test_submit_duration_standalone_mode():
scenario = Scenario("scenario", {task_1, task_2}, {})
_ScenarioManager._set(scenario)
submission = taipy.submit(scenario)
- jobs = submission.jobs
- assert_true_after_time(jobs[1].is_completed)
+ while not all(job is not None an... | tests/core/_orchestrator/test_orchestrator__submit.py | 26 | Python | 0.286 | question | 72 | 39 | 38 | false | Feature/#1704 - Store the status changes in a records | 1,837 | Avaiga/taipy | 12,680 | Python | jrobinAV | trgiangdo | Review this pull request change.
Language: Python
File: tests/core/_orchestrator/test_orchestrator__submit.py
PR Title: Feature/#1704 - Store the status changes in a records
BEFORE CODE: assert all(isinstance(job.run_time, datetime) for job in jobs)
assert all(isinstance(job.finished_time, datetime) for job... | Why not use the assert_true_after_time? It has been designed for that.
| You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
orchestrator.run()
task_1 = Task("task_config_id_1", {}, task_sleep_1, [], [])
task_2 = Task("task_config_id_2", {}, task_sleep_2, [], [])
_TaskManager._set(task_1)
_TaskManager._set(task_2)
scenario = Scenario("scenario", {task_1, task_2}, {})
_ScenarioManager._set(scenario)
submissi... | This test is not only about submit duration anylonger. It should be renamed. | orchestrator = Orchestrator()
orchestrator.run()
task_1 = Task("task_config_id_1", {}, task_sleep_1, [], [])
task_2 = Task("task_config_id_2", {}, task_sleep_2, [], [])
_TaskManager._set(task_1)
_TaskManager._set(task_2)
scenario = Scenario("scenario", {task_1, task_2}, {})
_ScenarioM... | @@ -535,17 +534,14 @@ def test_submit_duration_development_mode():
jobs = submission.jobs
orchestrator.stop()
- assert all(isinstance(job.execution_started_at, datetime) for job in jobs)
- assert all(isinstance(job.execution_ended_at, datetime) for job in jobs)
+ assert all(isinstance(job.submitted... | tests/core/_orchestrator/test_orchestrator__submit.py | 26 | Python | 0.286 | suggestion | 76 | 51 | 51 | false | Feature/#1704 - Store the status changes in a records | 1,837 | Avaiga/taipy | 12,680 | Python | jrobinAV | trgiangdo | Review this pull request change.
Language: Python
File: tests/core/_orchestrator/test_orchestrator__submit.py
PR Title: Feature/#1704 - Store the status changes in a records
BEFORE CODE: orchestrator.run()
task_1 = Task("task_config_id_1", {}, task_sleep_1, [], [])
task_2 = Task("task_config_id_2", {},... | This test is not only about submit duration anylonger. It should be renamed. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
return (value, None)
@staticmethod
def _get_variable_hash_names(
gui: "Gui", attributes: t.Dict[str, t.Any], hash_names: t.Optional[t.Dict[str, str]] = None
) -> t.Dict[str, str]:
if hash_names is None:
hash_names = {}
hashes = {}
# Bind potential functio... | What would be the 'else' part? | _warn(f"Expression '{value}' cannot be evaluated.")
return (value, None)
@staticmethod
def _get_variable_hash_names(
gui: "Gui", attributes: t.Dict[str, t.Any], hash_names: t.Optional[t.Dict[str, str]] = None
) -> t.Dict[str, str]:
if hash_names is None:
... | @@ -153,18 +153,22 @@ def _get_variable_hash_names(
hashes = {}
# Bind potential function and expressions in self.attributes
for k, v in attributes.items():
- val = v
hash_name = hash_names.get(k)
if hash_name is None:
- if callable(v):
- ... | taipy/gui/_renderers/builder.py | 26 | Python | 0.071 | question | 30 | 51 | 51 | false | manage lambdas | 1,838 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | FredLL-Avaiga | Review this pull request change.
Language: Python
File: taipy/gui/_renderers/builder.py
PR Title: manage lambdas
BEFORE CODE: return (value, None)
@staticmethod
def _get_variable_hash_names(
gui: "Gui", attributes: t.Dict[str, t.Any], hash_names: t.Optional[t.Dict[str, str]] = None
) ->... | What would be the 'else' part? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
gui._bind_var_val(var_name, None)
else:
encoded_var_name = gui._bind_var(var_name)
var_val[var_name] = _getscopeattr_drill(gui, encoded_var_name)
var_map[var_name] ... | Not too sure about how and what happens if `lambda_expr` indeed,,, | if next((w for w in warns if w.category is TaipyGuiWarning), None):
gui._bind_var_val(var_name, None)
else:
encoded_var_name = gui._bind_var(var_name)
var_v... | @@ -136,14 +140,15 @@ def __save_expression(
expr_hash: t.Optional[str],
expr_evaluated: t.Optional[t.Any],
var_map: t.Dict[str, str],
+ lambda_expr: t.Optional[bool] = False,
):
if expr in self.__expr_to_hash:
expr_hash = self.__expr_to_hash[expr]
... | taipy/gui/utils/_evaluator.py | 26 | Python | 0.357 | suggestion | 66 | 51 | 51 | false | manage lambdas | 1,838 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | FredLL-Avaiga | Review this pull request change.
Language: Python
File: taipy/gui/utils/_evaluator.py
PR Title: manage lambdas
BEFORE CODE: gui._bind_var_val(var_name, None)
else:
encoded_var_name = gui._bind_var(var_name)
... | Not too sure about how and what happens if `lambda_expr` indeed,,, | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
def __parse_attribute_value(gui: "Gui", value) -> t.Tuple:
if isinstance(value, str) and gui._is_expression(value):
hash_value = gui._evaluate_expr(value)
try:
func = gui._get_user_function(hash_value)
if callable(func):
return (fun... | I like this naming very much 😃 | @staticmethod
def __parse_attribute_value(gui: "Gui", value) -> t.Tuple:
if isinstance(value, str) and gui._is_expression(value):
hash_value = gui._evaluate_expr(value)
try:
func = gui._get_user_function(hash_value)
if callable(func):
... | @@ -153,18 +153,24 @@ def _get_variable_hash_names(
hashes = {}
# Bind potential function and expressions in self.attributes
for k, v in attributes.items():
- val = v
hash_name = hash_names.get(k)
if hash_name is None:
- if callable(v):
- ... | taipy/gui/_renderers/builder.py | 26 | Python | 0.071 | style | 31 | 51 | 51 | false | manage lambdas | 1,838 | Avaiga/taipy | 12,680 | Python | dinhlongviolin1 | FredLL-Avaiga | Review this pull request change.
Language: Python
File: taipy/gui/_renderers/builder.py
PR Title: manage lambdas
BEFORE CODE: def __parse_attribute_value(gui: "Gui", value) -> t.Tuple:
if isinstance(value, str) and gui._is_expression(value):
hash_value = gui._evaluate_expr(value)
... | I like this naming very much 😃 | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
This callback gets invoked for every client connected to the application to update the value
of all the variables that are keys in *values*, in their specific `State^` instance. All
user interfaces reflect the change.
Arguments:
values: An optional dictionary where each key... | Should make this an importable utils |
This callback gets invoked for every client connected to the application to update the value
of all the variables that are keys in *values*, in their specific `State^` instance. All
user interfaces reflect the change.
Arguments:
values: An optional dictionary where each key... | @@ -1652,6 +1652,9 @@ def _is_in_brdcst_callback(self):
except RuntimeError:
return False
+ def _get_lambda_id(self, lambda_fn: LambdaType): | taipy/gui/gui.py | 26 | Python | 0.143 | suggestion | 36 | 51 | 51 | false | manage lambdas | 1,838 | Avaiga/taipy | 12,680 | Python | dinhlongviolin1 | FredLL-Avaiga | Review this pull request change.
Language: Python
File: taipy/gui/gui.py
PR Title: manage lambdas
BEFORE CODE:
This callback gets invoked for every client connected to the application to update the value
of all the variables that are keys in *values*, in their specific `State^` instance. All
... | Should make this an importable utils | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
The configuration can be done in three ways: Python code, configuration files, or
environment variables. All configuration manners are ultimately merged (overriding the previous way
way) to create a final applied configuration. Please refer to the
[advanced configuration]... | ```suggestion
??? example "Methods to manage the configuration"
```
or just
```suggestion
??? example "Manage the configuration"
``` | The configuration can be done in three ways: Python code, configuration files, or
environment variables. All configuration manners are ultimately merged (overriding the previous way
way) to create a final applied configuration. Please refer to the
[advanced configuration]... | @@ -74,43 +66,49 @@ def by_two(x: int):
Once the configuration is done, you can retrieve the configuration values using the exposed
attributes.
- !!! Example "Retrieve configuration values"
+ ??? Example "Retrieve configuration values"
```python
from taipy i... | taipy/config/config.py | 26 | Python | 0.714 | suggestion | 154 | 51 | 51 | false | Improve config doc and remove deprecated function. | 1,839 | Avaiga/taipy | 12,680 | Python | trgiangdo | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/config.py
PR Title: Improve config doc and remove deprecated function.
BEFORE CODE: The configuration can be done in three ways: Python code, configuration files, or
environment variables. All configuration manners are ulti... | ```suggestion
??? example "Methods to manage the configuration"
```
or just
```suggestion
??? example "Manage the configuration"
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
section from the user manual for more details.
2. Attributes and methods to retrieve the configuration values.
Once the configuration is done, you can retrieve the configuration values using the exposed
attributes.
??? Example "Retrieve configuration values"
```py... | ```suggestion
configuration. It returns an `IssueCollector^` containing all the
`Issue^`s found. The issues are logged to the console for debugging.
```
I don't get the final part of this sentence.
Maybe we can add "The issues are logged to the console for debugging". | section from the user manual for more details.
2. Attributes and methods to retrieve the configuration values.
Once the configuration is done, you can retrieve the configuration values using the exposed
attributes.
??? Example "Retrieve configuration values"
```py... | @@ -74,43 +66,49 @@ def by_two(x: int):
Once the configuration is done, you can retrieve the configuration values using the exposed
attributes.
- !!! Example "Retrieve configuration values"
+ ??? Example "Retrieve configuration values"
```python
from taipy i... | taipy/config/config.py | 26 | Python | 0.929 | bug | 306 | 51 | 51 | false | Improve config doc and remove deprecated function. | 1,839 | Avaiga/taipy | 12,680 | Python | trgiangdo | jrobinAV | Review this pull request change.
Language: Python
File: taipy/config/config.py
PR Title: Improve config doc and remove deprecated function.
BEFORE CODE: section from the user manual for more details.
2. Attributes and methods to retrieve the configuration values.
Once the configuration is ... | ```suggestion
configuration. It returns an `IssueCollector^` containing all the
`Issue^`s found. The issues are logged to the console for debugging.
```
I don't get the final part of this sentence.
Maybe we can add "The issues are logged to the console for debugging". | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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... | I dont understand why do we split by `[` here. | return _ElementApiGenerator.create_element_api(classname, element_name, default_property, properties, _Block)
@staticmethod
def create_control_api(
classname: str,
element_name: str,
default_property: str,
properties: t.Dict[str, str],
):
return _ElementApiGe... | @@ -139,5 +139,9 @@ def create_element_api(
return type(
classname,
(ElementBaseClass,),
- {"_ELEMENT_NAME": element_name, "_DEFAULT_PROPERTY": default_property, "_TYPES": properties},
+ {
+ "_ELEMENT_NAME": element_name,
+ "_DEFAULT... | taipy/gui/builder/_api_generator.py | 26 | Python | 0.214 | suggestion | 47 | 144 | 29 | false | Builder: Detect indexed property as callable | 1,842 | Avaiga/taipy | 12,680 | Python | dinhlongviolin1 | FredLL-Avaiga | Review this pull request change.
Language: Python
File: taipy/gui/builder/_api_generator.py
PR Title: Builder: Detect indexed property as callable
BEFORE CODE: # Copyright 2021-2024 Avaiga Private Limited
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in complia... | I dont understand why do we split by `[` here. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
#
# 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... | This makes sense, but was used nowhere else...
Well... I think it's worth keeping it!
However, you want to have a pattern here.
I would recommand: "<Element name> - <Usage section title>"
| # 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,30 @@
+# 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/selector_filter.py | 26 | Python | 0.429 | suggestion | 192 | 27 | 29 | false | selector example | 1,843 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | FredLL-Avaiga | Review this pull request change.
Language: Python
File: doc/gui/examples/controls/selector_filter.py
PR Title: selector example
BEFORE CODE: #
# 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
#... | This makes sense, but was used nowhere else...
Well... I think it's worth keeping it!
However, you want to have a pattern here.
I would recommand: "<Element name> - <Usage section title>"
| You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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 remove the h1. Keep it simple | # 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,30 @@
+# 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/selector_filter.py | 24 | Python | 0.143 | suggestion | 36 | 31 | 29 | false | selector example | 1,843 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | FredLL-Avaiga | Review this pull request change.
Language: Python
File: doc/gui/examples/controls/selector_filter.py
PR Title: selector example
BEFORE CODE: # 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 Lice... | Please remove the h1. Keep it simple | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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 remove the h1. Keep it simple | # 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,27 @@
+# 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/selector_icon.py | 21 | Python | 0.143 | suggestion | 36 | 28 | 26 | false | selector example | 1,843 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | FredLL-Avaiga | Review this pull request change.
Language: Python
File: doc/gui/examples/controls/selector_icon.py
PR Title: selector example
BEFORE CODE: # 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 Licens... | Please remove the h1. Keep it simple | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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... | Mixing 'filter' and styling to me is confusing. | # 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/selector_styling.py | 1 | Python | 0.071 | suggestion | 47 | 26 | 26 | false | selector example | 1,843 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | FredLL-Avaiga | Review this pull request change.
Language: Python
File: doc/gui/examples/controls/selector_styling.py
PR Title: selector example
BEFORE CODE: # 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 Lic... | Mixing 'filter' and styling to me is confusing. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. | |
".taipy-selector": {
"margin": "0px !important", # global margin
".MuiInputBase-root": { # input field
"background-color": "#572c5f38",
"color": "#221025",
"border-radius": "0px",
"height": "50px",
},
... | ```suggestion
Gui(page).run(title="Selector - Style every other row")
``` | # 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... | @@ -52,4 +52,4 @@
)
if __name__ == "__main__":
- Gui(page).run(title="Selector Filter")
+ Gui(page).run(title="Selector - Filter") | doc/gui/examples/controls/selector_styling.py | 26 | Python | 0.571 | suggestion | 79 | 27 | 54 | false | selector example | 1,843 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | FredLL-Avaiga | Review this pull request change.
Language: Python
File: doc/gui/examples/controls/selector_styling.py
PR Title: selector example
BEFORE CODE: ".taipy-selector": {
"margin": "0px !important", # global margin
".MuiInputBase-root": { # input field
"background-color": "... | ```suggestion
Gui(page).run(title="Selector - Style every other row")
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
"color_paper_light": "#ffffff",
# Background and elevation color for DARK MODE
"color_background_dark": "#152335",
"color_paper_dark": "#1f2f44",
# DEFINING FONTS
# Set main font family
"font_family": "Lato, Arial, sans-serif",
# DEFINING ROOT STYLES
# Set root margin
"root_margi... | why not keep localhost everywhere ? | "color_paper_light": "#ffffff",
# Background and elevation color for DARK MODE
"color_background_dark": "#152335",
"color_paper_dark": "#1f2f44",
# DEFINING FONTS
# Set main font family
"font_family": "Lato, Arial, sans-serif",
# DEFINING ROOT STYLES
# Set root margin
"root_margi... | @@ -46,7 +46,7 @@
"change_delay": None,
"chart_dark_template": None,
"base_url": "/",
- "client_url": "http://localhost:5000",
+ "client_url": "http://127.0.0.1:5000", | taipy/gui/_default_config.py | 26 | Python | 0.071 | question | 35 | 51 | 51 | false | add sso hooks | 1,854 | Avaiga/taipy | 12,680 | Python | FredLL-Avaiga | dinhlongviolin1 | Review this pull request change.
Language: Python
File: taipy/gui/_default_config.py
PR Title: add sso hooks
BEFORE CODE: "color_paper_light": "#ffffff",
# Background and elevation color for DARK MODE
"color_background_dark": "#152335",
"color_paper_dark": "#1f2f44",
# DEFINING FONTS
# Set m... | why not keep localhost everywhere ? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
section_clazz,
attribute_name: str,
default: Section,
configuration_methods: List[tuple],
add_to_unconflicted_sections: bool = False,
):
Config._register_default(default)
if issubclass(section_clazz, UniqueSection):
setattr(Config, attribute_name, Config.unique_sections[section_claz... | I understand that it's for Databrick.
Can you give an example how can this method being used? | # 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... | @@ -105,3 +105,9 @@ def _inject_section(
for exposed_configuration_method, configuration_method in configuration_methods:
setattr(Config, exposed_configuration_method, configuration_method)
+
+
+@_config_doc
+def _inject_method(configuration_methods: List[tuple]):
+ for exposed_configuration_method, ... | taipy/config/__init__.py | 26 | Python | 0.286 | question | 96 | 27 | 106 | false | Bug/Fix failing issue on enterprise due to import manager | 1,865 | Avaiga/taipy | 12,680 | Python | trgiangdo | toan-quach | Review this pull request change.
Language: Python
File: taipy/config/__init__.py
PR Title: Bug/Fix failing issue on enterprise due to import manager
BEFORE CODE: section_clazz,
attribute_name: str,
default: Section,
configuration_methods: List[tuple],
add_to_unconflicted_sections: bool = False,
... | I understand that it's for Databrick.
Can you give an example how can this method being used? | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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 importlib import util
def _check_dependency_is_installed(module_name: str, package_name: str) -> None:
"""
... | The official name is Enterprise Edition. Plus Checker is used in another context, to verify the consistency of config sections. I would propose the following names:
- EnterpriseEditionHelper
- EnterpriseEditionUtils
- EnterpriseEditionContext
What do you think?
| # 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 importlib import util
def _check_dependency_is_installed(module_name: str, package_name: str) -> None:
"""
... | @@ -34,5 +31,10 @@ def _check_dependency_is_installed(module_name: str, package_name: str) -> None:
)
-def _using_enterprise() -> bool:
- return util.find_spec(_TAIPY_ENTERPRISE_MODULE) is not None
+class EnterpriseChecker: | taipy/core/common/_check_dependencies.py | 26 | Python | 0.5 | refactor | 269 | 33 | 33 | false | Bug/Fix failing issue on enterprise due to import manager | 1,865 | Avaiga/taipy | 12,680 | Python | jrobinAV | toan-quach | Review this pull request change.
Language: Python
File: taipy/core/common/_check_dependencies.py
PR Title: Bug/Fix failing issue on enterprise due to import manager
BEFORE CODE: # an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language g... | The official name is Enterprise Edition. Plus Checker is used in another context, to verify the consistency of config sections. I would propose the following names:
- EnterpriseEditionHelper
- EnterpriseEditionUtils
- EnterpriseEditionContext
What do you think?
| You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
or written. \n
- _"aws _s3_object_parameters"_ `(str)`: A dictionary of additional arguments to be passed to interact with
the AWS service\n
"""
__STORAGE_TYPE = "s3_object"
__AWS_ACCESS_KEY_ID = "aws_access_key"
__AWS_SECRET_ACCESS_KEY = "aws_secret... | Why are these properties removed?
FYI, these are properties that are required for the DataNode entity | __AWS_ACCESS_KEY_ID = "aws_access_key"
__AWS_SECRET_ACCESS_KEY = "aws_secret_access_key"
__AWS_STORAGE_BUCKET_NAME = "aws_s3_bucket_name"
__AWS_S3_OBJECT_KEY = "aws_s3_object_key"
__AWS_REGION = "aws_region"
__AWS_S3_CLIENT_PARAMETERS = "aws_s3_client_parameters"
__AWS_S3_GET_OBJECT_PARAMETE... | @@ -86,17 +86,7 @@ def __init__(
self,
config_id: str,
scope: Scope,
- id: Optional[DataNodeId] = None,
- owner_id: Optional[str] = None,
- parent_ids: Optional[Set[str]] = None,
- last_edit_date: Optional[datetime] = None,
- edits: Optional[List[Edit]] = No... | taipy/core/data/aws_s3.py | 26 | Python | 0.429 | question | 104 | 51 | 51 | false | feature/#1858-add-s3-object-data-node | 1,868 | Avaiga/taipy | 12,680 | Python | trgiangdo | AdeshGhadage | Review this pull request change.
Language: Python
File: taipy/core/data/aws_s3.py
PR Title: feature/#1858-add-s3-object-data-node
BEFORE CODE: or written. \n
- _"aws _s3_object_parameters"_ `(str)`: A dictionary of additional arguments to be passed to interact with
... | Why are these properties removed?
FYI, these are properties that are required for the DataNode entity | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
def __init__(
self,
config_id: str,
scope: Scope,
**properties: Any,
) -> None:
_check_dependency_is_installed("S3 Data Node", "boto3")
if properties is None:
properties = {}
required = self._REQUIRED_PROPERTIES
if missing := set(requir... | The arguments for [`boto3.client()`](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html#boto3.session.Session.client) and [`S3.Client.get_object()`](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3/client/get_object.html) and [`S3.Client.put_object()`](https... | id: Optional[DataNodeId] = None,
owner_id: Optional[str] = None,
parent_ids: Optional[Set[str]] = None,
last_edit_date: Optional[datetime] = None,
edits: Optional[List[Edit]] = None,
version: str = None,
validity_period: Optional[timedelta] = None,
edit_in... | @@ -109,23 +99,15 @@ def __init__(
super().__init__(
config_id,
scope,
- id,
- owner_id,
- parent_ids,
- last_edit_date,
- edits,
- version or _VersionManagerFactory._build_manager()._get_latest_version(),
- ... | taipy/core/data/aws_s3.py | 26 | Python | 0.571 | suggestion | 873 | 51 | 51 | false | feature/#1858-add-s3-object-data-node | 1,868 | Avaiga/taipy | 12,680 | Python | trgiangdo | AdeshGhadage | Review this pull request change.
Language: Python
File: taipy/core/data/aws_s3.py
PR Title: feature/#1858-add-s3-object-data-node
BEFORE CODE: def __init__(
self,
config_id: str,
scope: Scope,
**properties: Any,
) -> None:
_check_dependency_is_installed("S3 Data Node"... | The arguments for [`boto3.client()`](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/core/session.html#boto3.session.Session.client) and [`S3.Client.get_object()`](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/s3/client/get_object.html) and [`S3.Client.put_object()`](https... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
editor_id (Optional[str]): The identifier of the user who is currently editing the data node.
editor_expiration_date (Optional[datetime]): The expiration date of the editor lock.
properties (dict[str, Any]): A dictionary of additional properties. Note that the
_properties_ parameter ... | We can remove the `__AWS_S3_OBJECT_PARAMETERS` here and elsewhere. | passed to the Amazon Web Services (AWS) S3 client get function for
advanced reading use cases. <br/>
Each parameter key must match the name of a parameter of the
`boto3.client.get_object` API.
- *aws_s3_put_object_parameters* (`Optional[dict]`): Additional parameters to be
pa... | @@ -74,6 +74,10 @@ class S3ObjectDataNode(DataNode):
__AWS_S3_OBJECT_KEY = "aws_s3_object_key"
__AWS_REGION = "aws_region"
__AWS_S3_OBJECT_PARAMETERS = "aws_s3_object_parameters" | taipy/core/data/aws_s3.py | 26 | Python | 0.429 | suggestion | 66 | 51 | 51 | false | feature/#1858-add-s3-object-data-node | 1,868 | Avaiga/taipy | 12,680 | Python | trgiangdo | AdeshGhadage | Review this pull request change.
Language: Python
File: taipy/core/data/aws_s3.py
PR Title: feature/#1858-add-s3-object-data-node
BEFORE CODE: editor_id (Optional[str]): The identifier of the user who is currently editing the data node.
editor_expiration_date (Optional[datetime]): The expiration dat... | We can remove the `__AWS_S3_OBJECT_PARAMETERS` here and elsewhere. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
_OPTIONAL_DRIVER_MONGO_PROPERTY = "db_driver"
_OPTIONAL_DB_EXTRA_ARGS_MONGO_PROPERTY = "db_extra_args"
# Pickle
_OPTIONAL_DEFAULT_PATH_PICKLE_PROPERTY = "default_path"
_OPTIONAL_DEFAULT_DATA_PICKLE_PROPERTY = "default_data"
# JSON
_OPTIONAL_ENCODER_JSON_PROPERTY = "encoder"
_OPTIONAL_DEC... | ```suggestion
```
This needs to be removed as well I believe | _OPTIONAL_DEFAULT_PATH_JSON_PROPERTY = "default_path"
# Parquet
_OPTIONAL_EXPOSED_TYPE_PARQUET_PROPERTY = "exposed_type"
_OPTIONAL_DEFAULT_PATH_PARQUET_PROPERTY = "default_path"
_OPTIONAL_ENGINE_PARQUET_PROPERTY = "engine"
_OPTIONAL_COMPRESSION_PARQUET_PROPERTY = "compression"
_OPTIONAL_READ... | @@ -153,6 +153,9 @@ class DataNodeConfig(Section):
_REQUIRED_AWS_STORAGE_BUCKET_NAME_PROPERTY = "aws_s3_bucket_name"
_REQUIRED_AWS_S3_OBJECT_KEY_PROPERTY = "aws_s3_object_key"
_OPTIONAL_AWS_REGION_PROPERTY = "aws_region"
+ _OPTIONAL_AWS_S3_CLIENT_PARAMETERS_PROPERTY = "aws_s3_client_parameters"
+ _... | taipy/core/config/data_node_config.py | 26 | Python | 0.643 | suggestion | 64 | 51 | 51 | false | feature/#1858-add-s3-object-data-node | 1,868 | Avaiga/taipy | 12,680 | Python | trgiangdo | AdeshGhadage | Review this pull request change.
Language: Python
File: taipy/core/config/data_node_config.py
PR Title: feature/#1858-add-s3-object-data-node
BEFORE CODE: _OPTIONAL_DRIVER_MONGO_PROPERTY = "db_driver"
_OPTIONAL_DB_EXTRA_ARGS_MONGO_PROPERTY = "db_extra_args"
# Pickle
_OPTIONAL_DEFAULT_PATH_PICKLE_PRO... | ```suggestion
```
This needs to be removed as well I believe | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
[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 length list o... | ```suggestion
return cls.__configure(id, DataNodeConfig._STORAGE_TYPE_VALUE_S3_OBJECT, scope, validity_period, **properties)
```
There should not be a tab here | to write the data to.
aws_s3_object_key (str): The Amazon Web Services (AWS) S3 object key to read
or write.
aws_region (Optional[str]): Self-contained geographic area where Amazon Web Services (AWS)
infrastructure is located.
aws_s3_cl... | @@ -1121,10 +1127,13 @@ def _configure_s3_object(
if aws_region is not None:
properties[cls._OPTIONAL_AWS_REGION_PROPERTY] = aws_region
- if aws_s3_object_parameters is not None:
- properties[cls._OPTIONAL_AWS_S3_OBJECT_PARAMETERS_PROPERTY] = aws_s3_object_parameters
-
- ... | taipy/core/config/data_node_config.py | 26 | Python | 0.929 | suggestion | 174 | 39 | 51 | false | feature/#1858-add-s3-object-data-node | 1,868 | Avaiga/taipy | 12,680 | Python | trgiangdo | AdeshGhadage | Review this pull request change.
Language: Python
File: taipy/core/config/data_node_config.py
PR Title: feature/#1858-add-s3-object-data-node
BEFORE CODE: [page](../../userman/scenario_features/task-orchestration/scenario-config.md#from-task-configurations)
for more details).
... | ```suggestion
return cls.__configure(id, DataNodeConfig._STORAGE_TYPE_VALUE_S3_OBJECT, scope, validity_period, **properties)
```
There should not be a tab here | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
)
@classmethod
def _configure_s3_object(
cls,
id: str,
aws_access_key: str,
aws_secret_access_key: str,
aws_s3_bucket_name: str,
aws_s3_object_key: str,
aws_region: Optional[str] = None,
aws_s3_client_parameters: Optional[Dict[str, Any]] =... | ```suggestion
aws_s3_object_key (str): The Amazon Web Services (AWS) S3 object key to read
or write.
``` | properties[cls._OPTIONAL_PORT_MONGO_PROPERTY] = db_port
if db_driver is not None:
properties[cls._OPTIONAL_DRIVER_MONGO_PROPERTY] = db_driver
if db_extra_args is not None:
properties[cls._OPTIONAL_DB_EXTRA_ARGS_MONGO_PROPERTY] = db_extra_args
return cls.__con... | @@ -1093,10 +1099,12 @@ def _configure_s3_object(
aws_access_key (str): Amazon Web Services ID for to identify account.
aws_secret_access_key (str): Amazon Web Services access key to authenticate programmatic requests.
aws_s3_bucket_name (str): The bucket in S3 to read from and to... | taipy/core/config/data_node_config.py | 26 | Python | 0.714 | suggestion | 135 | 51 | 51 | false | feature/#1858-add-s3-object-data-node | 1,868 | Avaiga/taipy | 12,680 | Python | jrobinAV | AdeshGhadage | Review this pull request change.
Language: Python
File: taipy/core/config/data_node_config.py
PR Title: feature/#1858-add-s3-object-data-node
BEFORE CODE: )
@classmethod
def _configure_s3_object(
cls,
id: str,
aws_access_key: str,
aws_secret_access_key: str,
... | ```suggestion
aws_s3_object_key (str): The Amazon Web Services (AWS) S3 object key to read
or write.
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
id, DataNodeConfig._STORAGE_TYPE_VALUE_MONGO_COLLECTION, scope, validity_period, **properties
)
@classmethod
def _configure_s3_object(
cls,
id: str,
aws_access_key: str,
aws_secret_access_key: str,
aws_s3_bucket_name: str,
aws_s3_object_key: s... | ```suggestion
aws_access_key (str): Amazon Web Services (AWS) ID for to identify account.
aws_secret_access_key (str): Amazon Web Services (AWS) access key to authenticate
programmatic requests.
aws_s3_bucket_name (str): The Amazon Web Services (AWS) S3 bucket to ... | if db_port is not None:
properties[cls._OPTIONAL_PORT_MONGO_PROPERTY] = db_port
if db_driver is not None:
properties[cls._OPTIONAL_DRIVER_MONGO_PROPERTY] = db_driver
if db_extra_args is not None:
properties[cls._OPTIONAL_DB_EXTRA_ARGS_MONGO_PROPERTY] = db_extr... | @@ -1093,10 +1099,12 @@ def _configure_s3_object(
aws_access_key (str): Amazon Web Services ID for to identify account.
aws_secret_access_key (str): Amazon Web Services access key to authenticate programmatic requests.
aws_s3_bucket_name (str): The bucket in S3 to read from and to... | taipy/core/config/data_node_config.py | 26 | Python | 0.786 | security | 378 | 51 | 51 | false | feature/#1858-add-s3-object-data-node | 1,868 | Avaiga/taipy | 12,680 | Python | jrobinAV | AdeshGhadage | Review this pull request change.
Language: Python
File: taipy/core/config/data_node_config.py
PR Title: feature/#1858-add-s3-object-data-node
BEFORE CODE: id, DataNodeConfig._STORAGE_TYPE_VALUE_MONGO_COLLECTION, scope, validity_period, **properties
)
@classmethod
def _configure_s3_objec... | ```suggestion
aws_access_key (str): Amazon Web Services (AWS) ID for to identify account.
aws_secret_access_key (str): Amazon Web Services (AWS) access key to authenticate
programmatic requests.
aws_s3_bucket_name (str): The Amazon Web Services (AWS) S3 bucket to ... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
def _configure_s3_object(
cls,
id: str,
aws_access_key: str,
aws_secret_access_key: str,
aws_s3_bucket_name: str,
aws_s3_object_key: str,
aws_region: Optional[str] = None,
aws_s3_client_parameters: Optional[Dict[str, Any]] = None,
aws_s3_get_ob... | ```suggestion
aws_s3_client_parameters (Optional[dict]): Additional parameters for advanced use
cases to be passed to the Amazon Web Services (AWS) S3 client.<br/>
Each parameter key must match the name of a parameter of the
`boto3.session.Session.client`... | if db_extra_args is not None:
properties[cls._OPTIONAL_DB_EXTRA_ARGS_MONGO_PROPERTY] = db_extra_args
return cls.__configure(
id, DataNodeConfig._STORAGE_TYPE_VALUE_MONGO_COLLECTION, scope, validity_period, **properties
)
@classmethod
def _configure_s3_object(
... | @@ -1093,10 +1099,12 @@ def _configure_s3_object(
aws_access_key (str): Amazon Web Services ID for to identify account.
aws_secret_access_key (str): Amazon Web Services access key to authenticate programmatic requests.
aws_s3_bucket_name (str): The bucket in S3 to read from and to... | taipy/core/config/data_node_config.py | 26 | Python | 0.857 | suggestion | 330 | 51 | 51 | false | feature/#1858-add-s3-object-data-node | 1,868 | Avaiga/taipy | 12,680 | Python | jrobinAV | AdeshGhadage | Review this pull request change.
Language: Python
File: taipy/core/config/data_node_config.py
PR Title: feature/#1858-add-s3-object-data-node
BEFORE CODE: def _configure_s3_object(
cls,
id: str,
aws_access_key: str,
aws_secret_access_key: str,
aws_s3_bucket_name: str,
... | ```suggestion
aws_s3_client_parameters (Optional[dict]): Additional parameters for advanced use
cases to be passed to the Amazon Web Services (AWS) S3 client.<br/>
Each parameter key must match the name of a parameter of the
`boto3.session.Session.client`... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
cls,
id: str,
aws_access_key: str,
aws_secret_access_key: str,
aws_s3_bucket_name: str,
aws_s3_object_key: str,
aws_region: Optional[str] = None,
aws_s3_client_parameters: Optional[Dict[str, Any]] = None,
aws_s3_get_object_parameters: Optional[Dict... | ```suggestion
aws_s3_get_object_parameters (Optional[dict]): Additional parameters to be
passed to the Amazon Web Services (AWS) S3 client get function for
advanced reading use cases. <br/>
Each parameter key must match the name of a parameter of the
... | properties[cls._OPTIONAL_DB_EXTRA_ARGS_MONGO_PROPERTY] = db_extra_args
return cls.__configure(
id, DataNodeConfig._STORAGE_TYPE_VALUE_MONGO_COLLECTION, scope, validity_period, **properties
)
@classmethod
def _configure_s3_object(
cls,
id: str,
aw... | @@ -1093,10 +1099,12 @@ def _configure_s3_object(
aws_access_key (str): Amazon Web Services ID for to identify account.
aws_secret_access_key (str): Amazon Web Services access key to authenticate programmatic requests.
aws_s3_bucket_name (str): The bucket in S3 to read from and to... | taipy/core/config/data_node_config.py | 26 | Python | 0.857 | suggestion | 369 | 51 | 51 | false | feature/#1858-add-s3-object-data-node | 1,868 | Avaiga/taipy | 12,680 | Python | jrobinAV | AdeshGhadage | Review this pull request change.
Language: Python
File: taipy/core/config/data_node_config.py
PR Title: feature/#1858-add-s3-object-data-node
BEFORE CODE: cls,
id: str,
aws_access_key: str,
aws_secret_access_key: str,
aws_s3_bucket_name: str,
aws_s3_object_key: str,
... | ```suggestion
aws_s3_get_object_parameters (Optional[dict]): Additional parameters to be
passed to the Amazon Web Services (AWS) S3 client get function for
advanced reading use cases. <br/>
Each parameter key must match the name of a parameter of the
... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
id: str,
aws_access_key: str,
aws_secret_access_key: str,
aws_s3_bucket_name: str,
aws_s3_object_key: str,
aws_region: Optional[str] = None,
aws_s3_client_parameters: Optional[Dict[str, Any]] = None,
aws_s3_get_object_parameters: Optional[Dict[str, Any]] =... | ```suggestion
aws_s3_put_object_parameters (Optional[dict]): Additional parameters to be
passed to the Amazon Web Services (AWS) S3 client put function for
advanced writing use cases. <br/>
Each parameter key must match the name of a parameter of the
... |
return cls.__configure(
id, DataNodeConfig._STORAGE_TYPE_VALUE_MONGO_COLLECTION, scope, validity_period, **properties
)
@classmethod
def _configure_s3_object(
cls,
id: str,
aws_access_key: str,
aws_secret_access_key: str,
aws_s3_bucket_name: ... | @@ -1093,10 +1099,12 @@ def _configure_s3_object(
aws_access_key (str): Amazon Web Services ID for to identify account.
aws_secret_access_key (str): Amazon Web Services access key to authenticate programmatic requests.
aws_s3_bucket_name (str): The bucket in S3 to read from and to... | taipy/core/config/data_node_config.py | 26 | Python | 0.857 | suggestion | 369 | 51 | 51 | false | feature/#1858-add-s3-object-data-node | 1,868 | Avaiga/taipy | 12,680 | Python | jrobinAV | AdeshGhadage | Review this pull request change.
Language: Python
File: taipy/core/config/data_node_config.py
PR Title: feature/#1858-add-s3-object-data-node
BEFORE CODE: id: str,
aws_access_key: str,
aws_secret_access_key: str,
aws_s3_bucket_name: str,
aws_s3_object_key: str,
aws_re... | ```suggestion
aws_s3_put_object_parameters (Optional[dict]): Additional parameters to be
passed to the Amazon Web Services (AWS) S3 client put function for
advanced writing use cases. <br/>
Each parameter key must match the name of a parameter of the
... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
the current version is used.
validity_period (Optional[timedelta]): The duration implemented as a timedelta since the last edit date for
which the data node can be considered up-to-date. Once the validity period has passed, the data node is
considered stale and relevant tasks... | We don't document the Data node attributes like that anymore. We add a new docstring for each public attribute right after its declaration. In this class, None of the attributes are directly exposed (only the ones from the parent classes), so there is nothing to add at the attribute level.
However, we can describe w... | Services (AWS) infrastructure is located.
- *aws_s3_object_parameters* (`Optional[dict[str, any]]`): A dictionary of
additional arguments to be passed into the AWS S3 bucket access string.
- *aws_s3_client_parameters* (`Optional[dict]`): Additional parameters for advanced
use cases to be... | @@ -29,22 +29,43 @@
class S3ObjectDataNode(DataNode):
"""Data Node object stored in an Amazon Web Service S3 Bucket.
- The *properties* attribute must contain the following required entries:
-
- - *aws_access_key* (`str`): Amazon Web Services ID for to identify account
- - *aws_secret_access_key* (`str... | taipy/core/data/aws_s3.py | 26 | Python | 0.857 | security | 2,250 | 51 | 51 | false | feature/#1858-add-s3-object-data-node | 1,868 | Avaiga/taipy | 12,680 | Python | jrobinAV | AdeshGhadage | Review this pull request change.
Language: Python
File: taipy/core/data/aws_s3.py
PR Title: feature/#1858-add-s3-object-data-node
BEFORE CODE: the current version is used.
validity_period (Optional[timedelta]): The duration implemented as a timedelta since the last edit date for
whic... | We don't document the Data node attributes like that anymore. We add a new docstring for each public attribute right after its declaration. In this class, None of the attributes are directly exposed (only the ones from the parent classes), so there is nothing to add at the attribute level.
However, we can describe w... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# specific language governing permissions and limitations under the License.
from datetime import datetime, timedelta
from importlib import util
from typing import Any, Dict, List, Optional, Set
from ..common._check_dependencies import _check_dependency_is_installed
if util.find_spec("boto3"):
import boto3
from... | ```suggestion
- *aws_secret_access_key* (`str`): Amazon Web Services (AWS) access key to
``` | # specific language governing permissions and limitations under the License.
from datetime import datetime, timedelta
from importlib import util
from typing import Any, Dict, List, Optional, Set
from ..common._check_dependencies import _check_dependency_is_installed
if util.find_spec("boto3"):
import boto3
from... | @@ -30,21 +30,35 @@ class S3ObjectDataNode(DataNode):
"""Data Node object stored in an Amazon Web Service S3 Bucket.
The *properties* attribute must contain the following required entries:
-
- - *aws_access_key* (`str`): Amazon Web Services ID for to identify account
- - *aws_secret_access_key* (`str`... | taipy/core/data/aws_s3.py | 26 | Python | 0.571 | security | 98 | 51 | 51 | false | feature/#1858-add-s3-object-data-node | 1,868 | Avaiga/taipy | 12,680 | Python | jrobinAV | AdeshGhadage | Review this pull request change.
Language: Python
File: taipy/core/data/aws_s3.py
PR Title: feature/#1858-add-s3-object-data-node
BEFORE CODE: # specific language governing permissions and limitations under the License.
from datetime import datetime, timedelta
from importlib import util
from typing import Any, Dic... | ```suggestion
- *aws_secret_access_key* (`str`): Amazon Web Services (AWS) access key to
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
authenticate programmatic requests.
- *aws_s3_bucket_name* (`str`): The Amazon Web Services (AWS) S3 bucket to read
from and to write the data to.
- *aws_s3_object_key* (`str`): The Amazon Web Services (AWS) S3 object key to read
or write.
The *properties* attribute can also... | ```suggestion
- *aws_region* (`Optional[str]`): Self-contained geographic area where Amazon Web
Services (AWS) infrastructure is located.
- *aws_s3_object_parameters* (`Optional[dict[str, any]]`): A dictionary of
additional arguments to be passed into the AWS S3 bucket access string.
... | - *aws_s3_bucket_name* (`str`): The Amazon Web Services (AWS) S3 bucket to read
from and to write the data to.
- *aws_s3_object_key* (`str`): The Amazon Web Services (AWS) S3 object key to read
or write.
The *properties* attribute can also contain the following optional entries:
- *aws_... | @@ -30,21 +30,35 @@ class S3ObjectDataNode(DataNode):
"""Data Node object stored in an Amazon Web Service S3 Bucket.
The *properties* attribute must contain the following required entries:
-
- - *aws_access_key* (`str`): Amazon Web Services ID for to identify account
- - *aws_secret_access_key* (`str`... | taipy/core/data/aws_s3.py | 26 | Python | 0.857 | suggestion | 1,238 | 51 | 51 | false | feature/#1858-add-s3-object-data-node | 1,868 | Avaiga/taipy | 12,680 | Python | jrobinAV | AdeshGhadage | Review this pull request change.
Language: Python
File: taipy/core/data/aws_s3.py
PR Title: feature/#1858-add-s3-object-data-node
BEFORE CODE: authenticate programmatic requests.
- *aws_s3_bucket_name* (`str`): The Amazon Web Services (AWS) S3 bucket to read
from and to write the data to.
-... | ```suggestion
- *aws_region* (`Optional[str]`): Self-contained geographic area where Amazon Web
Services (AWS) infrastructure is located.
- *aws_s3_object_parameters* (`Optional[dict[str, any]]`): A dictionary of
additional arguments to be passed into the AWS S3 bucket access string.
... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
from ..common._check_dependencies import _check_dependency_is_installed
if util.find_spec("boto3"):
import boto3
from taipy.common.config.common.scope import Scope
from .._version._version_manager_factory import _VersionManagerFactory
from ..exceptions.exceptions import MissingRequiredProperty
from .data_node im... | ```suggestion
- *aws_s3_bucket_name* (`str`): The Amazon Web Services (AWS) S3 bucket to read
from and to write the data to.
- *aws_s3_object_key* (`str`): The Amazon Web Services (AWS) S3 object key to read
or write.
``` | from ..common._check_dependencies import _check_dependency_is_installed
if util.find_spec("boto3"):
import boto3
from taipy.common.config.common.scope import Scope
from .._version._version_manager_factory import _VersionManagerFactory
from ..exceptions.exceptions import MissingRequiredProperty
from .data_node im... | @@ -30,21 +30,35 @@ class S3ObjectDataNode(DataNode):
"""Data Node object stored in an Amazon Web Service S3 Bucket.
The *properties* attribute must contain the following required entries:
-
- - *aws_access_key* (`str`): Amazon Web Services ID for to identify account
- - *aws_secret_access_key* (`str`... | taipy/core/data/aws_s3.py | 26 | Python | 0.786 | suggestion | 252 | 51 | 51 | false | feature/#1858-add-s3-object-data-node | 1,868 | Avaiga/taipy | 12,680 | Python | jrobinAV | AdeshGhadage | Review this pull request change.
Language: Python
File: taipy/core/data/aws_s3.py
PR Title: feature/#1858-add-s3-object-data-node
BEFORE CODE: from ..common._check_dependencies import _check_dependency_is_installed
if util.find_spec("boto3"):
import boto3
from taipy.common.config.common.scope import Scope
fr... | ```suggestion
- *aws_s3_bucket_name* (`str`): The Amazon Web Services (AWS) S3 bucket to read
from and to write the data to.
- *aws_s3_object_key* (`str`): The Amazon Web Services (AWS) S3 object key to read
or write.
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
<|{value}|input|active=false|>
```
Simpler is better. | # 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,25 @@
+# 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/input_active.py | 21 | Python | 0.643 | suggestion | 70 | 26 | 26 | false | Input example | 1,880 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | namnguyen20999 | Review this pull request change.
Language: Python
File: doc/gui/examples/controls/input_active.py
PR Title: Input example
BEFORE CODE: # 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. Y... | ```suggestion
<|{value}|input|active=false|>
```
Simpler is better. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
value = 20
```
Not 'init' for very long, normally... | # 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,25 @@
+# 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/input_active.py | 18 | Python | 0.571 | suggestion | 69 | 26 | 26 | false | Input example | 1,880 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | namnguyen20999 | Review this pull request change.
Language: Python
File: doc/gui/examples/controls/input_active.py
PR Title: Input example
BEFORE CODE: # 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. Y... | ```suggestion
value = 20
```
Not 'init' for very long, normally... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
Gui(page).run(title="Input - Inactive")
```
That's new, from Fred. But I kind of like 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... | @@ -0,0 +1,25 @@
+# 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/input_active.py | 25 | Python | 0.714 | suggestion | 110 | 26 | 26 | false | Input example | 1,880 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | namnguyen20999 | Review this pull request change.
Language: Python
File: doc/gui/examples/controls/input_active.py
PR Title: Input example
BEFORE CODE: # 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. Y... | ```suggestion
Gui(page).run(title="Input - Inactive")
```
That's new, from Fred. But I kind of like it. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
value = ""
```
Capitals are somehow reserved for class members or constants. | # 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/examples/controls/input_change_delay_on_change.py | 23 | Python | 0.571 | suggestion | 93 | 38 | 40 | false | Input example | 1,880 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | namnguyen20999 | Review this pull request change.
Language: Python
File: doc/gui/examples/controls/input_change_delay_on_change.py
PR Title: Input example
BEFORE CODE: # 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
... | ```suggestion
value = ""
```
Capitals are somehow reserved for class members or constants. | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
#
# 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
<|{value}|input|change_delay=-1|>
```
And add a little paragraph on the on_change setting:
"The [*on_change*][#p-on_change] property is not set: Taipy GUI automatically finds and binds the global *on_change()* function to handle changes in the input control. You could set this property to your own f... | #
# 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,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/examples/controls/input_change_delay_on_change.py | 26 | Python | 1 | suggestion | 342 | 32 | 34 | false | Input example | 1,880 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | namnguyen20999 | Review this pull request change.
Language: Python
File: doc/gui/examples/controls/input_change_delay_on_change.py
PR Title: Input example
BEFORE CODE: #
# 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 CON... | ```suggestion
<|{value}|input|change_delay=-1|>
```
And add a little paragraph on the on_change setting:
"The [*on_change*][#p-on_change] property is not set: Taipy GUI automatically finds and binds the global *on_change()* function to handle changes in the input control. You could set this property to your own f... | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# To execute this script, make sure that the taipy-gui package is installed in your
# Python environment and run:
# python <script>
# -----------------------------------------------------------------------------------------
import logging
from taipy.gui import Gui
# Configure logging
logging.basicConfig(level=log... | ```suggestion
Gui(page).run(title="input - on_change")
``` | # To execute this script, make sure that the taipy-gui package is installed in your
# Python environment and run:
# python <script>
# -----------------------------------------------------------------------------------------
import logging
from taipy.gui import Gui
# Configure logging
logging.basicConfig(level=log... | @@ -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/examples/controls/input_change_delay_on_change.py | 26 | Python | 0.643 | suggestion | 64 | 27 | 29 | false | Input example | 1,880 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | namnguyen20999 | Review this pull request change.
Language: Python
File: doc/gui/examples/controls/input_change_delay_on_change.py
PR Title: Input example
BEFORE CODE: # To execute this script, make sure that the taipy-gui package is installed in your
# Python environment and run:
# python <script>
# ---------------------------... | ```suggestion
Gui(page).run(title="input - on_change")
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
<|{lines}|input|multiline|lines_shown=5|>
``` | # 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,25 @@
+# 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/input_line_shown.py | 21 | Python | 0.571 | suggestion | 61 | 26 | 26 | false | Input example | 1,880 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | namnguyen20999 | Review this pull request change.
Language: Python
File: doc/gui/examples/controls/input_line_shown.py
PR Title: Input example
BEFORE CODE: # 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 Licens... | ```suggestion
<|{lines}|input|multiline|lines_shown=5|>
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
lines = "1 \n2 \n3 \n4 \n5"
``` | # 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,25 @@
+# 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/input_line_shown.py | 18 | Python | 0.429 | suggestion | 47 | 26 | 26 | false | Input example | 1,880 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | namnguyen20999 | Review this pull request change.
Language: Python
File: doc/gui/examples/controls/input_line_shown.py
PR Title: Input example
BEFORE CODE: # 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 Licens... | ```suggestion
lines = "1 \n2 \n3 \n4 \n5"
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
Gui(page).run(title="input - Lines shown")
``` | # 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,25 @@
+# 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/input_line_shown.py | 25 | Python | 0.571 | suggestion | 66 | 26 | 26 | false | Input example | 1,880 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | namnguyen20999 | Review this pull request change.
Language: Python
File: doc/gui/examples/controls/input_line_shown.py
PR Title: Input example
BEFORE CODE: # 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 Licens... | ```suggestion
Gui(page).run(title="input - Lines shown")
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
Gui(page).run(title="input - Multiline")
``` | # 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,26 @@
+# 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/input_multiline.py | 26 | Python | 0.571 | suggestion | 64 | 27 | 27 | false | Input example | 1,880 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | namnguyen20999 | Review this pull request change.
Language: Python
File: doc/gui/examples/controls/input_multiline.py
PR Title: Input example
BEFORE CODE: # 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... | ```suggestion
Gui(page).run(title="input - Multiline")
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
<|{text}|input|multiline|>
``` | # 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,26 @@
+# 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/input_multiline.py | 22 | Python | 0.429 | suggestion | 46 | 27 | 27 | false | Input example | 1,880 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | namnguyen20999 | Review this pull request change.
Language: Python
File: doc/gui/examples/controls/input_multiline.py
PR Title: Input example
BEFORE CODE: # 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... | ```suggestion
<|{text}|input|multiline|>
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
# 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
text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam nec purus et nunc lacinia gravida. " \
``` | # 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,26 @@
+# 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/input_multiline.py | 18 | Python | 0.857 | suggestion | 130 | 27 | 27 | false | Input example | 1,880 | Avaiga/taipy | 12,680 | Python | FabienLelaquais | namnguyen20999 | Review this pull request change.
Language: Python
File: doc/gui/examples/controls/input_multiline.py
PR Title: Input example
BEFORE CODE: # 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... | ```suggestion
text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam nec purus et nunc lacinia gravida. " \
``` | You are an expert software engineer and code reviewer. Review pull requests carefully for correctness, bugs, security issues, performance problems, maintainability, and unnecessary complexity. Only raise actionable issues supported by the code. Explain why an issue matters and suggest a concrete fix when appropriate. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.