Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
Several minor changes to the doc: (#811)
Browse files Browse the repository at this point in the history
- A bit more clear on on_user_content
- Web -> web when relevant
- ...
  • Loading branch information
FabienLelaquais authored Jun 23, 2023
1 parent c1ba59d commit f203a91
Show file tree
Hide file tree
Showing 11 changed files with 106 additions and 93 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ wheels/
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# Usually these files are generated by a Python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
Expand Down Expand Up @@ -130,7 +130,7 @@ Dockerfile.dev
# Filesystem default local storage
.data/

# python notebook
# Python notebook
*.ipynb
!simple_gui.ipynb

Expand Down
13 changes: 7 additions & 6 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ This creates the 'taipy-gui' directory that holds all the package's source code.

### Building the JavaScript bundle

Taipy GUI has some code dealing with the client side of the Web applications.
Taipy GUI has some code dealing with the client side of the web applications.
This code is written in [TypeScript](https://www.typescriptlang.org/), relies on
[React](https://reactjs.org/) components, and is packaged into a JavaScript bundle
that is sent to browsers when they connect to all Taipy GUI applications.
Expand All @@ -75,9 +75,9 @@ $ cd gui
$ cd dom
$ npm i
$ cd ..
# Install the Web app dependencies
# Install the web app dependencies
$ npm i --omit=optional
# Build the Web application
# Build the web app
$ npm run build
$ cd ..
# Current directory is the repository's root directory
Expand All @@ -103,14 +103,15 @@ TypeScript code from your debugger.
>
> When you are developing front-end code for the Taipy GUI package, it may
> be cumbersome to have to install the package over and over when you know
> that all that has changed is the JavaScript bundle.
> that all that has changed is the JavaScript bundle that makes the Taipy
> web app.
>
> By default, the Taipy GUI application searches for the front-end code
> in the `[taipy-gui-package-dir]/taipy/src/gui/webapp` directory.<br/>
> You can, however, set the environment variable `TAIPY_GUI_WEBAPP_PATH`
> to the location of your choice, and Taipy GUI will look for the Web
> to the location of your choice, and Taipy GUI will look for the web
> app in that directory.<br/>
> If you set this variable to the location where you build the Web app
> If you set this variable to the location where you build the web app
> repeatedly, you will no longer have to reinstall Taipy GUI before you
> try your code again.
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,40 +23,40 @@ specific language governing permissions and limitations under the License.
## What is Taipy GUI

Taipy is a Python library for creating Business Applications. More information on our
[website](https://www.taipy.io). Taipy is split into multiple repositories including _taipy-gui_ to let users
[website](https://www.taipy.io). Taipy is split into multiple repositories including `taipy-gui` to let users
install the minimum they need.

[Taipy GUI](https://github.com/Avaiga/taipy-gui) provides Python classes that make it easy to create powerful Web apps in minutes.
[Taipy GUI](https://github.com/Avaiga/taipy-gui) provides Python classes that make it easy to create powerful web apps in minutes.

A more in depth documentation of taipy can be found [here](https://docs.taipy.io/).
A more in depth documentation of Taipy can be found [here](https://docs.taipy.io/).

## Installation

Want to install and try _Taipy GUI_? Check out our [`INSTALLATION.md`](INSTALLATION.md) file.
Want to install and try *Taipy GUI*? Check out our [`INSTALLATION.md`](INSTALLATION.md) file.

## Contributing

Want to help build _Taipy GUI_? Check out our [`CONTRIBUTING.md`](CONTRIBUTING.md) file.
Want to help build *Taipy GUI*? Check out our [`CONTRIBUTING.md`](CONTRIBUTING.md) file.

## Code of conduct

Want to be part of the _Taipy GUI_ community? Check out our [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md) file.
Want to be part of the *Taipy GUI* community? Check out our [`CODE_OF_CONDUCT.md`](CODE_OF_CONDUCT.md) file.

## Directory Structure

- `gui`: Graphical user interface related files;
- `src/taipy/gui`: Python source files;
- `tests/taipy/gui`: Unit tests;
- `tools`: Files used to document _taipy-gui_;
- `CODE_OF_CONDUCT.md`: Code of conduct for members and contributors of _taipy-gui_;
- `CONTRIBUTING.md`: Instructions to contribute to _taipy-gui_;
- `INSTALLATION.md`: Instructions to install _taipy-gui_;
- `tools`: Files used to document `taipy-gui`;
- `CODE_OF_CONDUCT.md`: Code of conduct for members and contributors of `taipy-gui`;
- `CONTRIBUTING.md`: Instructions to contribute to `taipy-gui`;
- `INSTALLATION.md`: Instructions to build and install `taipy-gui`;
- `LICENSE`: The Apache 2.0 License;
- `MANIFEST.in`: Build configuration file;
- `mypy.ini`: [mypy](http://mypy-lang.org/) linter configuration file;
- `Pipfile`: File used by the Pipenv virtual environment to manage project dependencies;
- `pyproject.toml`: Python build configuration file use for linters here;
- `pytest.ini`: [pytest](https://pytest.org/) configuration file;
- `README.md`: Current file;
- `setup.py`: The setup script managing building, distributing, and installing _taipy-gui_;
- `setup.py`: The setup script managing building, distributing, and installing `taipy-gui`;
- `tox.ini`: Contains test scenarios to be run.
2 changes: 1 addition & 1 deletion gui/src/components/Taipy/Chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ const Chart = (props: ChartProp) => {
console.info(`Error while parsing Chart.plot_config\n${(e as Error).message || e}`);
}
if (typeof plconf !== "object" || plconf === null || Array.isArray(plconf)) {
console.info("Error Chart.plot_config is not a dictionnary");
console.info("Error Chart.plot_config is not a dictionary");
plconf = {};
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/taipy/gui/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"""# Taipy Graphical User Interface generator
The Taipy GUI package provides User Interface generation based on page templates. It can
run a Web server that a Web browser can connect to.
run a web server that a web browser can connect to.
The pages are generated by a Web server that allows Web clients to connect, display and
The pages are generated by a web server that allows web clients to connect, display and
interact with the page content through visual elements.
Each page can contain regular text and images, as well as Taipy controls that are
Expand Down Expand Up @@ -53,7 +53,7 @@
(then potentially `pip install python-magic` on Windows),
or install Taipy GUI using: `pip install taipy-gui[image]`.
- [`pyarrow`](https://pypi.org/project/pyarrow/): can improve the performance of your
application by reducing the volume of data transferred between the Web server and the
application by reducing the volume of data transferred between the web server and the
clients. This is relevant if your application uses large tabular data.<br/>
You can install that package with the regular `pip install pyarrow` command,
or install Taipy GUI using: `pip install taipy-gui[arrow]`.
Expand Down
2 changes: 1 addition & 1 deletion src/taipy/gui/_gui_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def create_parser(cls):
nargs="?",
default="",
const="",
help="The path to the WebApp to be used. The default is the webapp directory under gui in the Taipy GUI package directory.",
help="The path to the web app to be used. The default is the webapp directory under gui in the Taipy GUI package directory.",
)

debug_group = gui_parser.add_mutually_exclusive_group()
Expand Down
4 changes: 2 additions & 2 deletions src/taipy/gui/data/data_scope.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def create_scope(self, id: str) -> None:
if self.__single_client:
return
if id is None:
_warn("Empty session id, might be due to unestablished Web Socket connection.")
_warn("Empty session id, might be due to unestablished WebSocket connection.")
return
if id not in self.__scopes:
self.__scopes[id] = SimpleNamespace()
Expand All @@ -68,7 +68,7 @@ def delete_scope(self, id: str) -> None: # pragma: no cover
if self.__single_client:
return
if id is None:
_warn("Empty session id, might be due to unestablished Web Socket connection.")
_warn("Empty session id, might be due to unestablished WebSocket connection.")
return
if id in self.__scopes:
del self.__scopes[id]
6 changes: 3 additions & 3 deletions src/taipy/gui/data/pandas_data_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,13 @@ def __format_data(
# Write data to table
writer.write_table(table)
writer.close()
# end buffer stream
# End buffer stream
buf = sink.getvalue()
# convert buffer to python bytes and return
# Convert buffer to Python bytes and return
ret["data"] = buf.to_pybytes()
ret["orient"] = orient
else:
# workaround for python built in json encoder that does not yet support ignore_nan
# Workaround for Python built in JSON encoder that does not yet support ignore_nan
ret["data"] = data.replace([np.nan], ["NaN" if handle_nan else None]).to_dict(orient=orient) # type: ignore
return ret

Expand Down
Loading

0 comments on commit f203a91

Please sign in to comment.