From 71b5731699a378342c66afd7ecf487991aec8ee1 Mon Sep 17 00:00:00 2001 From: JPOSADA202020 Date: Sun, 5 Jan 2025 06:26:44 -0500 Subject: [PATCH 1/3] compatibility_cp9 --- .github/workflows/build.yml | 111 +++++++++++++++++- .github/workflows/release_pypi.yml | 31 +++-- .pre-commit-config.yaml | 20 +++- .pylintrc | 2 +- examples/bar_3Dbars.py | 13 +- examples/bar_color_changing.py | 11 +- examples/bar_colorpalette.py | 2 +- examples/bar_example.py | 2 +- examples/bar_scale_example.py | 2 +- examples/bar_updating_values.py | 2 +- .../cartersian_and_scatter_polyfit_example.py | 8 +- examples/cartesian_advanced.py | 2 +- examples/cartesian_fill.py | 2 +- examples/cartesian_koch.py | 2 +- examples/cartesian_koch_2.py | 7 +- examples/cartesian_logging_data.py | 2 +- examples/cartesian_table.py | 2 +- examples/cartesian_trig_functions.py | 2 +- examples/display_shapes.py | 2 +- examples/fillbetween.py | 2 +- examples/integration_example.py | 2 +- examples/lissajous_curves.py | 2 +- examples/logging.py | 2 +- examples/logging_animation.py | 2 +- examples/logging_changing_values.py | 2 +- examples/logging_fill.py | 2 +- examples/logging_limits.py | 2 +- examples/logging_table.py | 2 +- examples/logging_with_dial_gauge.py | 2 +- examples/map.py | 2 +- examples/pie_example.py | 2 +- examples/plot_example.py | 2 +- examples/plot_line_styles.py | 26 +++- examples/plot_simpletest.py | 2 +- examples/polar_advanced.py | 2 +- examples/polar_example.py | 2 +- examples/polar_plots.py | 2 +- examples/readme_example.py | 2 +- examples/scatter.py | 2 +- examples/scatter_circle_radius.py | 10 +- examples/scatter_pointers.py | 2 +- examples/scatter_using_different_datasets.py | 18 ++- examples/shade_example.py | 2 +- examples/sparkline.py | 2 +- examples/stackplot.py | 2 +- examples/svg_example.py | 2 +- examples/tickparameters.py | 2 +- examples/uboxplot_example.py | 2 +- 48 files changed, 258 insertions(+), 73 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4d76262..48e7c9f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,14 +1,113 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# SPDX-FileCopyrightText: 2023 Jose D. Montoya # -# SPDX-License-Identifier: MIT +# SPDX-License-Identifier: Unlicense name: Build CI -on: [pull_request, push] +on: + pull_request: + types: [opened, reopened] + push: jobs: - test: + build-wheel: runs-on: ubuntu-latest steps: - - name: Run Build CI workflow - uses: jposada202020/workflows-circuitpython-libs/build@main + - uses: actions/setup-python@v4 + with: + python-version: "3.x" + + - uses: actions/checkout@v3 + + - name: Build wheel + run: pip wheel -w dist --no-deps . + + - name: check dist + run: pipx run twine check dist/* + + - name: Archive wheel + uses: actions/upload-artifact@v3 + with: + name: wheel + path: ${{ github.workspace }}/dist/ + + linters: + runs-on: ubuntu-latest + steps: + + - uses: actions/setup-python@v4 + with: + python-version: "3.x" + + - uses: actions/checkout@v3 + + - name: Install pre-commit and deps + run: pip install pre-commit -r requirements.txt + + - name: Setup problem matchers + uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1 + + - name: Pre-commit hooks + run: pre-commit run --all-files + + build-bundles: + runs-on: ubuntu-latest + steps: + - name: Translate Repo Name For Build Tools filename_prefix + id: repo-name + run: | + echo repo-name=$( + echo ${{ github.repository }} | + awk -F '\/' '{ print tolower($2) }' | + tr '_' '-' + ) >> $GITHUB_OUTPUT + + - uses: actions/checkout@v3 + + - name: Set up Python 3.x + uses: actions/setup-python@v4 + with: + python-version: "3.x" + + - name: Checkout tools repo + uses: actions/checkout@v3 + with: + repository: adafruit/actions-ci-circuitpython-libs + path: actions-ci + + - name: Install deps + run: | + source actions-ci/install.sh + + - name: Build assets + run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . + + - name: Archive bundles + uses: actions/upload-artifact@v3 + with: + name: bundles + path: ${{ github.workspace }}/bundles/ + + build-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Python 3.x + uses: actions/setup-python@v4 + with: + python-version: "3.x" + + - name: Install deps + run: | + pip install -r docs/requirements.txt -r requirements.txt + + - name: Build docs + working-directory: docs + run: sphinx-build -E -W -b html . _build/html + + - name: Archive docs + uses: actions/upload-artifact@v3 + with: + name: docs + path: ${{ github.workspace }}/docs/_build/html diff --git a/.github/workflows/release_pypi.yml b/.github/workflows/release_pypi.yml index 65775b7..160fce3 100644 --- a/.github/workflows/release_pypi.yml +++ b/.github/workflows/release_pypi.yml @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# SPDX-FileCopyrightText: 2025 Jose D. Montoya # # SPDX-License-Identifier: MIT @@ -9,11 +9,28 @@ on: types: [published] jobs: - upload-release-assets: + pypi-publish: + name: Publish release to PyPI runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/circuitpython-uplot + permissions: + id-token: write steps: - - name: Run PyPI Release CI workflow - uses: adafruit/workflows-circuitpython-libs/release-pypi@main - with: - pypi-username: ${{ secrets.pypi_username }} - pypi-password: ${{ secrets.pypi_password }} + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install dependencies + shell: bash + run: | + python -m pip install --upgrade pip + pip install --upgrade build + - name: Build package + run: | + find -type f -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) -exec sed -i -e "s/0.0.0+auto.0/${{github.event.release.tag_name}}/" {} + + python -m build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d000ade..c0e8ede 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,27 +1,30 @@ -# SPDX-FileCopyrightText: 2023 Jose D. Montoya +# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò # # SPDX-License-Identifier: Unlicense repos: - repo: https://github.com/python/black - rev: 23.3.0 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace + - id: mixed-line-ending + args: + - --fix=lf - repo: https://github.com/pycqa/pylint - rev: v2.17.4 + rev: v3.3.1 hooks: - id: pylint name: pylint (library code) types: [python] args: - --disable=consider-using-f-string - exclude: "^(docs/|examples/|tests/)" + exclude: "^(docs/|examples/|tests/|setup.py$)" - id: pylint name: pylint (example code) description: Run pylint rules on "examples/*.py" files @@ -29,3 +32,10 @@ repos: files: "^examples/" args: - --disable=missing-docstring,invalid-name,consider-using-f-string,duplicate-code + - id: pylint + name: pylint (test code) + description: Run pylint rules on "tests/*.py" files + types: [python] + files: "^tests/" + args: + - --disable=missing-docstring,consider-using-f-string,duplicate-code diff --git a/.pylintrc b/.pylintrc index f9deda4..f6bdfea 100644 --- a/.pylintrc +++ b/.pylintrc @@ -14,7 +14,7 @@ unsafe-load-any-extension=no [MESSAGES CONTROL] confidence= -disable=raw-checker-failed,bad-inline-option,locally-disabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,import-error,pointless-string-statement,unspecified-encoding,protected-access,unnecessary-list-index-lookup,duplicate-code,import-outside-toplevel,attribute-defined-outside-init +disable=raw-checker-failed,bad-inline-option,locally-disabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,import-error,pointless-string-statement,unspecified-encoding,protected-access,unnecessary-list-index-lookup,duplicate-code,import-outside-toplevel,attribute-defined-outside-init, too-many-positional-arguments enable= [REPORTS] diff --git a/examples/bar_3Dbars.py b/examples/bar_3Dbars.py index 03c1aeb..1f5834a 100644 --- a/examples/bar_3Dbars.py +++ b/examples/bar_3Dbars.py @@ -18,7 +18,16 @@ b = [3, 5, 1, 9, 7] # Creating a 3D bar -Bar(plot, a, b, color=0xFF1000, fill=True, bar_space=30, xstart=70, projection=True) +Bar( + plot, + a, + b, + color=0xFF1000, + fill=True, + bar_space=30, + xstart=70, + projection=True, +) # Plotting and showing the plot -display.show(plot) +display.root_group = plot diff --git a/examples/bar_color_changing.py b/examples/bar_color_changing.py index 4563aae..69c5571 100644 --- a/examples/bar_color_changing.py +++ b/examples/bar_color_changing.py @@ -32,7 +32,7 @@ a = ["a", "b", "c", "d", "e", "f"] # Showing the plot -display.show(plot) +display.root_group = plot # Creating the bar my_bar = Bar( @@ -47,7 +47,14 @@ time.sleep(2) # Changing all the bars to Yellow my_bar.update_colors( - [color.YELLOW, color.YELLOW, color.YELLOW, color.YELLOW, color.YELLOW, color.YELLOW] + [ + color.YELLOW, + color.YELLOW, + color.YELLOW, + color.YELLOW, + color.YELLOW, + color.YELLOW, + ] ) time.sleep(2) diff --git a/examples/bar_colorpalette.py b/examples/bar_colorpalette.py index 6fa245e..c10b948 100644 --- a/examples/bar_colorpalette.py +++ b/examples/bar_colorpalette.py @@ -39,4 +39,4 @@ ) # Showing the plot -display.show(plot) +display.root_group = plot diff --git a/examples/bar_example.py b/examples/bar_example.py index 3663323..8ab8e1e 100644 --- a/examples/bar_example.py +++ b/examples/bar_example.py @@ -19,4 +19,4 @@ Bar(plot, a, b, 0xFF1000, True) # Plotting and showing the plot -display.show(plot) +display.root_group = plot diff --git a/examples/bar_scale_example.py b/examples/bar_scale_example.py index 5d4e24f..8cb0c99 100644 --- a/examples/bar_scale_example.py +++ b/examples/bar_scale_example.py @@ -29,4 +29,4 @@ group.append(plot_scale1) group.append(plot_scale2) -display.show(group) +display.root_group = group diff --git a/examples/bar_updating_values.py b/examples/bar_updating_values.py index 6f4bf27..1684eb9 100644 --- a/examples/bar_updating_values.py +++ b/examples/bar_updating_values.py @@ -31,7 +31,7 @@ add = 1 # Showing the plot -display.show(plot) +display.root_group = plot # Creating the bar my_bar = Bar( diff --git a/examples/cartersian_and_scatter_polyfit_example.py b/examples/cartersian_and_scatter_polyfit_example.py index 520f555..8da765a 100644 --- a/examples/cartersian_and_scatter_polyfit_example.py +++ b/examples/cartersian_and_scatter_polyfit_example.py @@ -26,10 +26,14 @@ plot = Plot(0, 0, display.width - table_width, display.height, padding=1) plot.tick_params(tickx_height=12, ticky_height=12, tickcolor=0x939597, tickgrid=True) plot_table = Plot( - display.width - table_width - 1, 0, table_width - 1, display.height, padding=1 + display.width - table_width - 1, + 0, + table_width - 1, + display.height, + padding=1, ) -display.show(g) +display.root_group = g g.append(plot) g.append(plot_table) diff --git a/examples/cartesian_advanced.py b/examples/cartesian_advanced.py index 7a06741..61d2948 100644 --- a/examples/cartesian_advanced.py +++ b/examples/cartesian_advanced.py @@ -26,4 +26,4 @@ Cartesian(plot, x, y, rangex=[-5, 5], rangey=[0, 1], line_color=0x00FF00) # Plotting and showing the plot -display.show(plot) +display.root_group = plot diff --git a/examples/cartesian_fill.py b/examples/cartesian_fill.py index aa6716e..65f5c4a 100644 --- a/examples/cartesian_fill.py +++ b/examples/cartesian_fill.py @@ -14,7 +14,7 @@ # Adding the plot area plot = Plot(0, 0, display.width - 125, display.height, padding=25) -display.show(plot) +display.root_group = plot # Creating the values x = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) diff --git a/examples/cartesian_koch.py b/examples/cartesian_koch.py index 9aa4370..f690375 100644 --- a/examples/cartesian_koch.py +++ b/examples/cartesian_koch.py @@ -60,4 +60,4 @@ def rotate(vector: numpy.ndarray, angle_in_degrees: float) -> numpy.ndarray: # Adding the Cartesian plot Cartesian(plot, x_coordinates, y_coordinates) -display.show(plot) +display.root_group = plot diff --git a/examples/cartesian_koch_2.py b/examples/cartesian_koch_2.py index a7ba693..28cb4b2 100644 --- a/examples/cartesian_koch_2.py +++ b/examples/cartesian_koch_2.py @@ -26,7 +26,10 @@ def R(angle, coords, jump): def F(angle, coords, jump): coords.append( - (coords[-1][0] + jump * cosin[angle], coords[-1][1] + jump * sines[angle]) + ( + coords[-1][0] + jump * cosin[angle], + coords[-1][1] + jump * sines[angle], + ) ) return angle @@ -57,4 +60,4 @@ def koch(steps, length=200, startPos=(0, 0)): # Adding the Cartesian plot Cartesian(plot, x_coordinates, y_coordinates) -display.show(plot) +display.root_group = plot diff --git a/examples/cartesian_logging_data.py b/examples/cartesian_logging_data.py index 1937820..72f1b28 100644 --- a/examples/cartesian_logging_data.py +++ b/examples/cartesian_logging_data.py @@ -79,7 +79,7 @@ g.append(plot_1) g.append(plot_2) -display.show(g) +display.root_group = g display.refresh() for i, element in enumerate(x): diff --git a/examples/cartesian_table.py b/examples/cartesian_table.py index 142837d..359621d 100644 --- a/examples/cartesian_table.py +++ b/examples/cartesian_table.py @@ -119,4 +119,4 @@ def heat_index(temp, humidity): color.BLUE, ) g.append(my_table) -display.show(g) +display.root_group = g diff --git a/examples/cartesian_trig_functions.py b/examples/cartesian_trig_functions.py index 67c85b3..02e0206 100644 --- a/examples/cartesian_trig_functions.py +++ b/examples/cartesian_trig_functions.py @@ -39,4 +39,4 @@ g.append(text_area) g.append(text2_area) -display.show(g) +display.root_group = g diff --git a/examples/display_shapes.py b/examples/display_shapes.py index 18e2cee..c49d65c 100644 --- a/examples/display_shapes.py +++ b/examples/display_shapes.py @@ -41,4 +41,4 @@ plot.append(roundrect) # Plotting and showing the plot -display.show(plot) +display.root_group = plot diff --git a/examples/fillbetween.py b/examples/fillbetween.py index c1e7e30..a6a5ccc 100644 --- a/examples/fillbetween.py +++ b/examples/fillbetween.py @@ -20,4 +20,4 @@ Fillbetween(plot, x, y1, y2) -display.show(plot) +display.root_group = plot diff --git a/examples/integration_example.py b/examples/integration_example.py index 2d28226..b26b25c 100644 --- a/examples/integration_example.py +++ b/examples/integration_example.py @@ -31,4 +31,4 @@ plot.draw_circle(radius=8, x=120, y=120) # Showing in the screen -display.show(plot) +display.root_group = plot diff --git a/examples/lissajous_curves.py b/examples/lissajous_curves.py index cc9272f..945f120 100644 --- a/examples/lissajous_curves.py +++ b/examples/lissajous_curves.py @@ -48,7 +48,7 @@ def create_curve(a=1, b=2, mul_factor=10, delta=3.14 / 2): g.append(plot4) # Plotting and showing the plot -display.show(g) +display.root_group = g # Some Variables diff --git a/examples/logging.py b/examples/logging.py index 69655a6..49eb65b 100644 --- a/examples/logging.py +++ b/examples/logging.py @@ -58,7 +58,7 @@ g.append(plot_1) -display.show(g) +display.root_group = g display.refresh() dist = 3 diff --git a/examples/logging_animation.py b/examples/logging_animation.py index 84a1c60..d04cc5e 100644 --- a/examples/logging_animation.py +++ b/examples/logging_animation.py @@ -60,7 +60,7 @@ random_numbers = [19, 22, 35, 33, 24, 26, 28, 37] -display.show(my_plot) +display.root_group = my_plot display.refresh() dist = 1 diff --git a/examples/logging_changing_values.py b/examples/logging_changing_values.py index df6464a..7d1858e 100644 --- a/examples/logging_changing_values.py +++ b/examples/logging_changing_values.py @@ -48,7 +48,7 @@ g.append(plot_1) -display.show(g) +display.root_group = g display.refresh() my_log = Logging( diff --git a/examples/logging_fill.py b/examples/logging_fill.py index 24a2d5e..a7e05cd 100644 --- a/examples/logging_fill.py +++ b/examples/logging_fill.py @@ -77,4 +77,4 @@ group.append(plot_1) group.append(plot_2) -display.show(group) +display.root_group = group diff --git a/examples/logging_limits.py b/examples/logging_limits.py index f948184..0ccf9de 100644 --- a/examples/logging_limits.py +++ b/examples/logging_limits.py @@ -60,7 +60,7 @@ random_numbers = [32, 34, 45, 65, 24, 40, 18, 27] -display.show(my_plot) +display.root_group = my_plot display.refresh() dist = 1 diff --git a/examples/logging_table.py b/examples/logging_table.py index ee98059..5c997b8 100644 --- a/examples/logging_table.py +++ b/examples/logging_table.py @@ -74,7 +74,7 @@ g.append(plot_1) g.append(my_table) # Show the group -display.show(g) +display.root_group = g for _ in range(2): for i in range(len(x)): diff --git a/examples/logging_with_dial_gauge.py b/examples/logging_with_dial_gauge.py index 2b601c7..89389f6 100644 --- a/examples/logging_with_dial_gauge.py +++ b/examples/logging_with_dial_gauge.py @@ -28,7 +28,7 @@ g = displayio.Group() g.append(my_plot) g.append(plot2) -display.show(g) +display.root_group = g my_plot.tick_params( diff --git a/examples/map.py b/examples/map.py index ad08298..03c0d8f 100644 --- a/examples/map.py +++ b/examples/map.py @@ -24,4 +24,4 @@ # Plotting and showing the plot Map(plot, y1, 0xFF0044, 0x4400FF) # Plotting and showing the plot -display.show(plot) +display.root_group = plot diff --git a/examples/pie_example.py b/examples/pie_example.py index 8c75a3b..b297610 100644 --- a/examples/pie_example.py +++ b/examples/pie_example.py @@ -19,4 +19,4 @@ Pie(plot, a) # Plotting and showing the plot -display.show(plot) +display.root_group = plot diff --git a/examples/plot_example.py b/examples/plot_example.py index 9a6886a..b819e94 100644 --- a/examples/plot_example.py +++ b/examples/plot_example.py @@ -21,4 +21,4 @@ # Drawing the graph Cartesian(plot, x, y) -display.show(plot) +display.root_group = plot diff --git a/examples/plot_line_styles.py b/examples/plot_line_styles.py index 22133dc..d0532ac 100644 --- a/examples/plot_line_styles.py +++ b/examples/plot_line_styles.py @@ -18,7 +18,13 @@ # Drawing the graph Cartesian( - plot, x, y, rangex=[-5, 5], rangey=[0, 1], line_color=0xFF0000, line_style="- -" + plot, + x, + y, + rangex=[-5, 5], + rangey=[0, 1], + line_color=0xFF0000, + line_style="- -", ) # Creating some points to graph @@ -26,7 +32,13 @@ constant = 2.0 / np.sqrt(2 * np.pi) y = constant * np.exp((-(x**2)) / 2.0) Cartesian( - plot, x, y, rangex=[-5, 5], rangey=[0, 1], line_color=0x00FF00, line_style="." + plot, + x, + y, + rangex=[-5, 5], + rangey=[0, 1], + line_color=0x00FF00, + line_style=".", ) @@ -34,8 +46,14 @@ constant = 2.5 / np.sqrt(2 * np.pi) y = constant * np.exp((-(x**2)) / 6.5) Cartesian( - plot, x, y, rangex=[-5, 5], rangey=[0, 1], line_color=0x123456, line_style="-.-" + plot, + x, + y, + rangex=[-5, 5], + rangey=[0, 1], + line_color=0x123456, + line_style="-.-", ) # Plotting and showing the plot -display.show(plot) +display.root_group = plot diff --git a/examples/plot_simpletest.py b/examples/plot_simpletest.py index d7f2070..6f06270 100644 --- a/examples/plot_simpletest.py +++ b/examples/plot_simpletest.py @@ -13,4 +13,4 @@ plot.draw_circle(radius=8, x=120, y=120) -display.show(plot) +display.root_group = plot diff --git a/examples/polar_advanced.py b/examples/polar_advanced.py index 107b003..4e88491 100644 --- a/examples/polar_advanced.py +++ b/examples/polar_advanced.py @@ -72,4 +72,4 @@ g.append(plot4) # Show the Display -display.show(g) +display.root_group = g diff --git a/examples/polar_example.py b/examples/polar_example.py index 9117de1..0e761a2 100644 --- a/examples/polar_example.py +++ b/examples/polar_example.py @@ -17,4 +17,4 @@ # Plotting and showing the plot Polar(plot, theta, r, rangex=[-2, 2], rangey=[-2, 2], line_color=color.ORANGE) -display.show(plot) +display.root_group = plot diff --git a/examples/polar_plots.py b/examples/polar_plots.py index 91d039e..3a8f4b2 100644 --- a/examples/polar_plots.py +++ b/examples/polar_plots.py @@ -25,7 +25,7 @@ g.append(plot4) # Plotting and showing the plot -display.show(g) +display.root_group = g def rose_function(n=3, angle_range=[0, 360], radius=30): diff --git a/examples/readme_example.py b/examples/readme_example.py index 19771de..525b798 100644 --- a/examples/readme_example.py +++ b/examples/readme_example.py @@ -91,4 +91,4 @@ plot.append(plot7) # Plotting and showing the plot -display.show(plot) +display.root_group = plot diff --git a/examples/scatter.py b/examples/scatter.py index 5f5015d..fb64566 100644 --- a/examples/scatter.py +++ b/examples/scatter.py @@ -23,4 +23,4 @@ Scatter(plot, a, b) # Plotting and showing the plot -display.show(plot) +display.root_group = plot diff --git a/examples/scatter_circle_radius.py b/examples/scatter_circle_radius.py index 41e40fe..fb043b9 100644 --- a/examples/scatter_circle_radius.py +++ b/examples/scatter_circle_radius.py @@ -16,12 +16,18 @@ plot = Plot(0, 0, display.width, display.height, padding=1) plot.tick_params(tickx_height=12, ticky_height=12, tickcolor=0x939597, tickgrid=True) -display.show(plot) +display.root_group = plot a = np.linspace(1, 200, 150) z = [4, 5, 6, 7, 8] radi = [choice(z) for _ in a] b = [choice(a) for _ in a] Scatter( - plot, a, b, rangex=[0, 210], rangey=[0, 210], radius=radi, pointer_color=0xF456F3 + plot, + a, + b, + rangex=[0, 210], + rangey=[0, 210], + radius=radi, + pointer_color=0xF456F3, ) diff --git a/examples/scatter_pointers.py b/examples/scatter_pointers.py index 2ed621b..1c429aa 100644 --- a/examples/scatter_pointers.py +++ b/examples/scatter_pointers.py @@ -27,7 +27,7 @@ g.append(plot2) g.append(plot3) g.append(plot4) -display.show(g) +display.root_group = plot # Setting up tick parameters diff --git a/examples/scatter_using_different_datasets.py b/examples/scatter_using_different_datasets.py index cf7dfea..4e88887 100644 --- a/examples/scatter_using_different_datasets.py +++ b/examples/scatter_using_different_datasets.py @@ -23,20 +23,32 @@ decimal_points=0, ) -display.show(plot) +display.root_group = plot a = np.linspace(4, 200, 50) z = [4, 5, 6, 7, 8] radi = [choice(z) for _ in a] b = [choice(a) for _ in a] Scatter( - plot, a, b, rangex=[0, 210], rangey=[0, 210], radius=radi, pointer_color=0xF456F3 + plot, + a, + b, + rangex=[0, 210], + rangey=[0, 210], + radius=radi, + pointer_color=0xF456F3, ) a = np.linspace(50, 170, 50) radi = [choice(z) for _ in a] b = [choice(a) for _ in a] Scatter( - plot, a, b, rangex=[0, 210], rangey=[0, 210], radius=radi, pointer_color=0x00FF00 + plot, + a, + b, + rangex=[0, 210], + rangey=[0, 210], + radius=radi, + pointer_color=0x00FF00, ) a = np.linspace(50, 100, 25) z = [ diff --git a/examples/shade_example.py b/examples/shade_example.py index 61b6239..0ee113b 100644 --- a/examples/shade_example.py +++ b/examples/shade_example.py @@ -98,4 +98,4 @@ def heat_index(temp, humidity): for i in range(40, 110, 10): Cartesian(plot, x, heat_index(x, i), rangex=[25, 50], rangey=[25, 60]) -display.show(plot) +display.root_group = plot diff --git a/examples/sparkline.py b/examples/sparkline.py index 740b2cb..caa86c7 100644 --- a/examples/sparkline.py +++ b/examples/sparkline.py @@ -37,7 +37,7 @@ plot.append(sparkline) # Plotting and showing the plot -display.show(plot) +display.root_group = plot for element in y: display.auto_refresh = False diff --git a/examples/stackplot.py b/examples/stackplot.py index abc19b7..34d5b00 100644 --- a/examples/stackplot.py +++ b/examples/stackplot.py @@ -27,4 +27,4 @@ Cartesian(plot, x, y, rangex=[0, 11], rangey=[0, 12], line_color=0x4444FF, fill=True) -display.show(plot) +display.root_group = plot diff --git a/examples/svg_example.py b/examples/svg_example.py index a20fb75..098dda0 100644 --- a/examples/svg_example.py +++ b/examples/svg_example.py @@ -17,4 +17,4 @@ SVG(plot, Temperature, 250, 50, 2, color.GREEN) SVG(plot, Temperature2, 300, 50, 0.25, color.BLUE) -display.show(plot) +display.root_group = plot diff --git a/examples/tickparameters.py b/examples/tickparameters.py index 050c5d0..f7c40ed 100644 --- a/examples/tickparameters.py +++ b/examples/tickparameters.py @@ -32,4 +32,4 @@ Cartesian(plot, x, y, line_color=color.BLACK) # Plotting and showing the plot -display.show(plot) +display.root_group = plot diff --git a/examples/uboxplot_example.py b/examples/uboxplot_example.py index c3d134d..246c744 100644 --- a/examples/uboxplot_example.py +++ b/examples/uboxplot_example.py @@ -66,4 +66,4 @@ plot.append(my_box) plot.append(my_box2) plot.append(my_box3) -display.show(plot) +display.root_group = plot From 82373338eb87b1a070085f2586986d543b9e6804 Mon Sep 17 00:00:00 2001 From: JPOSADA202020 Date: Sun, 5 Jan 2025 06:38:22 -0500 Subject: [PATCH 2/3] upd --- .github/workflows/build.yml | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 48e7c9f..19e7358 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -88,26 +88,3 @@ jobs: name: bundles path: ${{ github.workspace }}/bundles/ - build-docs: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Python 3.x - uses: actions/setup-python@v4 - with: - python-version: "3.x" - - - name: Install deps - run: | - pip install -r docs/requirements.txt -r requirements.txt - - - name: Build docs - working-directory: docs - run: sphinx-build -E -W -b html . _build/html - - - name: Archive docs - uses: actions/upload-artifact@v3 - with: - name: docs - path: ${{ github.workspace }}/docs/_build/html From b8b431a7360b905511138b6fba2272a109c11a53 Mon Sep 17 00:00:00 2001 From: JPOSADA202020 Date: Sun, 5 Jan 2025 06:39:44 -0500 Subject: [PATCH 3/3] upd --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 19e7358..9a233f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,4 +87,3 @@ jobs: with: name: bundles path: ${{ github.workspace }}/bundles/ -