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

Add GIF reader and implement tight plotting for 2D #3038

Merged
merged 6 commits into from Jul 27, 2022
Merged

Conversation

akaszynski
Copy link
Member

Add a basic GIF reader. This is needed for testing of a separate animation PR.

>>> import pyvista
>>> from pyvista import examples
>>> filename = examples.download_gif_simple(load=False)
>>> filename.split("/")[-1]  # omit the path
'sample.gif'
>>> reader = pyvista.get_reader(filename)
>>> mesh = reader.read()
>>> mesh.plot(rgba=True, zoom='tight', border=True, border_width=2)

tmp

@github-actions github-actions bot added the enhancement Changes that enhance the library label Jul 21, 2022
@codecov
Copy link

codecov bot commented Jul 21, 2022

Codecov Report

Merging #3038 (c22285f) into main (8887b85) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #3038      +/-   ##
==========================================
+ Coverage   94.37%   94.39%   +0.01%     
==========================================
  Files          76       76              
  Lines       16541    16630      +89     
==========================================
+ Hits        15611    15698      +87     
- Misses        930      932       +2     

Copy link
Contributor

@MatthewFlamm MatthewFlamm left a comment

Choose a reason for hiding this comment

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

LGTM so far. I had many thoughts on future implementations from this PR, some of which I mentioned here. Feel free to ignore those to keep this PR manageable.

pyvista/utilities/reader.py Outdated Show resolved Hide resolved
pyvista/utilities/reader.py Show resolved Hide resolved
pyvista/utilities/reader.py Show resolved Hide resolved
pyvista/plotting/camera.py Outdated Show resolved Hide resolved
pyvista/plotting/camera.py Outdated Show resolved Hide resolved
pyvista/utilities/reader.py Show resolved Hide resolved
pyvista/plotting/camera.py Outdated Show resolved Hide resolved
pyvista/plotting/camera.py Outdated Show resolved Hide resolved
@akaszynski
Copy link
Member Author

LGTM so far. I had many thoughts on future implementations from this PR, some of which I mentioned here. Feel free to ignore those to keep this PR manageable.

Ha! There's only like 10 comments. "Manageable" is sub-300 when GitHub starts breaking down because @adeak found 200 edge cases, typos, and general things I didn't think about. Honestly, I've learned so much about software engineering because you guys are so critical, I appreciate the feedback.

@akaszynski akaszynski changed the title Add GIF reader Add GIF reader and implement tight plotting for 2D Jul 23, 2022
@akaszynski
Copy link
Member Author

@MatthewFlamm, when you get a second, would you mind giving this a quick review?

Copy link
Contributor

@MatthewFlamm MatthewFlamm left a comment

Choose a reason for hiding this comment

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

LGTM

@MatthewFlamm
Copy link
Contributor

I like this _GIFReader implementation that mimics the vtk structure better than the PVDReader which I implemented. It gives me some ideas.

@adeak adeak merged commit 683de8a into main Jul 27, 2022
@adeak adeak deleted the feat/add_gif_reader branch July 27, 2022 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Changes that enhance the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants