Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: finished packaging section #331

Merged
merged 4 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added docs/manuals/gui/extension.md
Empty file.
51 changes: 43 additions & 8 deletions docs/userman/gui/extension/extension_packaging.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,45 @@
# Packaging your elements library

!!! warning "Work in Progress"
This section still requires significant work, which is in progress.
At this time, Taipy GUI provides a custom element library example
with lengthy explanations on how to build it.<br/>
Please look into the `doc/extension` directory where Taipy GUI is
installed for more information.<br/>
You can also look at this example directly on
[GitHub](https://github.com/Avaiga/taipy/tree/[BRANCH]/doc/gui/extension).
You can create an autonomous Python package to distribute your Taipy GUI custom extension library.

The following steps must be performed:
- go to your project's root directory (where the `Pipfile` is located)
- Install the build package:
- If you are using `pipenv`:
```bash
pipenv run pip install build
```
- If you are not using `pipenv`:
```bash
pip install build
```
- Configure the file `setup.py` to match your settings:

- The `name` parameter must be set to the package name, which contains the Taipy GUI
Extension library.<br/>
Note that before you pick a name for your package, you should make sure that it has not
already being used. The name of the package is not related to the `import` directive
in your Python code.
- The `author` and `author_email` parameters should be set to the package author name
and email address.
- The `description` and `long_description` parameters should provide a description of
this package (short and long versions).
- The `keywords` parameter should hold relevant keywords exposed by Pypi.
- The `packages` parameter indicates which directories and files should be included in
this package.<br/>
If you have renamed the extension library root directory, you will need to update this,
replacing "my_custom_lib" with the name of the directory you have created.
- The `version` parameter should reflect the extension library version you are packaging.
- Check the `classifiers` and `license` parameters.

- Build the package:
```bash
# With pipenv
pipenv run python -m build

# Without pipenv
python -m build
```

This generates a Python package that can be uploaded to Pipy or shared with community
members.
1 change: 1 addition & 0 deletions mkdocs.yml_template
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ nav:
- "List of Values Elements": userman/gui/extension/list_of_values.md
- "Tabular Elements": userman/gui/extension/tabular_data.md
- "Accessing assets": userman/gui/extension/accessing_assets.md
- "Packaging extensions": userman/gui/extension/extension_packaging.md

- "Scenario features":
- "Data integration":
Expand Down
Loading