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

Add support for classes to generated python common API index #2401

Merged
merged 5 commits into from
Jun 13, 2023

Conversation

jleibs
Copy link
Member

@jleibs jleibs commented Jun 12, 2023

What

Classes such as ClassDescription and AnnotationInfo make up an import part of the API surface for many rerun APIs. Add support for the classes to gen_common_index.py.

TODO:

  • After landing, cherry-pick into release-0.6

Additional:

  • set the heading_level for these generated components to 4, which matches the styling from the full package index and results in better TOC representation.
  • Add the same template modification that we use from functions to disable first so we get a continuity bar for the class rendering like we do for functions.
  • Modify the CSS so that links are visible.

Previews:
image

image

Related to: #2385
Closes: #2393

Checklist

PR Build Summary: https://build.rerun.io/pr/2401

Docs preview: https://rerun.io/preview/b58a10c/docs
Examples preview: https://rerun.io/preview/b58a10c/examples

@jleibs jleibs marked this pull request as ready for review June 12, 2023 23:10
@emilk emilk added the 📖 documentation Improvements or additions to documentation label Jun 13, 2023
Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Very nice!

Remember to add "Closes #XXXX" to the PR description. This PR closes at least two different issues

@@ -75,7 +75,9 @@
{% set heading_level = heading_level - 1 %}
{% endif %}

<div class="doc doc-contents {% if root %}first{% endif %}">
{# CHANGE: disable gating of first for root docstring #}
Copy link
Member

Choose a reason for hiding this comment

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

I have trouble parsing this sentence

@jleibs jleibs merged commit d8d6445 into main Jun 13, 2023
@jleibs jleibs deleted the jleibs/common_class_docs branch June 13, 2023 17:05
jleibs added a commit that referenced this pull request Jun 13, 2023
Classes such as `ClassDescription` and `AnnotationInfo` make up an
import part of the API surface for many rerun APIs. Add support for the
classes to `gen_common_index.py`.

TODO:
 - [ ] After landing, cherry-pick into release-0.6

Additional:
- set the heading_level for these generated components to 4, which
matches the styling from the full package index and results in better
TOC representation.
- Add the same template modification that we use from functions to
disable `first` so we get a continuity bar for the class rendering like
we do for functions.
 - Modify the CSS so that links are visible.

Previews:

![image](https://github.com/rerun-io/rerun/assets/3312232/ec0bd281-da4e-4a9a-886b-1689a41ea0ca)

![image](https://github.com/rerun-io/rerun/assets/3312232/3e48e72a-abef-408c-8731-18fead234679)

Related to: #2385
Closes: #2393

* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [ ] I've included a screenshot or gif (if applicable)

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2401

<!-- pr-link-docs:start -->
Docs preview: https://rerun.io/preview/b58a10c/docs
Examples preview: https://rerun.io/preview/b58a10c/examples
<!-- pr-link-docs:end -->
emilk pushed a commit that referenced this pull request Jun 15, 2023
Classes such as `ClassDescription` and `AnnotationInfo` make up an
import part of the API surface for many rerun APIs. Add support for the
classes to `gen_common_index.py`.

TODO:
 - [ ] After landing, cherry-pick into release-0.6

Additional:
- set the heading_level for these generated components to 4, which
matches the styling from the full package index and results in better
TOC representation.
- Add the same template modification that we use from functions to
disable `first` so we get a continuity bar for the class rendering like
we do for functions.
 - Modify the CSS so that links are visible.

Previews:

![image](https://github.com/rerun-io/rerun/assets/3312232/ec0bd281-da4e-4a9a-886b-1689a41ea0ca)

![image](https://github.com/rerun-io/rerun/assets/3312232/3e48e72a-abef-408c-8731-18fead234679)

Related to: #2385
Closes: #2393

* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [ ] I've included a screenshot or gif (if applicable)

<!-- This line will get updated when the PR build summary job finishes.
-->
PR Build Summary: https://build.rerun.io/pr/2401

<!-- pr-link-docs:start -->
Docs preview: https://rerun.io/preview/b58a10c/docs
Examples preview: https://rerun.io/preview/b58a10c/examples
<!-- pr-link-docs:end -->
@emilk emilk mentioned this pull request Jun 15, 2023
3 tasks
@emilk emilk mentioned this pull request Jun 15, 2023
1 task
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.

Improve Python API Docs CSS for links
2 participants