From 2dc2ca8d4c7e14dd7d8ff47cb0875d282410da21 Mon Sep 17 00:00:00 2001 From: Lauren Adoram-Kershner <42873279+ladoramkershner@users.noreply.github.com> Date: Mon, 9 Aug 2021 08:23:05 -0700 Subject: [PATCH] Setting up AutoCNet to interact with RTDs (#583) * adding RTD files * dont build NBs and export ISISROOT to environment * adding dummy ISISDATA env variable for kalasiris * adding nbsphinx to environment and incorperating very bad work around to kalasiris import requirements * addressing warnings * adding workshops index.rst * simplifying docs environment requirements and mocking models, reverting junky kalasiris workaround --- .readthedocs.yaml | 13 +++++ docs/Makefile | 1 + docs/conf.py | 54 +++++++++++++++++++ docs/environment.yml | 12 +++++ docs/library/matcher/ciratefi.rst | 2 +- docs/library/matcher/cpu_outlier_detector.rst | 2 +- .../library/matcher/cuda_outlier_detector.rst | 2 +- docs/users/index.rst | 1 + docs/users/tutorials/index.rst | 9 ++-- docs/users/workshops/index.rst | 11 ++++ 10 files changed, 100 insertions(+), 7 deletions(-) create mode 100644 .readthedocs.yaml create mode 100644 docs/environment.yml create mode 100644 docs/users/workshops/index.rst diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 00000000..4fc1d8bd --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,13 @@ +# .readthedocs.yaml +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +# Build documentation in the docs/ directory with Sphinx +sphinx: + configuration: docs/conf.py + +conda: + environment: docs/environment.yml diff --git a/docs/Makefile b/docs/Makefile index 9a36cab0..ec02fa14 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -180,3 +180,4 @@ pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." + diff --git a/docs/conf.py b/docs/conf.py index afd6dd74..adc2380b 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -45,6 +45,59 @@ sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) sys.path.insert(0, os.path.abspath('../')) +for mod_name in ( + "csmapi", + "cv2", + "dill", + "geoalchemy2", + "geoalchemy2.shape", + "geopandas", + "kalasiris", + "knoten", + "knoten.csm", + "matplotlib", + "matplotlib.pyplot", + "numpy", + "ogr", + "osgeo", + "pandas", + "pandas.core", + "pandas.core.indexing", + "PIL", + "plio", + "plio.io", + "plio.io.io_gdal", + "plio.io.io_controlnetwork", + "plio.io.isis_serial_number", + "plio.utils", + "plurmy", + "psycopg2", + "psycopg2.extensions", + "pvl", + "pyproj", + "redis", + "scipy", + "scipy.spatial", + "scipy.spatial.distance", + "scipy.special", + "scipy.stats", + "scipy.ndimage", + "scipy.ndimage.interpolation", + "shapely", + "shapely.affinity", + "shapely.geometry", + "shapely.ops", + "shapely.wkt", + "shapely.wkb", + "skimage", + "skimage.transform", + "sklearn", + "sklearn.cluster", + "sklearn.neighbors", + "sqlalchemy_utils", + "yaml" +): + sys.modules[mod_name]= MagicMock() import autocnet # -- General configuration --------------------------------------------- @@ -52,6 +105,7 @@ import autocnet # If your documentation needs a minimal Sphinx version, state it here. needs_sphinx = '1.3' nbsphinx_allow_errors = True +nbsphinx_execute = 'never' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. diff --git a/docs/environment.yml b/docs/environment.yml new file mode 100644 index 00000000..d4931788 --- /dev/null +++ b/docs/environment.yml @@ -0,0 +1,12 @@ +name: autocnet +channels: + - conda-forge + - default + +dependencies: + - cmake + - nbsphinx + - networkx + - sphinx + - sqlalchemy + - yaml diff --git a/docs/library/matcher/ciratefi.rst b/docs/library/matcher/ciratefi.rst index 9cad1e91..38436786 100644 --- a/docs/library/matcher/ciratefi.rst +++ b/docs/library/matcher/ciratefi.rst @@ -1,5 +1,5 @@ :mod:`matcher.ciratefi` --- RST-BC Invariant template match algorithm -==================================================================== +===================================================================== The :mod:`matcher.ciratefi` module diff --git a/docs/library/matcher/cpu_outlier_detector.rst b/docs/library/matcher/cpu_outlier_detector.rst index e6e43994..c3b0a546 100644 --- a/docs/library/matcher/cpu_outlier_detector.rst +++ b/docs/library/matcher/cpu_outlier_detector.rst @@ -1,5 +1,5 @@ :mod:`matcher.cpu_outlier_detector` --- Finding outliers in both the keypoints and the matches -========================================================================================== +============================================================================================== The :mod:`matcher.cpu_outlier_detector` module diff --git a/docs/library/matcher/cuda_outlier_detector.rst b/docs/library/matcher/cuda_outlier_detector.rst index 67046dc9..863321b2 100644 --- a/docs/library/matcher/cuda_outlier_detector.rst +++ b/docs/library/matcher/cuda_outlier_detector.rst @@ -1,5 +1,5 @@ :mod:`matcher.cuda_outlier_detector` --- Finding outliers in both the keypoints and the matches -========================================================================================== +=============================================================================================== The :mod:`matcher.cpu_outlier_detector` module diff --git a/docs/users/index.rst b/docs/users/index.rst index da863158..3e723cac 100644 --- a/docs/users/index.rst +++ b/docs/users/index.rst @@ -3,3 +3,4 @@ installation tutorials/index + workshops/index diff --git a/docs/users/tutorials/index.rst b/docs/users/tutorials/index.rst index 977ea5cf..336b83e1 100644 --- a/docs/users/tutorials/index.rst +++ b/docs/users/tutorials/index.rst @@ -8,7 +8,8 @@ Working With ISIS Control Networks .. toctree:: :maxdepth: 1 - Ingesting from ISIS control network + Ingesting from ISIS control network + Check for empty overlaps and overlap connectivity Using outlier detection to check for bad measures @@ -31,9 +32,9 @@ Working With Apollo Pan Creating a Control Network Advanced: Extending the CandidateGraph -Coupled Decomposition ---------------------- +Change Detection +---------------- .. toctree:: :maxdepth: 1 - Apollo Metric Coupled Decomposition + Change detection examples diff --git a/docs/users/workshops/index.rst b/docs/users/workshops/index.rst new file mode 100644 index 00000000..3d47482b --- /dev/null +++ b/docs/users/workshops/index.rst @@ -0,0 +1,11 @@ +Astrogeology Science Center Workshop +------------------------------------ + +.. toctree:: + :maxdepth: 1 + + Jupyter notebook and jupyter kernel basics + Introduction to python packages + Using PLIO to analyze control networks + Homography and Fundamental matrix outlier detection in AutoCNet + Generating a Control Network with AutoCNet -- GitLab