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

Use the docs napari dependency groups (docs, gallery) & add to contributing guide #589

Open
psobolewskiPhD opened this issue Feb 22, 2025 · 6 comments · May be fixed by #602
Open

Use the docs napari dependency groups (docs, gallery) & add to contributing guide #589

psobolewskiPhD opened this issue Feb 22, 2025 · 6 comments · May be fixed by #602
Labels

Comments

@psobolewskiPhD
Copy link
Member

🧰 Task

Added in napari/napari#7487

@psobolewskiPhD
Copy link
Member Author

So with those dependencies in napari/napari, it means the napari clone/install needs to use them.
And then we can drop the req.txt and that part of the Makefile?

docs/Makefile

Line 24 in 0c066aa

python -m pip install -qr $(current_dir)requirements.txt

@psobolewskiPhD
Copy link
Member Author

@jni missed some requirements, so this depends on: napari/napari#7637

jni pushed a commit to napari/napari that referenced this issue Feb 23, 2025
# References and relevant issues
Part of: napari/docs#589

# Description
In #7487 a few requirements were
missed.
This PR adds them back.
I also update the `_docs` constraints -- not for any of the new versions
(leave that to the normal PR), just for docs.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@psobolewskiPhD
Copy link
Member Author

psobolewskiPhD commented Feb 23, 2025

Once we merge:
#591
#590

I'm thinking:

  • Delete requirements.txt
  • remove docs-install from Makefile:

    docs/Makefile

    Lines 23 to 25 in 0c066aa

    docs-install:
    python -m pip install -qr $(current_dir)requirements.txt
    python -m pip freeze
  • html is standard, remove make docs because it's the same minus docs-install?

    docs/Makefile

    Lines 36 to 38 in 0c066aa

    docs: clean docs-install docs-build
    html: clean docs-build
  • Update README and docs contribution guide to use napari[pyqt, docs]
  • Update napari/napari build_docs.yml it's sort of vestigial, because it fires on merge to main and we do build/deploy from napari/docs instead. Still, can be manually triggered. Update build_docs.yml to match napari/docs napari#7640

Any thoughts @melissawm @jni ?

jni pushed a commit to napari/napari that referenced this issue Feb 24, 2025
# References and relevant issues
Part of: napari/docs#589
Depends on: napari/docs#591

# Description
This PR updates the build_docs.yml action to match napari/docs.
It's somewhat unneeded, because it ~fires off merge to main~ fires off
of `v*` tag push, while we build/deploy docs from napari/docs, but it
can be manually triggered, so it should be correct.
jni pushed a commit that referenced this issue Feb 25, 2025
…groups (#590)

# References and relevant issues
Part of addressing: #589
Depends on: napari/napari#7637

# Description
Instead of using the `docs-install` make step, this installs napari with
the `docs` and `gallery` dependency groups.
Also, switch to using PyQT5 to make things less flaky.
Note: our main build and deploy workflow has always been using pyqt5, so
now CircleCI matches what is deployed.
@melissawm
Copy link
Member

This looks like a good plan to me. I will try to get up to speed on the recent changes and report back if I see anything missing.

jni pushed a commit that referenced this issue Feb 26, 2025
# References and relevant issues
Part of: #589
Depends on: napari/napari#7637

# Description
Installs napari with `[docs]` and then doesn't run the `docs-install`
step of the Makefile.
@jni
Copy link
Member

jni commented Feb 26, 2025

remove html and use docs minus docs-install?

I don't think we need to remove html. It will be redundant with docs but it would disrupt some workflows for little gain. In the future, we may want to support other sphinx builds such as pdf.

So maybe docs just depends on html?

Minor thing: maybe we don't include clean in the html/docs build? If one wants a clean build, they can write make clean docs, but in many situations, the build can be sped up by not cleaning?

Update napari/napari build_docs.yml it's sort of vestigial, because it fires on merge to main and we do build/deploy from napari/docs instead. Still, can be manually triggered.

I don't understand this — docs should be rebuilt when we merge to napari main?

@psobolewskiPhD
Copy link
Member Author

if we remove docs-install because that's part of the napari install now, then make docs and make html become identical. Notice currently:

docs: clean docs-install docs-build 
html: clean docs-build 

make docs makes more sense to me than make html.

Docs are rebuilt on merge to main, but by the action triggered in this repo, not the napari/napari repo. So that action only really functions to be manually triggered, as an alternative to the circleCI builds on PR -- which is fine.

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