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

Use source code for demo directly in demo #194

Merged

Conversation

edrogers
Copy link
Contributor

@edrogers edrogers commented Jan 9, 2023

Looking through the source code of the demo deck, I found the unused variable edit_function_src in the bindings slide:

    edit_function_src = dedent("".join(inspect.getsourcelines(edit_this_file)[0]))

I suspect this was originally intended to be a way to display some of the module's source directly in the a code-block on the slide. This seems like a good idea, so I tried following through on it. I think the result de-duplicates the source code without introducing too much messiness.

The slide deck produced is ultimately unchanged, so it's just a style preference. Let me know if you think it's worth it.

Tasks

  • Updated changelog.
  • Updated documentation.

@JoshKarpel
Copy link
Owner

JoshKarpel commented Jan 9, 2023

Definitely worth it! As you guessed, that line was a leftover from my attempt to do pretty much the same thing. I got flummoxed by the indentation, which it looks like you've solved here. Will take a closer look later!

@codecov
Copy link

codecov bot commented Jan 9, 2023

Codecov Report

Base: 82.5% // Head: 82.5% // Decreases project coverage by -0.0% ⚠️

Coverage data is based on head (e619c28) compared to base (7a55940).
Patch coverage: 100.0% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##            main    #194     +/-   ##
=======================================
- Coverage   82.5%   82.5%   -0.1%     
=======================================
  Files         33      33             
  Lines        843     842      -1     
  Branches      96      96             
=======================================
- Hits         696     695      -1     
  Misses       147     147             
Impacted Files Coverage Δ
spiel/deck.py 93.5% <100.0%> (-0.3%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@JoshKarpel JoshKarpel self-requested a review January 10, 2023 23:12
@JoshKarpel
Copy link
Owner

@edrogers I pushed up some new commits to your branch - I took inspiration from your approach on the indentation, but stitched things together with inspect.getsourcelines to avoid the start/stop comments. Let me know what you think!

@JoshKarpel JoshKarpel enabled auto-merge (squash) January 13, 2023 23:50
@JoshKarpel JoshKarpel merged commit 0f3ece5 into JoshKarpel:main Jan 13, 2023
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.

None yet

2 participants