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

Typer with sphinx-autobuild going on infinite loop #17

Closed
tasansal opened this issue Mar 4, 2024 · 4 comments
Closed

Typer with sphinx-autobuild going on infinite loop #17

tasansal opened this issue Mar 4, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@tasansal
Copy link

tasansal commented Mar 4, 2024

Hi, I just started using typer on my project documentation and it's great!

During my development, I use sphinx-autobuild plugin to automatically re-render the documentation when I modify anything in the /docs folder, including the conf.py file.

When I run sphinx-autobuild the docs get built and rendered correctly. However, at the end of it, it says conf.py was modified and the modification was typer_render_html.

I noticed this is the configuration for sphinx-contrib/typer, however, I am just using the defaults. Is the typer extension for sphinx modifying the conf.py file to add its default parameters?

I think this is a bug, or if I am doing something wrong please let me know.

I tried adding the configuration manually to conf.py with default values, which works, but I don't want to specify all the defaults in the conf.py file :) NVM, I was wrong, it still has the same infinite loop.

Thanks!

@tasansal
Copy link
Author

tasansal commented Mar 4, 2024

@bckohan bckohan self-assigned this Mar 4, 2024
@bckohan bckohan added the bug Something isn't working label Mar 5, 2024
@bckohan
Copy link
Collaborator

bckohan commented Mar 5, 2024

Hi @tasansal - thanks for reporting this - the typer extension is not directly modifying conf.py but it is setting some configuration values to lambdas. I have not been able to reproduce this issue using the latest two versions of sphinx-autobuild on osx python 3.8 and 3.12 builds, but I've gone ahead and changed these lambdas to functions.

Please try version 0.1.12 and let me know if that fixed your issue!

@tasansal
Copy link
Author

tasansal commented Mar 5, 2024

Hi @bckohan , thanks for a quick fix! Unfortunately, it didn't work. Here is the project I am working on.

https://github.com/TGSAI/segy

You can check the docs configuration under docs/conf.py, and the sphinx-autodoc can be ran by nox -rs docs command if you have nox, poetry, and python installed.

This is the trigger for the re-builds, and goes forever.

updating environment: [config changed ('typer_render_html')] 11 added, 0 changed, 0 removed

@bckohan
Copy link
Collaborator

bckohan commented Mar 5, 2024

@tasansal please see my PR - I think a jupyter notebook was causing this issue for you.

@bckohan bckohan closed this as completed Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants