From 8734791a0a7e2a702691fc0df4934dfadc58aa76 Mon Sep 17 00:00:00 2001 From: elbeejay Date: Tue, 27 Feb 2024 20:27:58 -0500 Subject: [PATCH] update docs --- .github/workflows/gh-pages.yml | 3 +++ .gitignore | 1 + README.md | 11 ++++----- docs/_config.yml | 2 +- docs/_toc.yml | 41 +++++++++++++++++++++++++++++++--- pyproject.toml | 3 ++- 6 files changed, 51 insertions(+), 10 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index f7feed3..1e2e89e 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -17,6 +17,9 @@ jobs: - name: Dependencies run: | if [ -f pyproject.toml ]; then pip install ".[docs]"; fi + - name: Copy the notebooks + run: | + if [ -d notebooks ]; then cp -r notebooks docs/notebooks; fi - name: Build Sphinx Documentation run: | sphinx-build docs _build/html -b html diff --git a/.gitignore b/.gitignore index 6634f56..4006b46 100644 --- a/.gitignore +++ b/.gitignore @@ -132,3 +132,4 @@ dmypy.json _build/ docs/api/ src/GOSTurban/_version.py +docs/notebooks/ \ No newline at end of file diff --git a/README.md b/README.md index 551b380..c0093be 100644 --- a/README.md +++ b/README.md @@ -35,14 +35,15 @@ pip install GOSTurban ```shell pip install . ``` +### Developer Installation - Install the package **in editable** mode with dependencies: +Install the package **in editable** mode with all of the dependencies needed to run the tests and build the documentation locally: - ```shell - pip install -e . - ``` + ```shell + pip install -e .[dev] + ``` - The `-e` flag stands for "editable," meaning changes to the source code will immediately affect the installed package. +The `-e` flag stands for "editable," meaning changes to the source code will immediately affect the installed package. ## License diff --git a/docs/_config.yml b/docs/_config.yml index 6fde188..9ab4bdc 100755 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -8,7 +8,7 @@ logo: images/logo.png # Force re-execution of notebooks on each build. # See https://jupyterbook.org/content/execute.html execute: - execute_notebooks: off + execute_notebooks: force # Add a bibtex file so that we can create citations bibtex_bibfiles: diff --git a/docs/_toc.yml b/docs/_toc.yml index 5af481f..2a197ff 100755 --- a/docs/_toc.yml +++ b/docs/_toc.yml @@ -14,6 +14,41 @@ parts: - file: urbanization_comparison - caption: Tutorials chapters: - - file: ../Notebooks/Tutorials/UrbanAreas_tutorials.ipynb - - file: ../Notebooks/Tutorials/LEI_Example.ipynb - + - file: notebooks/Tutorials/UrbanAreas_tutorials.ipynb + - file: notebooks/Tutorials/LEI_Example.ipynb + - caption: Implementations + chapters: + - file: notebooks/Implementations/JUP_SURGP_GLO_B_D__LEI_Evaluation.ipynb + - file: notebooks/Implementations/URB_DECAT_B_ExploringGHSSMODcode.ipynb + - file: notebooks/Implementations/URB_SEAU1_B_A_Ka_ExtractDataUrban.ipynb + - file: notebooks/Implementations/WSF_DECAT_B_ExploringIDCerrors.ipynb + - caption: KAZ_SCADR_UrbanizationReview + chapters: + - file: notebooks/Implementations/KAZ_SCADR_UrbanizationReview/ECA_Urban_Extents.ipynb + - file: notebooks/Implementations/KAZ_SCADR_UrbanizationReview/Urban_metrics_Combine_All.ipynb + - file: notebooks/Implementations/KAZ_SCADR_UrbanizationReview/Urban_metrics_Shape.ipynb + - file: notebooks/Implementations/KAZ_SCADR_UrbanizationReview/Urban_metrics_Structure.ipynb + - file: notebooks/Implementations/KAZ_SCADR_UrbanizationReview/KAZ_Urbanization_Review.ipynb + - file: notebooks/Implementations/KAZ_SCADR_UrbanizationReview/Urban_metrics_Fullness.ipynb + - file: notebooks/Implementations/KAZ_SCADR_UrbanizationReview/Urban_metrics_Sprawl.ipynb + - caption: POV_EEAPV_COG_urban_assessment + chapters: + - file: notebooks/Implementations/POV_EEAPV_COG_urban_assessment/Summarize_Urban.ipynb + - caption: Slum_Mapping + chapters: + - file: notebooks/Implementations/Slum_Mapping/Imagery_Search.ipynb + - caption: URB_SCAUR_UKR_B_I_urbanizationReview + chapters: + - file: notebooks/Implementations/URB_SCAUR_UKR_B_I_urbanizationReview/URB_SCAUR_UKR_B_I_urbanizationReview.ipynb + - caption: URB_SEAU1_NovelUrbanization + chapters: + - file: notebooks/Implementations/URB_SEAU1_NovelUrbanization/Create_Mosaick_Datasets.ipynb + - file: notebooks/Implementations/URB_SEAU1_NovelUrbanization/GHSL_Standardize_To_Country.ipynb + - file: notebooks/Implementations/URB_SEAU1_NovelUrbanization/MAP_Urbanization.ipynb + - file: notebooks/Implementations/URB_SEAU1_NovelUrbanization/NGA_specific_results.ipynb + - file: notebooks/Implementations/URB_SEAU1_NovelUrbanization/URB_SEAU1_B_A_Ka_NovelUrbanizaton.ipynb + - file: notebooks/Implementations/URB_SEAU1_NovelUrbanization/WBGAPI_Extract_urbanization_GDP.ipynb + - caption: URB_SURDR_ZAF_Energy_Transition + chapters: + - file: notebooks/Implementations/URB_SURDR_ZAF_Energy_Transition/Data Preparation.ipynb + - file: notebooks/Implementations/URB_SURDR_ZAF_Energy_Transition/Zonal_statistics.ipynb diff --git a/pyproject.toml b/pyproject.toml index 644e22e..3d4f186 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,11 +34,12 @@ dependencies = [ ] [project.optional-dependencies] -dev = ["pytest", "pytest-cov"] +dev = ["pytest", "pytest-cov", "GOSTurban[docs]"] docs = [ "docutils==0.17.1", "jupyter-book>=1,<2", "sphinxcontrib-apidoc>=0.4.0,<1", + "jupyter-cache>=0.6.0", ] [project.urls]