Skip to content

Commit

Permalink
Merge pull request #148 from Dana-Farber-AIOS/readthedocs
Browse files Browse the repository at this point in the history
Fix readthedocs build
  • Loading branch information
jacob-rosenthal committed Jul 30, 2021
2 parents b8f5d02 + e234c42 commit 9443765
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ sphinx:
fail_on_warning: false

conda:
environment: environment.yml
environment: docs/env_readthedocs.yml
37 changes: 37 additions & 0 deletions docs/env_readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# same as the main environment.yml, but without openslide or spams (which have C dependencies)
# see: https://docs.readthedocs.io/en/stable/faq.html#i-get-import-errors-on-libraries-that-depend-on-c-modules

name: pathml

channels:
- conda-forge
- pytorch

dependencies:
- pip==21.2.1
- python==3.8
- numpy>=1.16.4,<1.19.0
- scipy>=1.5.4
- scikit-image>=0.16.2
- matplotlib==3.1.3
- openjdk==8.0.152
- pytorch==1.9.0
- h5py==3.1.0
- dask==2021.7.1
- pydicom==2.1.2
- pytest>=6.2.2
- pre-commit==2.13.0
- pip:
- opencv-contrib-python==4.5.3.56
- javabridge==1.0.19
- python-bioformats==4.0.0
- scanpy==1.7.2
- anndata==0.7.4
- deepcell>=0.9.0
- cellpose>=0.6.1
- tensorly==0.6.0
- ipython>=7.20.0
- sphinx>=3.4.3
- nbsphinx>=0.8.1
- nbsphinx-link>=1.3.0
- sphinx-rtd-theme>=0.5.1
4 changes: 4 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# mocking imports which require C extension for readthedocs builds
# see: https://docs.readthedocs.io/en/stable/faq.html#i-get-import-errors-on-libraries-that-depend-on-c-modules
autodoc_mock_imports = ["openslide", "spams"]


def setup(app):
app.add_css_file('css/pathml.css')

0 comments on commit 9443765

Please sign in to comment.