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

Building documentation requires Fenics #221

Closed
pastewka opened this issue Jan 15, 2024 · 4 comments
Closed

Building documentation requires Fenics #221

pastewka opened this issue Jan 15, 2024 · 4 comments

Comments

@pastewka
Copy link
Collaborator

Build the documentation now requires Fenics, because there are Fenics examples in the documentation. While this is generally fine in the CI, the documentation should build without Fenics locally as installing Fenics is nontrivial.

@pastewka
Copy link
Collaborator Author

@jotelha - Can you take a look at this?

@jotelha
Copy link
Contributor

jotelha commented Jan 15, 2024

Will do. Right now, we first get a warning,

WARNING: [autosummary] failed to import matscipy.electrochemistry.poisson_nernst_planck_solver_fenics.
Possible hints:
* ModuleNotFoundError: No module named 'fenics'
* AttributeError: module 'matscipy.electrochemistry' has no attribute 'poisson_nernst_planck_solver_fenics'
* ImportError: 

and then building the documentation will fail at executing electrochemistry_2.py

building [html]: targets for 30 source files that are out of date
updating environment: [new config] 102 added, 0 changed, 0 removed
/home/jotelha/git/matscipy/docs/applications/cylinder_configurations.ipynb: Executing notebook using local CWD [mystnb]                                                                                           
/home/jotelha/git/matscipy/docs/applications/cylinder_configurations.ipynb: Executed notebook in 10.51 seconds [mystnb]
/home/jotelha/git/matscipy/docs/applications/elastic_constants.ipynb: Executing notebook using local CWD [mystnb]                                                                                                 
/home/jotelha/git/matscipy/docs/applications/elastic_constants.ipynb: Executed notebook in 21.82 seconds [mystnb]
/home/jotelha/git/matscipy/docs/applications/electrochemistry_1.py: Executing notebook using local CWD [mystnb]                                                                                                   
/home/jotelha/git/matscipy/docs/applications/electrochemistry_1.py: Executed notebook in 35.99 seconds [mystnb]
/home/jotelha/git/matscipy/docs/applications/electrochemistry_2.py: Executing notebook using local CWD [mystnb]                                                                                                   
/home/jotelha/git/matscipy/docs/applications/electrochemistry_1.py:440002: WARNING: Non-consecutive header level increase; H1 to H3 [myst.header]
/home/jotelha/git/matscipy/docs/applications/electrochemistry_1.py:510002: WARNING: Non-consecutive header level increase; H1 to H3 [myst.header]
/home/jotelha/git/matscipy/docs/applications/electrochemistry_1.py:570002: WARNING: Non-consecutive header level increase; H1 to H3 [myst.header]

Exception occurred:
  File "/home/jotelha/git/matscipy/isolated-venv/lib/python3.8/site-packages/myst_nb/core/execute/direct.py", line 50, in start_client
    raise ExecutionError(str(self.path)) from result.err
myst_nb.core.execute.base.ExecutionError: /home/jotelha/git/matscipy/docs/applications/electrochemistry_2.py
The full traceback has been saved in /tmp/sphinx-err-6yytmx4r.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make: *** [Makefile:55: html] Error 2

when fenics is not available. We want it to still build and conditionally ignore the fenics-dependent notebook if no fenics available.

@jotelha
Copy link
Contributor

jotelha commented Jan 15, 2024

These four lines #223 should suffice.

@jameskermode
Copy link
Member

Closed by #223

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

No branches or pull requests

3 participants