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

Ensure api directory is present to build documentation #16467

Merged

Conversation

Darshan808
Copy link
Contributor

References

This PR addresses the issue #16466

Issue

When running make html, the build process fails with the following error:
FileNotFoundError: [WinError 3] The system cannot find the path specified: '...\\jupyterlab\\docs\\source\\api'

Code changes

This PR addresses an issue where the documentation build process fails if the api directory is not present. Specifically, running make html results in a FileNotFoundError because Sphinx expects the docs/source/api directory to exist.

Since the api directory is under .gitignore, it is not present in a newly cloned repo. To solve this, I added a few lines of code to create the api directory if it is not present during the documentation build process. This ensures that the api directory is always present, so Sphinx doesn't raise any errors.

After modifying the make.bat file, docs build successfully in windows:

Screenshot 2024-06-10 074142

Additional Context:

  1. This change ensures that new contributors or users can build the documentation without encountering this error.
  2. This PR helps improve the developer experience by preventing a common pitfall during the setup process.

Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

@krassowski krassowski added this to the 4.2.x milestone Jun 10, 2024
@krassowski krassowski linked an issue Jun 10, 2024 that may be closed by this pull request
Copy link
Member

@krassowski krassowski 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 @Darshan808!

@krassowski krassowski merged commit 6c87a23 into jupyterlab:main Jun 10, 2024
83 checks passed
@krassowski krassowski changed the title Ensure api Directory is Present to Build Documentation Ensure api directory is present to build documentation Jun 10, 2024
@krassowski
Copy link
Member

@meeseeksdev please backport to 4.2.x

meeseeksmachine pushed a commit to meeseeksmachine/jupyterlab that referenced this pull request Jun 10, 2024
krassowski pushed a commit that referenced this pull request Jun 10, 2024
…ntation (#16469)

Co-authored-by: Darshan Poudel <127468609+Darshan808@users.noreply.github.com>
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.

Bug: 'make html' command raises error while building docs
2 participants