-
-
Notifications
You must be signed in to change notification settings - Fork 160
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 tags to tutorials #2467
Add tags to tutorials #2467
Conversation
1ceb765
to
f5d0781
Compare
docs/source/_tags/bqskit.md
Outdated
@@ -0,0 +1,10 @@ | |||
(sphx_tag_bqskit)= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of these added files in _tags
are causing a few build warnings. Might need to fix some build errors when dependabot upgrades to 9.0
.
RemovedInSphinx90Warning: Sphinx 9 will drop support for representing paths as strings. Use "pathlib.Path" or "os.fspath" instead
https://github.com/unitaryfund/mitiq/actions/runs/10363857000/job/28688193465?pr=2467#step:8:212
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This warning appears to be an issue that could be fixed by downgrading Sphinx < 8.0
We have 2 pyquil tutorials in For example, if I have an https://github.com/unitaryfund/mitiq/actions/runs/10391784801/job/28775505338#step:8:1366 |
844df51
to
4dcf711
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2467 +/- ##
==========================================
+ Coverage 98.70% 98.71% +0.01%
==========================================
Files 88 89 +1
Lines 4091 4131 +40
==========================================
+ Hits 4038 4078 +40
Misses 53 53 ☔ View full report in Codecov by Sentry. |
bcdb497
to
8aad7b3
Compare
@purva-thakre I think the tag implementation is great. My only concern is that a user going to the examples page, will have to take extra steps to use the tags. Is there a way that the links to the tags could be incorporated into the examples page so that they can be accessed without an extra click? This may just be me nitpicking and if @cosenal and you think the details you provided at the top of the examples page is sufficient, then that's cool with me. |
@bdg221 I agree it would be nice to have the tags at the top of the page, but I think we could do that in a separate issue, unless @purva-thakre thinks it would be easier to just add it to this one. |
The tags become a long list on top of the examples. Which is why I chose to move them to a separate page. There's no way to list the tags horizontally because they are autogenerated as shown below: mitiq/docs/source/_tags/tagsindex.md Lines 4 to 29 in 8aad7b3
|
Sounds like there isn't an easy way to get the tags to horizontally appear above the examples and it makes more sense to put that in a separate issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial implementation of tags looks good.
@bdg221 Feel free to create the issue and assign it to yourself, if you are interested. This would involve requesting a new feature in https://github.com/melissawm/sphinx-tags because the examples in the official documentation are also using a vertical list. I chose to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless there is a specific reason for it (e.g. you manually adjusted some tag definition), I don't see much value in including the _tags
folder in the repo. The only benefit I can think of would be build consistency across different environments. However, we don't version control the docs/build
folder anyway, so we may as well do the same for _tags
.
@bdg221 Did you mean to click on «Request changes»? It's not clear from your comment. |
@cosenal I had to manually add |
You can still do that while gitignoring the |
No, I didn't mean to. I've cleared it now. |
@cosenal You're correct. For some reason, I thought the build would fail if I don't have the autogenerated Although every time we run |
Not sure if this is configurable, but is it possible to make the URL |
Converting to a draft to look into Nate's comment as well as the issue with |
I actually like the convention of using underscore in front of "build" folders in order to make them recognizable from folders that contain source files 🤷🏻♂️ |
@cosenal Looking through the configuration settings for sphinx-tags, they do not have a setting for not keeping the autogenerated files. So, even if I deleted the autogenerated files in this PR, someone else running |
@purva-thakre the mechanism you just described is .gitignore, which I see you have already modified accordingly :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🏷️
Yeah I generally agree with this as a method to indicate on your local machine what's happening. When that pattern shows its face publicly, however, I find strange. My comment was referring to the URL of the tags on the built documentation. E.g. in the current RTD build it reads but it would look more natural IMO to be
This is not a hill I'd like to die on, however. Again, just a vanity thing. While it's a topic of discussion, however, would |
Ah, yes. Initially, I had an incorrect path to |
No need to die on this hill @natestemen. Fixed in cc6704a
Is there a typo in this line? |
Honestly I don't know what I would prefer, whether dying on a hill, or becoming a cow stuck between two tags 😭 |
Merging this after the community call discussion. |
Description
Fixes #2463
The following are WIP:Basic
,Intermediate
andAdvanced
tags.pyquil
tag during the community callLicense
Before opening the PR, please ensure you have completed the following where appropriate.