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
Improve makefile #41
Improve makefile #41
Conversation
@melissawm this looks great to me in essence, but I can't test it locally as my docs build doesn't work. I'm no expert with make docs and I get
I'm confident this probably has nothing to do with your PR, but I can't test it really... Maybe @psobolewskiPhD you can test this locally? I know you've been playing with docs a bit. |
I've never built the docs locally 👀 |
When you play with styles, global changes, structural changes, etc. It is much faster to build it locally than wait on CI. |
@DragaDoncila I got similar errors in a fresh env with just the requirements.txt following https://napari.org/dev/developers/documentation/index.html @melissawm should the instructions here be amended? Also, the
@Czaki Much faster he says... I don't know about that 🤣 But anyhow, once I had napari installed in the env and this PR, everything seemed to build. |
Ok - I'm not sure if this is the case for you folks but it seems related.
Now the second part: if in this same environment I do
now I have
and now, import napari works. -> So now the docs should build, but still they don't, because I still get a |
Actually, yeah that was on 3.10. Edit: no luck.
|
I tried installing magicgui, then it complained about npe2, so I did that, then it complained about Qt. |
Oh yes. If you are building the docs, you need to install napari[dev] in the environment first. In any case, let me try and debug this and maybe amend the docs. |
OK I think the 2nd point in this section:
should just start with "To build docs locally or if you wish ..." |
Makes building paths more generic and allows building from a local napari clone folder.
So right now it reads
Nevermind, I see that this should be added to the first item too! |
@melissawm Maybe straying off topic, but what do you think of going back to making a |
Also adds napari[dev] as a docs dependency, to allow building the docs without installing the napari development version first.
5bd865a
to
9b62877
Compare
I think I went the other way here, which is: if you are only focused on the docs, you can install the latest |
Yeah, I get that. |
Hm ok, I was wrong here - as it is now, you actually do need to clone the main napari folder to build the docs because of the example gallery. I will work some more on this. |
docs-xvfb: | ||
python $(docs_dir)/_scripts/prep_docs.py | ||
NAPARI_APPLICATION_IPY_INTERACTIVE=0 xvfb-run --auto-servernum sphinx-build -b html docs/ docs/_build -D sphinx_gallery_conf.examples_dirs=$(GALLERY_PATH) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@psobolewskiPhD this command, if you have xvfb installed, will allow you to build the docs without seeing all of the napari windows 😍 Thanks to @dalthviz for the tip!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what that is/means at the moment, but will try to look into if it's a thing on mac!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xvfb is Linux specific.
Ok - I think the I have also added a |
Ok, I followed the directions on the new Contributing Docs page and everything built correctly! I'm not sure how to use the xvbf thing. I tried: |
Maybe just a typo? it is However, I do have the xorg-server-xvfb package installed in my Manjaro machine, so I think for a Mac this may be a little bit more effort - see for example this reddit thread EDIT: Looks like this is the best option https://www.xquartz.org/Developer-Info.html |
Christ, sorry. I guess I've had one drink too many for being detail oriented! |
docs/requirements.txt
Outdated
@@ -6,6 +6,7 @@ sphinx-favicon | |||
sphinx-gallery | |||
sphinx_autodoc_typehints==1.12.0 | |||
myst-nb | |||
napari[dev] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With napari/napari#5438 I wonder if this is sufficient—in my experience the viewer does open, so I think it does need Qt, while now napari[dev]
doesn't auto-install a Qt backend.
So for the live 0.4.17 behavior, using pyqt5, the default, this should be napari[pyqt,dev]
, as per:
#78
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, the just edited in this PR contribution stuff already says to install dev napari explicitly:
- a development installation of napari. Follow the [contributor guide](dev-installation) for details on how to do this;
That guide explains how [dev] works.
So I think we should just remove this line, because if you leave as is, then no QT backend, so stuff won't work. If you make it [pyqt,dev]
then it only works when pypi wheel of pyqt is available—not on my mac for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we use these requirements in any place? If no then maybe just remove it and add docs
extra to the napari setup.cfg?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be pro on a napari[docs], as I noted above:
#41 (comment)
Basically, [dev] installs [testing] which is pretty heavy. For docs I think we just need the examples to build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
100%, napari[docs]
is the way
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So maybe for now we remove it here, so this can be merged, then make napari PR and then make a new PR here to adjust the copy and the requirements.txt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can open a follow up as soon as this is merged. Let me remove this line here then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks ok
Oh sorry - I missed that. Let me rephrase. |
Ok - I see what happened. I confused what was already merged and what is still in PRs. #72 fixes the dev installation instructions, so if that is merged first, this PR will be just fine. Maybe we can do that? |
#72 has a merge conflict, I will take a look this evening and merge. |
#72 is merged—thanks for fixing the conflicts ❤️ |
Done! on the |
Description
Makes building paths more generic and allows building from a local napari clone folder.
Type of change
References
Related to, but does not fix, #5222
How has this been tested?
Final checklist:
trans.
to make them localizable.For more information see our translations guide.