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

Fix mypy bug on python 3.11 #3837

Merged
merged 1 commit into from
Jan 18, 2023
Merged

Fix mypy bug on python 3.11 #3837

merged 1 commit into from
Jan 18, 2023

Conversation

akaszynski
Copy link
Member

On Python 3.11, mypy erroniously reports an error:

$ python3.11 -m venv .venv
$ source .venv/bin/activate
$ pip install pre-commit
$ pre-commit run --all-files mypy
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

pyvista/plotting/mapper.py:273: error: Item "FieldAssociation" of "Union[str, FieldAs
sociation]" has no attribute "lower"  [union-attr]                                  
pyvista/core/composite.py:589: note: By default the bodies of untyped functions are n
ot checked, consider using --check-untyped-defs  [annotation-unchecked]             
pyvista/core/composite.py:590: note: By default the bodies of untyped functions are n
ot checked, consider using --check-untyped-defs  [annotation-unchecked]             
Found 1 error in 1 file (checked 89 source files)

Temporary solution is to ignore the type check in mapper.py so pre-commit works in Python 3.11. We can review/remove this later once this is fixed upstream.

Originally pointed out in #3318 (comment) and #3830 (comment).

@github-actions github-actions bot added the bug Uh-oh! Something isn't working as expected. label Jan 17, 2023
Copy link
Member

@banesullivan banesullivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@codecov
Copy link

codecov bot commented Jan 17, 2023

Codecov Report

Merging #3837 (18bfff6) into main (9043cd1) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #3837   +/-   ##
=======================================
  Coverage   94.11%   94.11%           
=======================================
  Files          87       87           
  Lines       19108    19108           
=======================================
  Hits        17984    17984           
  Misses       1124     1124           

Copy link
Member

@adeak adeak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. For posterity: this was mypy 0.991

@adeak adeak changed the title fix mypy bug on python 3.11 Fix mypy bug on python 3.11 Jan 17, 2023
@akaszynski akaszynski mentioned this pull request Jan 17, 2023
@akaszynski akaszynski merged commit 6b64049 into main Jan 18, 2023
@akaszynski akaszynski deleted the fix/type-bug-python3.11 branch January 18, 2023 19:45
@banesullivan banesullivan mentioned this pull request Feb 1, 2023
5 tasks
jmargeta added a commit to jmargeta/pyvista that referenced this pull request Nov 5, 2023
ImageData.contour_labeled is added and SurfaceNets3D algorithm from
a pre-release version of VTK is used. This is particularly useful for
visualization of medical images with their labels and the outputs of
multi-label segmentation maps.

Implements pyvista#5170

Note, version of vtk 9.3+ must be used which is currently in the pre-release
stage. Otherwise, the example is not generated and the test is not run.

See also:
Sarah F. Frisken, SurfaceNets for Multi-Label Segmentations with Preservation
of Sharp Boundaries, Journal of Computer Graphics Techniques (JCGT), vol. 11,
no. 1, 34-54, 2022. Available online http://jcgt.org/published/0011/01/03/

Note, silencing Mypy errors (as in pyvista#3837):
pyvista/core/filters/image_data.py:853: error: Argument 1 to "set_default_active_scalars" has incompatible type "ImageDataFilters"; expected "DataSet"  [arg-type]
pyvista/core/filters/image_data.py:854: error: "ImageDataFilters" has no attribute "active_scalars_info"  [attr-defined]
pyvista/core/filters/image_data.py:858: error: "ImageDataFilters" has no attribute "get_array_association"  [attr-defined]
banesullivan added a commit that referenced this pull request Nov 20, 2023
…5176)

* Add conversion of 3D label maps to labeled meshes.

ImageData.contour_labeled is added and SurfaceNets3D algorithm from
a pre-release version of VTK is used. This is particularly useful for
visualization of medical images with their labels and the outputs of
multi-label segmentation maps.

Implements #5170

Note, version of vtk 9.3+ must be used which is currently in the pre-release
stage. Otherwise, the example is not generated and the test is not run.

See also:
Sarah F. Frisken, SurfaceNets for Multi-Label Segmentations with Preservation
of Sharp Boundaries, Journal of Computer Graphics Techniques (JCGT), vol. 11,
no. 1, 34-54, 2022. Available online http://jcgt.org/published/0011/01/03/

