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 sphinxcontrib.jquery as a dependency #10

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jgarte
Copy link

@jgarte jgarte commented Mar 10, 2023

Hi, this PR intends to resolve #6.

@danwos
Copy link
Member

danwos commented Mar 10, 2023

Thanks for the PR.

I think we also need to activate the extension in the conf.py file so that it gets used.

There is a mechanism inside Sphinx, which allows extensions to be based on other extensions, so that they get activated automatically. I think we should integrate the usage of this mechanism into this PR as well, then the user doesn't need to do anything else as simply installing our extension.

@jgarte
Copy link
Author

jgarte commented Mar 10, 2023

Hi @danwos

Thanks for the review.

I updated the PR.

Is the new commit what you meant?

@danwos
Copy link
Member

danwos commented Mar 10, 2023

Sorry, not really.
We can configure Sphinx-Data-Viewer to activate the Sphinx-Query extension whenever a user loads our extension via extensions = ["sphinx_data_viewer"].
If we don't do this, the user needs to write:

extensions = [
   "sphinx_data_viewer",
   "sphinxcontrib.jquery"
   ]

And I guess a lot of users may miss this step.
But I can support you here and figure out how to do it, just need some days to find a free slot...

@jgarte
Copy link
Author

jgarte commented Mar 10, 2023

@danwos Thanks! Keep me posted on that.

@danwos
Copy link
Member

danwos commented Aug 14, 2023

Finally found some time and even better the Sphinx function to load other extensions.
See: https://www.sphinx-doc.org/en/master/extdev/appapi.html#sphinx.application.Sphinx.setup_extension

I hope we can call it in the setup() function of Sphinx-Data-Viewer. Something like:

setup_extension("sphinxcontrib.jquery")

I hope this does the trick without adding it to the user's conf.py file.

@jgarte: Do you find some time to add this to your PR?

@sigma67
Copy link

sigma67 commented Aug 28, 2023

Help needed here? As this is blocking #12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should it be mentioned somewhere that jquery is required to be installed for this to be used?
3 participants