From cd12896cf320a778167e8a5f3bf8ef7d404c3efa Mon Sep 17 00:00:00 2001 From: "Martin K. Scherer" Date: Fri, 15 Sep 2023 17:01:38 +0200 Subject: [PATCH 1/2] only try to clear lines, if there are already artists in the axes. (#99) * only try to clear lines, if there are already artists in the axes. * update python versions * update action syntax --------- Co-authored-by: Cagtay Fabry <43667554+CagtayFabry@users.noreply.github.com> --- .github/workflows/pytest.yml | 4 ++-- setup.cfg | 5 +++-- weldx_widgets/widget_groove_sel.py | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 233ade2..dec2dcb 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -15,11 +15,11 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - py: ['3.8', '3.9'] + py: ['3.9', '3.10', '3.11'] weldx_version: ['weldx'] include: - os: ubuntu-latest - py: 3.8 + py: '3.10' weldx_version: 'git+https://github.com/BAMWelDX/weldx.git' env: WELDX_VERSION: ${{ matrix.weldx_version }} diff --git a/setup.cfg b/setup.cfg index a6376e2..4a4ac63 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,8 +21,9 @@ classifiers = Natural Language :: English Programming Language :: Python Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 Topic :: Scientific/Engineering :: Physics project_urls = Documentation = https://weldx.readthedocs.io @@ -32,7 +33,7 @@ project_urls = [options] packages = find: -python_requires = >=3.8 +python_requires = >=3.9 setup_requires = setuptools >=38.3.0 setuptools_scm diff --git a/weldx_widgets/widget_groove_sel.py b/weldx_widgets/widget_groove_sel.py index f8474e1..ccb37eb 100644 --- a/weldx_widgets/widget_groove_sel.py +++ b/weldx_widgets/widget_groove_sel.py @@ -385,7 +385,8 @@ def _update_plot(self, *args): self.groove_obj = groove_obj # TODO: re-plot can be avoided (e.g. set_xydata?) - self.ax.lines.clear() + if self.ax.lines: + self.ax.lines.clear() # self.ax.texts = [] self.groove_obj.plot(line_style="-", ax=self.ax) From 6bb6a583593b547031bfcaad3ac10bb1393fd9ec Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 15 Sep 2023 17:12:41 +0200 Subject: [PATCH 2/2] [pre-commit.ci] pre-commit autoupdate (#98) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.7.0 → 23.9.1](https://github.com/psf/black/compare/23.7.0...23.9.1) - [github.com/PyCQA/flake8: 6.0.0 → 6.1.0](https://github.com/PyCQA/flake8/compare/6.0.0...6.1.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Çağtay Fabry --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cff65b9..afb7c5d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,7 +19,7 @@ repos: exclude: devtools/conda.recipe/meta.yaml # doesn't play nice with jinja # - id: no-commit-to-branch # only makes sense for local pre-commit hooks - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 23.9.1 hooks: - id: black - repo: https://github.com/PyCQA/isort @@ -27,7 +27,7 @@ repos: hooks: - id: isort - repo: https://github.com/PyCQA/flake8 - rev: 6.0.0 + rev: 6.1.0 hooks: - id: flake8 - repo: https://github.com/PyCQA/pydocstyle