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

Improve stubs part two #24

Merged
merged 9 commits into from
Jun 15, 2021
Merged

Conversation

Muream
Copy link
Contributor

@Muream Muream commented Jun 11, 2021

So, when trying to record the gif for the readme, I realized the completion wasn't working on some classes like SelectionList.
Turns out pybind11-stubgen gets a bit confused when a class has an inner class defined and tries to import the parent class as a module. This is tracked by this issue: sizmailov/pybind11-stubgen#36

I've opted to just remove the unwanted imports once the stubs are generated, might be a bit brute force but that felt like the only option that didn't cause other issues somewhere else in the stubs.

I'll also update the readme and contributing.md as part of this PR.
@mottosso is there a good place where I can store the gif?

@Muream Muream marked this pull request as draft June 11, 2021 22:18
@mottosso
Copy link
Owner

So, when trying to record the gif for the readme, I realized the completion wasn't working on some classes like SelectionList

My favourite part of making gifs. :) It's the ultimate unit test.

is there a good place where I can store the gif?

Yep, just drag and drop it into any issue, even here. It'll generate a universally unique link that never expires and can be used anywhere. If your gif is larger than 10 mb it won't work, but your gif should not be more than 10 mb.

Actually, make it an MP4 if you can, it'll be smaller and more crisp. Still try keep it under 10 seconds though, else split it up into multiple gifs that show off one small feature at a time.

@Muream
Copy link
Contributor Author

Muream commented Jun 14, 2021

Uploading some videos for the readme

Auto-completion

cmdc_completion_cropped.mp4

Type checking in action

cmdc_type_checking_cropped.mp4

@Muream
Copy link
Contributor Author

Muream commented Jun 14, 2021

Ah, looks like the <video> tag doesn't work with markdown on GitHub :(

@mottosso do you prefer the videos to display like in my previous comment (collapsable and with playback controls) or more like gifs (no controls, with autoplay and looping)?

@mottosso
Copy link
Owner

Hmm.

image

I don't mind non-looping mp4. So long as a gif isn't too large, ideally 2-3 mb, then either is OK I think. Up to you.

@Muream
Copy link
Contributor Author

Muream commented Jun 14, 2021

Hah, plays fine on chrome but not firefox,
I think I prefer looping gifs for short examples like this, looks cleaner with the rest of the file

@Muream Muream marked this pull request as ready for review June 14, 2021 19:28
@Muream
Copy link
Contributor Author

Muream commented Jun 14, 2021

All ready to go if that works for you 👍

@mottosso
Copy link
Owner

Looks good to me! I made the gifs a bit smaller to make it fit in a little better with the surrounding text.

@mottosso mottosso merged commit aa53b3a into mottosso:master Jun 15, 2021
@Muream Muream deleted the improve-stubs-part-two branch June 29, 2021 11:49
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants