Skip to content

Commit

Permalink
Fixed readthedocs build bugs.
Browse files Browse the repository at this point in the history
Added sympy, matplotlib.pyplot, and mpi4py.MPI.Get_size.return_value
to MagicMock. Also had to remove importlib.metadata.version call
from mcdc/__init__.py for now, as readthedocs cannot find mcdc's
metadata for some reason.
  • Loading branch information
clemekay committed Nov 6, 2024
1 parent a6e9df2 commit c3dc81c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
# On Read the Docs, need to mock any python packages that would require c
from unittest.mock import MagicMock

MOCK_MODULES = ["mpi4py", "colorama", "mpi4py.util.dtlib"]
MOCK_MODULES = ["mpi4py", "colorama", "mpi4py.util.dtlib", "sympy", "matplotlib.pyplot"]
sys.modules.update((mod_name, MagicMock()) for mod_name in MOCK_MODULES)

from mpi4py import MPI
MPI.COMM_WORLD.Get_size.return_value = 1

# -- Project information -----------------------------------------------------

Expand Down
3 changes: 2 additions & 1 deletion mcdc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@
visualize,
)

__version__ = importlib.metadata.version("mcdc")
# Temporarily commenting out so docs will build
# __version__ = importlib.metadata.version("mcdc")

0 comments on commit c3dc81c

Please sign in to comment.