Note, silencing Mypy errors (as in #3837):
pyvista/core/filters/image_data.py:853: error: Argument 1 to "set_default_active_scalars" has incompatible type "ImageDataFilters"; expected "DataSet"  [arg-type]
pyvista/core/filters/image_data.py:854: error: "ImageDataFilters" has no attribute "active_scalars_info"  [attr-defined]
pyvista/core/filters/image_data.py:858: error: "ImageDataFilters" has no attribute "get_array_association"  [attr-defined]

* Refer to the contouring example

* Add tests for SurfaceNets contour extraction

* Update comments

* Update pyvista/core/filters/image_data.py

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Update pyvista/core/filters/image_data.py

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Update examples/01-filter/contouring.py

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Update pyvista/core/filters/image_data.py

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Use FieldAssiciation enums

* Use FieldAssociation enums correctly

* Add tests for improved coverage

* Add tests for improved coverage

* Fix quotes in tests

---------

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>
Co-authored-by: Bane Sullivan <banesullivan@gmail.com>
ChristosT pushed a commit to ChristosT/pyvista that referenced this pull request Nov 28, 2023
…yvista#5176)

* Add conversion of 3D label maps to labeled meshes.

ImageData.contour_labeled is added and SurfaceNets3D algorithm from
a pre-release version of VTK is used. This is particularly useful for
visualization of medical images with their labels and the outputs of
multi-label segmentation maps.

Implements pyvista#5170

Note, version of vtk 9.3+ must be used which is currently in the pre-release
stage. Otherwise, the example is not generated and the test is not run.

See also:
Sarah F. Frisken, SurfaceNets for Multi-Label Segmentations with Preservation
of Sharp Boundaries, Journal of Computer Graphics Techniques (JCGT), vol. 11,
no. 1, 34-54, 2022. Available online http://jcgt.org/published/0011/01/03/

Note, silencing Mypy errors (as in pyvista#3837):
pyvista/core/filters/image_data.py:853: error: Argument 1 to "set_default_active_scalars" has incompatible type "ImageDataFilters"; expected "DataSet"  [arg-type]
pyvista/core/filters/image_data.py:854: error: "ImageDataFilters" has no attribute "active_scalars_info"  [attr-defined]
pyvista/core/filters/image_data.py:858: error: "ImageDataFilters" has no attribute "get_array_association"  [attr-defined]

* Refer to the contouring example

* Add tests for SurfaceNets contour extraction

* Update comments

* Update pyvista/core/filters/image_data.py

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Update pyvista/core/filters/image_data.py

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Update examples/01-filter/contouring.py

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Update pyvista/core/filters/image_data.py

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Use FieldAssiciation enums

* Use FieldAssociation enums correctly

* Add tests for improved coverage

* Add tests for improved coverage

* Fix quotes in tests

---------

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>
Co-authored-by: Bane Sullivan <banesullivan@gmail.com>
banesullivan added a commit that referenced this pull request Dec 14, 2023
* DynamicScraper: Add support for .png and .gif files

Query the plotter and use gif files if they are requested.
Use interactive (i.e.) vtksz files only if a scene exists in the plotter
fallback to static png if it does not.

* plot_directive: Add support for interactive scenes vis vrksz files

* plot_directive: Add option 'force_static'

Give the option to force a static image even if an interactive scene exists.
This allows to skip cases where the interactive scene is buggy or not as
expected.

* Replace "pyvista" scraper with DynamicScraper

* Use plot-directive instead of jupyter-execute in user-guide/*.rst

* plot-directive instead of jupyter-execute in sources/index.rst

* Apply suggestions from code review

* ViewerDirective: Support figure paths in either source or build directory.

The gallery extension generates the vtksz files under the source while the rest
of the documentation under build.  The ViewerDirective path replacements are
able to handle both now.

* sphinx_gallery: Add support for forcing static images

The sphinx gallery will look for the boolean variable
`PYVISTA_GALLERY_FORCE_STATIC_IN_DOCUMENT` in the parsed code to figure out if
static images should be generated instead of an interactive vtksz file.

Generation of static images can be also controlled at a block-level  defining
"PYVISTA_GALLERY_FORCE_STATIC = True" or "PYVISTA_GALLERY_FORCE_STATIC = False"
within the block.

* docs: use static images in examples that interactive does not look right

* docs: flying edges examples remove specular

It does not work well with interactive scenes and since flying edges is all
about creating a mesh it makes sense to sacrifice specular int his case.

* docs: plot-directive instead of jupyter-execute in getting-started/why

* Update tinypages test for offlineviewer

* docs: viewer_directive do path operation only on directories

strip filename using ".parent" to make sure we are operating on paths.
use "resolve()" to make comparing paths easier

* test_tinypages: Allow for both interactive scenes and static images

* test_tinypages: use static images for captions

the offlineviewer does not support captions yet.

* viewer_directive: offer alternative for is_relative for python < 3.9

`pathlib.Path.is_relative_to` was introduced in 3.9 while pyvista supports 3.8+.

* Update sphinx_gallery.py

* Update sphinx_gallery.py

* Apply suggestions from code review

* Update pyvista/ext/viewer_directive.py

* docs: add serve-html target

Add a target to allow serving the documentation via a http server.
This is required when generating interactive vtksz scenes.

* Update CONTRIBUTING.rst

* Update CONTRIBUTING.rst

* Update pyvista/ext/viewer_directive.py

* Update extrude-trim.py

* Update distance-between-surfaces.py

* Update sphinx_gallery.py

* Update preview-docs.yml

* Update preview-docs.yml

* Update docs.yml

* Update preview-docs.yml

* Delete .github/workflows/preview-docs.yml

* Update docs.yml

* sphinx-gallery: offer static and interactive scene as tabs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* docs: serve-html target use any available port

By default `python -m http.server` uses port 8000. This allows to pick some available port.

Co-authored-by: Bane Sullivan <banesullivan@gmail.com>

* docs: user-guide/index remove PBR

PBR is not yet supported by vtk.js

* tests: simplify working in tinypages test

Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>

* docs: update trimesh.org domain

Fixes intersphinx error: XXX

* tinypages: Add support for tabs

* docs: plot_directive will now produce tabbed documentation

* plot_directive: Add support for docsets

Using pyvista-plot:: in docset causes the snippet to appear twice during
parsing. Once including the `pyvista-plot` command and arguments as part of the
code  and once without.  We only process the second since this is when the
directive options are properly read.

* docs: make all docsets in charts.py static

* create-point-could example use static for first case

eye_dome_lighting is not implemented in vtk-js.

* [create-pull-request] update local intersphinx (#5161)

Co-authored-by: MatthewFlamm <MatthewFlamm@users.noreply.github.com>
Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>

* [pre-commit.ci] pre-commit autoupdate (#5180)

updates:
- [github.com/psf/black: 23.9.1 → 23.10.1](psf/black@23.9.1...23.10.1)
- [github.com/keewis/blackdoc: v0.3.8 → v0.3.9](keewis/blackdoc@v0.3.8...v0.3.9)
- [github.com/pre-commit/mirrors-mypy: v1.5.1 → v1.6.1](pre-commit/mirrors-mypy@v1.5.1...v1.6.1)
- [github.com/asottile/pyupgrade: v3.14.0 → v3.15.0](asottile/pyupgrade@v3.14.0...v3.15.0)
- [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](pre-commit/pre-commit-hooks@v4.4.0...v4.5.0)
- [github.com/python-jsonschema/check-jsonschema: 0.27.0 → 0.27.1](python-jsonschema/check-jsonschema@0.27.0...0.27.1)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* fix rotation bug with 90 degrees (#5181)

Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>

* remove deprecated multi_samples kwarg (#5185)

* Support button release events on interactor (#5160)

* Support button release events on interactor

* Fix AffineWidget usage

---------

Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>

* fix trimesh intersphinx (#5187)

* Enchance BUILDING_GALLERY flag code (#5189)

* Changed the way BUILDING_GALLERY flag was defined to a better way

* Support python 3.12 and vtk 9.3.0 in CI (#5196)

* support python 3.12 and vtk 9.3.0 in CI

* fix mpl version constraint

* test 3.12 on windows

* Update .github/workflows/testing-and-deployment.yml

* fix typo

* use rc aiohttp for now

* fix vtk change for Tetrahedra in docstring

* comment for aiohttp pin

* use in vtk master testing

* add to classifiers

* Apply suggestions from code review

Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>

---------

Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>

* Add option to get `figure_path` from environment variables (#5194)

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Remove `cell_arrays` in documentation (#5199)

Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>

* Add option to always get screenshots from plotter shows (#5197)

* feat: Add option to always get screenshots from plotter shows

* Add test

* Update pyvista/plotting/plotter.py

Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>

* Substitute all SCREENSHOT_ONLY appearences

* Update test_plotter.py

* Update test_plotter.py

* Use tmpdir

* Add global variable reset fixture

---------

Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>

* Add conversion of 3D label maps to labeled meshes with SurfaceNets. (#5176)

* Add conversion of 3D label maps to labeled meshes.

ImageData.contour_labeled is added and SurfaceNets3D algorithm from
a pre-release version of VTK is used. This is particularly useful for
visualization of medical images with their labels and the outputs of
multi-label segmentation maps.

Implements #5170

Note, version of vtk 9.3+ must be used which is currently in the pre-release
stage. Otherwise, the example is not generated and the test is not run.

See also:
Sarah F. Frisken, SurfaceNets for Multi-Label Segmentations with Preservation
of Sharp Boundaries, Journal of Computer Graphics Techniques (JCGT), vol. 11,
no. 1, 34-54, 2022. Available online http://jcgt.org/published/0011/01/03/

Note, silencing Mypy errors (as in #3837):
pyvista/core/filters/image_data.py:853: error: Argument 1 to "set_default_active_scalars" has incompatible type "ImageDataFilters"; expected "DataSet"  [arg-type]
pyvista/core/filters/image_data.py:854: error: "ImageDataFilters" has no attribute "active_scalars_info"  [attr-defined]
pyvista/core/filters/image_data.py:858: error: "ImageDataFilters" has no attribute "get_array_association"  [attr-defined]

* Refer to the contouring example

* Add tests for SurfaceNets contour extraction

* Update comments

* Update pyvista/core/filters/image_data.py

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Update pyvista/core/filters/image_data.py

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Update examples/01-filter/contouring.py

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Update pyvista/core/filters/image_data.py

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Use FieldAssiciation enums

* Use FieldAssociation enums correctly

* Add tests for improved coverage

* Add tests for improved coverage

* Fix quotes in tests

---------

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>
Co-authored-by: Bane Sullivan <banesullivan@gmail.com>

* Add more typehints (#5171)

* add typehints

* use forward declaration

* moar types

* Update pyvista/core/utilities/helpers.py

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

* pin numpy>=1.21.0

* Wide types

* final touch on pointset

---------

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>
Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>

* Use python 3.12 and vtk 9.3.0 in Build Documentation (#5202)

* Use python 3.12 and vtk 9.3.0 in Build Documentation

* Apply suggestions from code review

* Bump jupyterlab from 4.0.7 to 4.0.9 (#5219)

Bumps [jupyterlab](https://github.com/jupyterlab/jupyterlab) from 4.0.7 to 4.0.9.
- [Release notes](https://github.com/jupyterlab/jupyterlab/releases)
- [Changelog](https://github.com/jupyterlab/jupyterlab/blob/@jupyterlab/lsp@4.0.9/CHANGELOG.md)
- [Commits](https://github.com/jupyterlab/jupyterlab/compare/@jupyterlab/lsp@4.0.7...@jupyterlab/lsp@4.0.9)

---
updated-dependencies:
- dependency-name: jupyterlab
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump trimesh from 3.23.5 to 4.0.5 (#5222)

Bumps [trimesh](https://github.com/mikedh/trimesh) from 3.23.5 to 4.0.5.
- [Release notes](https://github.com/mikedh/trimesh/releases)
- [Commits](mikedh/trimesh@3.23.5...4.0.5)

---
updated-dependencies:
- dependency-name: trimesh
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump trame from 3.2.8 to 3.3.0 (#5223)

Bumps [trame](https://github.com/Kitware/trame) from 3.2.8 to 3.3.0.
- [Release notes](https://github.com/Kitware/trame/releases)
- [Changelog](https://github.com/Kitware/trame/blob/master/CHANGELOG.md)
- [Commits](Kitware/trame@v3.2.8...v3.3.0)

---
updated-dependencies:
- dependency-name: trame
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump osmnx from 1.7.0 to 1.7.1 (#5220)

Bumps [osmnx](https://github.com/gboeing/osmnx) from 1.7.0 to 1.7.1.
- [Changelog](https://github.com/gboeing/osmnx/blob/main/CHANGELOG.md)
- [Commits](gboeing/osmnx@v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: osmnx
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump scipy from 1.11.3 to 1.11.4 (#5221)

Bumps [scipy](https://github.com/scipy/scipy) from 1.11.3 to 1.11.4.
- [Release notes](https://github.com/scipy/scipy/releases)
- [Commits](scipy/scipy@v1.11.3...v1.11.4)

---
updated-dependencies:
- dependency-name: scipy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add `input_validation` package (#5100)

* Add input_validation package

* Update typing

* Update check_is_instance

* Revert updates to pyvista_ndarray.py

* Remove 'not not' repetition

* Update test_check_is_type

* Update test_check_is_subdtype

* Pre-commit

* Remove use of check_is_ArrayLike

* Update test_check_is_type

* Update test_check_is_type

* Update cast_array_to_NDArray

* Update cast_array_to_NDArray

* Remove np.zeros validation from coerce_shapelike_as_shape

* Update cast_array_to_NDArray

* Update docstrings

* Add check_is_iterable

* Add positional, kwarg special parameters

* Update docstrings, remove NumPy typing, rename functions

* Refactor coerce_arrayNx3 into validate_arrayNx3

* Split into separate modules

* Update module docstrings

* Move array casting to utilities

* Remove redundant calls to check_is_string

* Update test_utilities.py

* Pre-commit

* Rename validate_numeric_array -> validate_array

* Pre-commit

* Add validate_arrayN and check_length

* Pre-commit

* Add check length params to validate_array

* Improve test coverage

* Update tests

* Add check_is_sequence_of_strings

* Add check_string_is_in_list

* Add length, broadcast, and reshape options; add validate_array3

* Update typing

* Update typing

* Add must_be_nonnegative constraint; validate_uintlike_array

* Rename constraint params with 'must_be' prefix

* Update test_validate_uintlike_arrayN

* Remove redundant function

* Update test coverage

* Update docs

* Update docs; add check_is_scalar; minor code changes

* Improve test coverage

* Update docs, add examples

* Update pyvista/core/input_validation/validate.py

* Add API TOC autosummary

* Rename check_length -> check_has_length

* Change 'check that' to 'check if' in docs

* Rename check_string_is_in_iterable -> check_is_string_in_iterable

* Rename validate_transform_as_array3x3 -> validate_transform3x3

* Rename validate_transform_as_array4x4 -> validate_transform4x4

* Rename validate_uintlike_arrayN -> validate_arrayN_uintlike

* Update function special args to be consisent

* Rename transform input arg: transformlike -> transform

* Update module headers

* Update validation.rst

* Update CONTRIBUTING.rst

* Update docstrings

* Update validation.rst

* Update docstrings to fix build failure

* Add short-circuit return to avoid call to np.asanyarry

* Avoid redundant dtype check

* Rework _validate_shape_value to improve performance

* Update docstrings to fix build failure

* Fix typo

* Rework check_has_shape to improve performance

* Rework dtype checks to improve performance

* Optimization: replace calls to cast_to_ndarray with isinstance checks

* Add early retun for common cases in check_is_real

* Update validate.py

* Update CONTRIBUTING.rst

Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>

* Update tests/core/test_input_validation.py

Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>

* Update tests, improve coverage

* Update CONTRIBUTING.rst

* Update validate.py

* Update docs

* Update docs

* Update docs

* Update docs, add 'See Also'

* Update docs and typing

* Pre-commit

* Update docs, typing, add cross-references

* Update docs, add examples, minor fixes/edits

* Rename reshape -> reshape_to

* Add strict and axis params to check_is_sorted

* Update docstring

* Improve test coverage

* Simplify error re-raises

* Add validate_axes

* Update docstring

* Update tests

* Apply suggestions from code review

* Add name param to validate_axes

---------

Co-authored-by: Erik Bedard <bedarder@gmail.com>
Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>

* Fix small typo (#5225)

* Add Text3DSource class (#5218)

* Add Text3DSource class

* Update docstring

* Update depth arg position

* Update tests

* Update geometric_sources.py

* Refactor tests

* Update tests

* Update tests

* Update tests

* Apply suggestions from code review

---------

Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>

* Add `edge_opacity` property to `Property` class (#5192)

* Add `edge_opacity` property to `Property` class

* Update _property.py

* Update _property.py

* Update test_property.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update _property.py

* Update pyvista/plotting/_property.py

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Update test_property.py

* Update pyvista/plotting/_property.py

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Update pyvista/plotting/_property.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add `edges_opacity` property to `Theme` class

* Apply suggestions from code review

* Update themes.py

* Apply suggestions from code review

* Update _property.py

* Update _property.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Add `edge_opacity` as a keyword arg to `add_mesh`

* Apply suggestions from code review

* Update _property.py

* Update _property.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update _property.py

* Update _property.py

* Apply suggestions from code review

* Update pyvista/plotting/_property.py

Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Apply suggestions from code review

* Fix numpydoc-validation error

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>

* Add embeddable jupyter widget (#5168)

* Add embeddable jupyter widget

* Fix debugging

* Add basic test

* Add test-case in tinypages test for new widget (#5206)

Co-authored-by: Christos Tsolakis <christos.tsolakis@kitware.com>

* Add jupyter_sphinx to test dependencies

* Remove the tinypages test

* Remove jupyter_sphinx extension from test

---------

Co-authored-by: Christos Tsolakis <christos.tsolakis@kitware.com>

* Add `pack_labels` and `sort_labels` filters (#4802)

* Add pack_labels and sort_labels filters

* Fix failed doctest, remove unused test

* Add checks for VTK>=9.3

* Add doctest skips

* Generalize pack_labels to work with VTK < 9.3

* Apply suggestions from code review

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update test_dataset_filters.py

* Apply suggestions from code review

* Apply suggestions from code review

* Apply suggestions from code review

* Update data_set.py

* Update data_set.py

* Update data_set.py

* Update data_set.py

* Update docs and vtk checks

* Update filter to limit copying

* Update docstring

---------

Co-authored-by: Erik Bedard <bedarder@gmail.com>
Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Add local suppression of VTK debug messages (#5228)

Co-authored-by: Bane Sullivan <banesullivan@gmail.com>

* Deprecate/fix `PolyData.n_faces` (#5229)

* deprecate n_faces

* indent deprecation comment

Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>

* move module globals to class variables

* Remove the PolyData.n_faces example

Deprecation warning was causing failure during doctest

* fix n_faces_strict doc example

---------

Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>

* plot_directive: allow captions when tabs are used

* charts: doc_subs indent replacements to accommodate pyvista-plot directive

* tinypages: Add sphinx-design plugin to give access to tabs

* Update pointset.py

* Update requirements_test.txt

* docs: force interactive plot in create-pixel-art example

* Add documentation about PYVISTA_GALLERY_FORCE_STATIC* flags

* docs: fix spacing in PYVISTA_GALLERY_FORCE_STATIC_IN_DOCUMENT documentation

* docs: Various spelling and style fixes

Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>

* docs: set port of make serve to something predictable

Co-authored-by: Bane Sullivan <banesullivan@gmail.com>

* tests: make package requirements for tests less strict

Follows the current convention where:

- requirements_docs.txt: pin everything because our documentation build tends to be fragile and is only fully executed around releases
- requirements_test.txt: limit dependencies by minor release and let dependabot bump these which we can easily pick up on errors, deprecation warnings, or breakages
- requirements.txt: same as requirements_test.txt but this is just the core dependencies

Co-authored-by: Bane Sullivan <banesullivan@gmail.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Tetsuo Koyama <tkoyama010@gmail.com>
Co-authored-by: Christos Tsolakis <ChristosT@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bane Sullivan <banesullivan@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: MatthewFlamm <MatthewFlamm@users.noreply.github.com>
Co-authored-by: Kevin Marchais <kevinmarchais@gmail.com>
Co-authored-by: Alex Kaszynski <akascap@gmail.com>
Co-authored-by: MatthewFlamm <39341281+MatthewFlamm@users.noreply.github.com>
Co-authored-by: Amirhossein Safarzadeh <includesafarof@gmail.com>
Co-authored-by: Alex Fernandez <21alex295@gmail.com>
Co-authored-by: Jan Margeta <jmargeta@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: user27182 <89109579+user27182@users.noreply.github.com>
Co-authored-by: Erik Bedard <bedarder@gmail.com>
Co-authored-by: darikg <darikg@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Uh-oh! Something isn't working as expected.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants