Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags for simple_scatter.py demo #27302

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

Merged
merged 1 commit into from
Sep 16, 2024

Conversation

gougouasmi
Copy link
Contributor

PR summary

Hello! This PR adds the tags for the simple scatter demo. I tagged a few more examples during the sprint. I wanted to start with just one to see how it goes.

Link to the scatter demo:
https://matplotlib.org/devdocs/gallery/animation/simple_scatter.html

Related: #27235

PR checklist

@story645 story645 added the Documentation: tags tagging examples + proposing new tags label Nov 9, 2023

# %%
#
# .. tags:: component: animation, component: scatter, purpose: reference, level: intermediate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think scatter is plot_type: scatter?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected. thank you!

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join us on gitter for real-time discussion.

For details on testing, writing docs, and our review process, please see the developer guide

We strive to be a welcoming and open project. Please follow our Code of Conduct.

Comment on lines 37 to 38
# .. tags:: component: animation, plot type: scatter,
# .. tags:: purpose: reference, level: intermediate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# .. tags:: component: animation, plot type: scatter,
# .. tags:: purpose: reference, level: intermediate
# .. tags:: component: animation, plot type: scatter, purpose: reference, level: intermediate

tags can all be on one line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this edit should be made for two reasons:

  1. the rendering makes it so that there are two Tags: sections in the html

  2. the trailing comma makes it treat "" as a tag which displays oddly and I think is causing the doc build failure.

That said, putting it on one line does break linting due to line length, does the tag directive have a good way of dealing with that/splitting across lines in the same directive?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I think question for @melissawm if the following would be an ok ask

.. tags::
 
   tag1, ......., tagn
   tagn+1, ....., tagn+8

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for reviewing the commits and the suggestion! I made the change suggested above

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that is a reasonable suggestion. I will open an issue on sphinx-tags and try to get to it. For now can we ignore the linting on this line/file?

Copy link
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stylistic nitpick, but otherwise looks good.
ETA: Basically, I'll leave this open for a bit so you can choose whether to make the change I suggested, but I think it's okay to merge w/o the change.

@ksunden
Copy link
Member

ksunden commented Dec 20, 2023

Cycling to rerun doc test

@ksunden ksunden closed this Dec 20, 2023
@ksunden ksunden reopened this Dec 20, 2023
@story645
Copy link
Member

story645 commented Dec 21, 2023

@ksunden so I've got multiline content tags implemented, it's just waiting on reviews and merging melissawm/sphinx-tags#84 which should be good to go after melissawm/sphinx-tags#89

But doc tests will fail w/o those PRs in.

@story645
Copy link
Member

@gougouasmi did you want to handle the rest of your tags? I left them out of my batch PRs in case you did.

@gougouasmi
Copy link
Contributor Author

Hello @story645 ! I am a bit lost about what to do from here. Are we waiting on two other PRs? melissawm/sphinx-tags#84 and melissawm/sphinx-tags#89

@story645
Copy link
Member

Are we waiting on two other PRs? melissawm/sphinx-tags#84 and melissawm/sphinx-tags#89

Kinda - those implement support for putting the tags in the body of the directive:

.. tag::

   t1, t2, etc

But tags on one line work perfectly well. Basically if you're still interested you can put in the PR even if it'll be a bit before it can get merged - just put the tags on one line to test that it works.

@QuLogic
Copy link
Member

QuLogic commented Sep 13, 2024

Those upstream PRs are merged and released now; does this just need a rebase?

@story645 story645 force-pushed the feature_tagging_simple_scatter branch from 50e8701 to d6fee60 Compare September 13, 2024 18:35
@github-actions github-actions bot added the Documentation: examples files in galleries/examples label Sep 13, 2024
@story645 story645 force-pushed the feature_tagging_simple_scatter branch from d6fee60 to 211239c Compare September 13, 2024 18:36
@story645
Copy link
Member

i took the liberty of rebasing b/c I feel bad that we've dragged this out so long. Sorry @gougouasmi!

Copy link
Member

@QuLogic QuLogic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems there's something missing in the tags extension that breaks the reference check, but we can fix the reference.

@story645 story645 force-pushed the feature_tagging_simple_scatter branch from 211239c to 66dfeaa Compare September 16, 2024 22:36
@story645
Copy link
Member

removed comma and put each on its own line

@QuLogic QuLogic merged commit b8540b4 into matplotlib:main Sep 16, 2024
22 checks passed
@QuLogic QuLogic added this to the v3.10.0 milestone Sep 16, 2024
@QuLogic
Copy link
Member

QuLogic commented Sep 16, 2024

Thanks @gougouasmi! Congratulations on your first PR to Matplotlib 🎉 We hope to hear from you again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation: examples files in galleries/examples Documentation: tags tagging examples + proposing new tags
Projects
Status: Waiting for author
Development

Successfully merging this pull request may close these issues.

6 participants