-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/#2071-rank-datanodes-in-selector
- Loading branch information
Showing
83 changed files
with
4,907 additions
and
3,493 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
## What type of PR is this? (check all applicable) | ||
|
||
- [ ] Refactor | ||
- [ ] Feature | ||
- [ ] Bug Fix | ||
- [ ] Optimization | ||
- [ ] Documentation Update | ||
|
||
## Description | ||
|
||
## Related Tickets & Documents | ||
|
||
<!-- | ||
For pull requests that relate or close an issue, please include them | ||
below. We like to follow [Github's guidance on linking issues to pull requests](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue). | ||
For example having the text: "closes #1234" would connect the current pull | ||
request to issue 1234. And when we merge the pull request, Github will | ||
automatically close the issue. | ||
--> | ||
|
||
- Related Issue # | ||
- Closes # | ||
|
||
## How to reproduce the issue | ||
|
||
_Please replace this line with instructions on how to reproduce the issue or test the feature._ | ||
|
||
## Other branches or releases that this needs to be backported | ||
_Describe which projects this change will impact and that needs to be backported._ | ||
|
||
## Checklist | ||
_We encourage you to keep the code coverage percentage at 80% and above._ | ||
|
||
- [ ] Does this solution meet the acceptance criteria of the related issue? | ||
- [ ] Is the related issue checklist completed? | ||
- [ ] Does this PR adds unit tests for the developed code? If not, why? | ||
- [ ] End-to-End tests have been added or updated? | ||
- [ ] Was the documentation updated, or a dedicated issue for documentation created? (If applicable) | ||
- [ ] Is the release notes updated? (If applicable) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Cleanup Old Pre-Releases | ||
|
||
on: | ||
workflow_dispatch: # Allows manual triggering | ||
|
||
jobs: | ||
cleanup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Cleanup old dev releases | ||
id: cleanup | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
sh tools/release/cleanup_dev_releases.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# This file makes this directory a module on its own, mandatory for mypy. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 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. | ||
# ----------------------------------------------------------------------------------------- | ||
# To execute this script, make sure that the taipy-gui package is installed in your | ||
# Python environment and run: | ||
# python <script> | ||
# ----------------------------------------------------------------------------------------- | ||
import taipy.gui.builder as tgb | ||
from taipy.gui import Gui | ||
|
||
with tgb.Page() as page: | ||
with tgb.layout("max-content max-content"): # type: ignore[attr-defined] | ||
with tgb.part("card"): # type: ignore[attr-defined] | ||
tgb.text("France") # type: ignore[attr-defined] | ||
with tgb.part("card"): # type: ignore[attr-defined] | ||
tgb.text("United States of America") # type: ignore[attr-defined] | ||
|
||
if __name__ == "__main__": | ||
Gui(page).run(title="Layout - Fit to content") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# 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 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. | ||
# ----------------------------------------------------------------------------------------- | ||
# To execute this script, make sure that the taipy-gui package is installed in your | ||
# Python environment and run: | ||
# python <script> | ||
# ----------------------------------------------------------------------------------------- | ||
from taipy.gui import Gui | ||
|
||
page = """ | ||
<|layout|columns=max-content max-content| | ||
<|card|part| | ||
France | ||
|> | ||
<|card|part| | ||
United States of America | ||
|> | ||
|> | ||
""" | ||
|
||
if __name__ == "__main__": | ||
Gui(page).run(title="Layout - Fit to content") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# This file makes this directory a module on its own, mandatory for mypy. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# 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 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. | ||
# ----------------------------------------------------------------------------------------- | ||
# To execute this script, make sure that the taipy-gui package is installed in your | ||
# Python environment and run: | ||
# python <script> | ||
# ----------------------------------------------------------------------------------------- | ||
# This script needs to run in a Python environment where the Matplotlib library is | ||
# installed. | ||
# ----------------------------------------------------------------------------------------- | ||
# Matplotlib example | ||
import numpy as np | ||
|
||
import matplotlib.pyplot as plt | ||
import taipy.gui.builder as tgb | ||
from taipy.gui import Gui | ||
|
||
fig = plt.figure(figsize=(5, 4)) | ||
xx = np.arange(0, 2 * np.pi, 0.01) | ||
plot = fig.subplots(1, 1) | ||
plot.fill(xx, np.sin(xx), facecolor="none", edgecolor="purple", linewidth=2) | ||
|
||
with tgb.Page( | ||
style={ | ||
".matplotlib_example": { | ||
"display": "inline-flex", "width": "520px", "height": "420px" | ||
} | ||
} | ||
) as page: | ||
tgb.html("h1", "Taipy Example for Matplotlib Integration") | ||
tgb.part(content="{fig}", class_name = "matplotlib_example") | ||
|
||
|
||
# Run the Taipy Application: | ||
if __name__ == "__main__": | ||
Gui(page).run(title="Matplotlib Example") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# 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 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. | ||
# ----------------------------------------------------------------------------------------- | ||
# To execute this script, make sure that the taipy-gui package is installed in your | ||
# Python environment and run: | ||
# python <script> | ||
# ----------------------------------------------------------------------------------------- | ||
import os | ||
|
||
import matplotlib.pyplot as plt | ||
from taipy.gui import Gui, Markdown | ||
|
||
# Generate a scatter plot | ||
x = [1, 2, 3, 4, 5] # x axis values | ||
y = [10, 14, 12, 15, 18] # y axis values | ||
sizes = [100, 100, 100, 100, 100] # Bubble sizes | ||
colors = [30, 40, 50, 60, 70] # Bubble color values that will be mapped to shades of colormap (cmap) | ||
|
||
# Scatter plot | ||
# The `c` parameter uses the `colors` list to map values to the colormap (cmap) | ||
# The `edgecolors` parameter sets the color of the edges around the bubbles | ||
plt.scatter(x, y, s=sizes, c=colors, cmap='Greens', edgecolors='black', linewidths=1) | ||
plt.xlabel('X-axis') | ||
plt.ylabel('Y-axis') | ||
plt.title('Matplotlib 2D Scatter Plot') | ||
|
||
# Adding labels next to each point | ||
for i in range(len(x)): | ||
plt.text(x[i] + 0.1, y[i] - 0.1, f'Point {i+1}', fontsize=9, ha='left') | ||
|
||
# Creating legend entries for each point | ||
# Each entry corresponds to a point, with the color and label indicating the point's position. | ||
# The `markerfacecolor` sets the fill color of the legend marker to match the point's color in the 'Greens' colormap. | ||
# The `markeredgecolor` sets the edge color of the legend marker. | ||
# The `markeredgewidth` sets the width of the edge. | ||
handles = [ | ||
plt.Line2D( | ||
[0], [0], marker='o', color='w', | ||
markerfacecolor=plt.cm.Greens(color / max(colors)), | ||
markersize=10, # Adjust the size for visibility | ||
label=f'Point {i+1}', | ||
markeredgewidth=1, # Thickness of the edge color | ||
markeredgecolor='black' # Edge color to match the plot | ||
) for i, color in enumerate(colors) | ||
] | ||
|
||
# Placing the legend on the left side of the chart | ||
plt.legend(handles=handles, title="Points", loc="center left", bbox_to_anchor=(1, 0.5), frameon=True) | ||
|
||
# Adjust the layout to ensure everything fits and nothing is clipped | ||
plt.tight_layout(rect=[0, 0, 1, 1]) | ||
|
||
# Save the figure as a PNG image | ||
output_dir = './images' | ||
if not os.path.exists(output_dir): | ||
os.makedirs(output_dir) | ||
content = "./images/figure.png" | ||
plt.savefig(content) | ||
|
||
# Define Taipy page content | ||
page_content = Markdown(""" | ||
# Matplotlib 2D Scatter Plot | ||
<|{content}|image|class_name=scatter-plot|> | ||
""", style={ | ||
".scatter-plot": { | ||
"display": "block", | ||
"margin": "auto", | ||
"max-width": "100% !important", | ||
"width": "max-content !important", | ||
"height": "max-content !important" | ||
} | ||
}) | ||
|
||
if __name__ == "__main__": | ||
Gui(page_content).run(title="Chart-Scatter-Matplotlib") |
Oops, something went wrong.