Skip to content

New sections for the sphinx-example page #445

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 13 commits into from
Sep 19, 2020
Merged

Conversation

kolibril13
Copy link
Member

This pull request implements the folder structure that was discussed in #379.
The examples are currently only placeholder examples and will be properly extended in a future pull request, although they are already now related to the corresponding sections.

As this is a bigger change then #444, I think it's better to merge #444 first before merging this (With the assumption that you like these changes ;) ).
here is how it looks:

example

@kolibril13 kolibril13 added the documentation Improvements or additions to documentation label Sep 16, 2020
@leotrs
Copy link
Contributor

leotrs commented Sep 16, 2020

The only comment I have is that all of the files inside the examples/ dir do not need to have "example" in their name. For example, I would suggest changing examples/text_examples.rst to just examples/text.rst. Note this generates shorter URLs as well.

@behackl
Copy link
Member

behackl commented Sep 16, 2020

We should probably also think about the relation between these examples and the reference manual.

Up to now, I mainly thought that examples illustrating a particular class or module should go in the corresponding docstrings so that they show up in the correct sections in the reference manual -- but I also really like the idea of having a more catalogue-like overview that makes it easy to see what manim can do without reading pages over pages of documentation.

I am not sure what is the best (long-term) approach here; what do you think?

@leotrs
Copy link
Contributor

leotrs commented Sep 16, 2020

Yeah I agree. I think each class and method should should have at least one graphical example in the docstring. This example should be pretty bare bones and illustrate ONLY that particular feature.

Then, we can use the examples section for perhaps more advanced or complicated examples, using many features at once and showing how they relate to one another.

Regardless, it would be nice to be able to automatically link each other. For example, at the bottom of each class, we could add a section listing "examples using this class", and just give a list of links.

@kolibril13
Copy link
Member Author

kolibril13 commented Sep 17, 2020

We should probably also think about the relation between these examples and the reference manual.

I am a huge fan of the catalogue-like overview, and for now, I want to improve that as a priority.
Having a link to the reference manual in the long term is something I also really like!
Maybe we can implement do this in a way similar to how the matplotlib people made this:
Yes, maybe we can do it the way this is also done in matplotlib:

Yeah I agree. I think each class and method should have at least one graphical example in the docstring. This example should be pretty bare bones and illustrate ONLY that particular feature.

This would be additionally very nice to have! I think first having a gallery and bare bone examples in the docs is a good starting point, and afterwards, we can try to link them together

@behackl
Copy link
Member

behackl commented Sep 17, 2020

Yes, maybe we can do it the way this is also done in matplotlib:

I really like this. Maybe there is a way to have the manim directive help us build something like that (semi-)automatically. I'll think about it a little; maybe we also open an issue for it.

Copy link
Member

@behackl behackl left a comment

Choose a reason for hiding this comment

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

Good stuff! I have some suggestions for minor imporvements, but overall I am satisfied; it will be good to have some sort of structure established.

kolibril13 and others added 6 commits September 19, 2020 09:36
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
@kolibril13 kolibril13 merged commit 2289376 into master Sep 19, 2020
@kolibril13 kolibril13 deleted the examples_folder_structure branch September 19, 2020 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants