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

First-class mechanism for executable examples #179

Open
JoshKarpel opened this issue Jan 3, 2023 · 0 comments
Open

First-class mechanism for executable examples #179

JoshKarpel opened this issue Jan 3, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@JoshKarpel
Copy link
Owner

JoshKarpel commented Jan 3, 2023

For https://github.com/JoshKarpel/pytest-its-whats-for-testing I needed to have editable and executable code examples (stored as separate files) in the presentation.

To get that talk out the door, I did this "outside the library".

It would be nice for there to be some kind of first-class mechanism for this inside spiel so that people don't need to reinvent the wheel. The problem is that this mechanism needs to be highly customizable:

  • Code examples may or may not need to be editable, and there might be multiple files involved in a given example.
  • Code examples might not be Python code, so the executable needs to be customizable (but sys.executable is probably a reasonable default). There might even be multiple things to execute!
  • The slide contents need to be totally customizable. I'm not even sure I feel comfortable providing a default...

... but it might also be worth making a "drop dead simple" version that is not very customizable, and then letting users build more complex versions if they want one - the primitives are all there, of course. Being too proscriptive is not the goal, and building something that can please everyone isn't possible either.

@JoshKarpel JoshKarpel added the enhancement New feature or request label Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant