-
Notifications
You must be signed in to change notification settings - Fork 17
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
✨ NEW: Add solution
directive
#32
Conversation
@AakashGfude maybe you'll be able to provide some guidance regarding the warning test for the solution directive. It doesn't look like The strange thing is that when I run |
Codecov Report
@@ Coverage Diff @@
## master #32 +/- ##
==========================================
+ Coverage 97.09% 97.58% +0.48%
==========================================
Files 6 6
Lines 241 372 +131
==========================================
+ Hits 234 363 +129
- Misses 7 9 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Hey @najuzilu , sorry missed this comment. I guess it is the same thing you talked about on slack and is now solved? |
Yes, when |
@mmcky @AakashGfude I plan to rebase before merging haha. |
…or linked directives
The refactored code allows for easier implementation of other directives which behave similarly to |
this is really cool! One question - how "proof-specific" is this functionality? I ask because question and answer directives are one of the more-requested features in jupyter book, and I wonder if it's worth generalizing this a bit so that you can use it outside of the context of proofs. What do you all think? |
@mmcky made the same point. Of course there's nothing stopping people using the solutions / exercises without using any of the theorem / proof / lemma environments. But I guess your point is the name of the package will confuse people, so perhaps the solutions / exercises should be broken out into something separate? Or should the package itself be renamed? I agree that the solutions / exercises environments will be popular on their own. |
yeah I was imagining if this is a generically-useful directive, we could split it out into something like |
I'm fully in favor of this. @najuzilu has done some really nice work here, worthy of two extensions |
Ah yes, we plan to move these over to a new repo. I've already started some work on that. My main goal is to get this to work correctly with the current infrastructure. It will be very easy to migrate it to |
@najuzilu that works for me - though we should make the switch relatively quickly because I imagine there will be an API deprecation (as presumably people would just use |
my preference is for |
👍 let's use |
If everyone's okay with it, I'm going to go ahead and close this PR as I've transferred over the work to sphinx-exercise. I have already made a PR to depreciate immediately the |
*** IN PROGRESS ***
This PR introduces a new
solution
directive. The solution directive will reference anexercise
directive. The syntax is as follows:For more information on how this directive behaves, either check the deployed Netlify link below or read through #18.
Additional
algorithm
andproof
tests have been introduced to take into account any new changes introduced with the new directive. These tests include:Solution tests include:
solution
with an enumerableexercise
solution
with an unenumerable + simple titleexercise
solution
with an unenumerable+ inline-math titleexercise
solution
with an unenumerable + not titledexercise
solution
missing its argumentsolution
where the argument is incorrectexercise
labelsolution
usinglabel
andclass
optionssolution
referencing an enumerableexercise
solution
referencing an unenumerable + simple titleexercise
solution
referencing an unenumerable + inline-math titleexercise
solution
referencing an unenumerable + not titledexercise
solution
referencing incorrectsolution
labelsolution
with duplicate label