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

Fix documentation #2407

Closed
wants to merge 1 commit into from
Closed

Fix documentation #2407

wants to merge 1 commit into from

Conversation

mthrok
Copy link
Collaborator

@mthrok mthrok commented May 21, 2022

This commit fixes multiple issues with documentation.

https://output.circle-artifacts.com/output/job/23245537-e57b-4b9d-9b81-b3df20996d1f/artifacts/0/docs/tutorials/audio_resampling_tutorial.html

  1. Duplicated requirejs
    The nbsphinx extension introduced in Add tutorial to use NVDEC with Stream API #2393 pulled a requirejs
    which caused the initialization script to halt.
    As a result, the right side bar was left uninitialized.

  2. Undefined variable error
    It turned out that PyTorch's theme expected the downstream projects
    to define collapsedSections variable.
    Currently console log shows collapsedSections is not defined.
    As a result of this fix, we start to see the + symbol on left side.

  3. Fix the behavior of default expand
    Tweaks the right-side bar initialization behavior
    so that expand-all only happens once, not at every resize.

  4. Overwrite the link to GitHub
    The GitHub tab in main-menu always linked PyTorch core.
    This commit adds overwrite to torchaudio page

@mthrok mthrok changed the title Fix documentation initialization Fix documentation May 21, 2022
This commit fixes multiple issues with documentation.

1. Duplicated requirejs

The nbsphinx extension introduced in pytorch#2393 pulled a requirejs
which caused the initialization script to halt.

As a result, the right side bar was left uninitialized.

2. Undefined variable error

It turned out that PyTorch's theme expected the downstream projects
to define `collapsedSections` variable.

Currently console log shows `collapsedSections is not defined`.
As a result of this fix, we start to see the + symbol on left side.

3. Fix the behavior of default expand

Tweaks the right-side bar initialization behavior
so that expand-all only happens once, not at every resize.

4. Overwrite the link to GitHub

The `GitHub` tab in main-menu always linked PyTorch core.
This commit adds overwrite to torchaudio page
@mthrok mthrok marked this pull request as ready for review May 23, 2022 06:49
@mthrok mthrok requested review from hwangjeff and carolineechen May 23, 2022 06:50
Copy link
Contributor

@carolineechen carolineechen left a comment

Choose a reason for hiding this comment

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

changes 1-3 look good.

I'm not too convinced about the GitHub override, since the tabs are all general PyTorch related links (Mobile/Tutorials/Resources etc are related to PyTorch and not torchaudio), so I think it does make sense of GitHub directed to PyTorch repo. I do see where you're coming from though and don't have a strong opinion so am ok with this change. Alternatively, thoughts on proposing for the pytorch website to have a dropdown for GitHub tab similar to Docs, for the main different repos?

@mthrok
Copy link
Collaborator Author

mthrok commented May 23, 2022

changes 1-3 look good.

I'm not too convinced about the GitHub override, since the tabs are all general PyTorch related links (Mobile/Tutorials/Resources etc are related to PyTorch and not torchaudio), so I think it does make sense of GitHub directed to PyTorch repo. I do see where you're coming from though and don't have a strong opinion so am ok with this change. Alternatively, thoughts on proposing for the pytorch website to have a dropdown for GitHub tab similar to Docs, for the main different repos?

That's a good idea, I was thinking to maybe making the href configurable for each project. Let me move on with this one.

@facebook-github-bot
Copy link
Contributor

@mthrok has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@github-actions
Copy link

Hey @mthrok.
You merged this PR, but labels were not properly added. Please add a primary and secondary label (See https://github.com/pytorch/audio/blob/main/.github/process_commit.py)

mthrok added a commit to mthrok/audio that referenced this pull request May 24, 2022
Follow-up of pytorch#2407, the <script> was not properly closed on pages other than tutorials
@mthrok mthrok mentioned this pull request May 24, 2022
facebook-github-bot pushed a commit that referenced this pull request May 24, 2022
Summary:
Follow-up of #2407, the <script> was not properly closed on pages other than tutorials

Pull Request resolved: #2409

Reviewed By: carolineechen

Differential Revision: D36632668

Pulled By: mthrok

fbshipit-source-id: 9c0409a8011d77f8689e2dcdc1bd9844d3d31f79
@mthrok mthrok deleted the fix-doc branch May 29, 2022 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants