diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 10d3eb1d..0991aba0 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -25,12 +25,15 @@ jobs: python -m pip install --upgrade pip python -m pip install graphviz pygraphviz python -m pip install ".[doc]" - pip install jupyter-book~=1.0 ghp-import matplotlib gdmloader + pip install ghp-import matplotlib gdmloader - name: Build the book + working-directory: docs + env: + NODE_TLS_REJECT_UNAUTHORIZED: "0" run: | - jupyter-book clean docs - jupyter-book build docs + jupyter-book clean --html --temp --logs -y + jupyter-book build --html - name: Deploy to GitHub Pages run: | diff --git a/docs/_config.yml b/docs/_config.yml deleted file mode 100644 index 260ea583..00000000 --- a/docs/_config.yml +++ /dev/null @@ -1,53 +0,0 @@ -# Book settings -# Learn more at https://jupyterbook.org/customize/config.html - -title: Grid-Data-Models -author: Aadil Latif -logo: gdm_logo.jpeg - -# Force re-execution of notebooks on each build. -# See https://jupyterbook.org/content/execute.html -execute: - execute_notebooks: force - timeout: -1 - - -# Define the name of the latex output file for PDF builds -latex: - latex_documents: - targetname: book.tex - -# Add a bibtex file so that we can create citations -bibtex_bibfiles: - - references.bib - -# Information about where the book exists on the web -repository: - url: https://github.com/NLR-Distribution-Suite/grid-data-models # Online location of your book - path_to_book: docs # Optional path to your book, relative to the repository root - branch: master # Which branch of the repository should be used when creating links (optional) - -# Add GitHub buttons to your book -# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository -html: - use_issues_button: true - use_repository_button: true - extra_footer: | -
- © Copyright 2024, Alliance for Sustainable Energy, LLC. This work is licensed under a BSD 3-Clause License -
- - -sphinx: - extra_extensions: - - 'sphinx.ext.autodoc' - - 'sphinx.ext.autosummary' - - 'sphinx.ext.coverage' - - 'sphinx.ext.napoleon' - - 'sphinx.ext.intersphinx' - - 'sphinxcontrib.autodoc_pydantic' - - 'sphinxcontrib.mermaid' - - 'sphinx.ext.mathjax' - - config: - html_show_copyright: false \ No newline at end of file diff --git a/docs/_toc.yml b/docs/_toc.yml deleted file mode 100644 index bdec4917..00000000 --- a/docs/_toc.yml +++ /dev/null @@ -1,35 +0,0 @@ -# Table of contents -# Learn more at https://jupyterbook.org/customize/toc.html - -format: jb-book -root: intro -parts: - - caption: Installation - chapters: - - file: installation - - file: gdmloader/gdmloader - - caption: Tutorial - chapters: - - file: new_features - - file: gdm_intro/data_models - - file: gdm_intro/units - - file: gdm_intro/timeseries - - file: dist_system/import_export - - file: dist_system/plotting - - caption: Advanced Usage - chapters: - - file: dist_system/graphs - - file: dist_system/network_reduction - - file: dist_system/tracked_changes - - caption: On CIM and GDM - chapters: - - file: cim/index - - file: cim/distribution-bus - - caption: MCP Server - chapters: - - file: mcp/MCP_README - - file: mcp/VSCODE_SETUP - - caption: Reference Guides - chapters: - - file: api/index - - file: cli/index \ No newline at end of file diff --git a/docs/api/index.md b/docs/api/index.md index 655bc97c..5f53a26d 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -1,59 +1,47 @@ # API Reference -```{toctree} -:caption: Distribution Components -:hidden: true - -components/distribution_battery -components/distribution_bus -components/distribution_branch -components/distribution_capacitor -components/distribution_feeder -components/distribution_substation -components/distribution_load -components/distribution_transformer -components/distribution_regulator -components/distribution_fuse -components/distribution_switch -components/distribution_recloser -components/distribution_vsource -components/distribution_solar -``` - -```{toctree} -:caption: Distribution Equipment -:hidden: true - -equipment/battery_equipment -equipment/branch_equipment -equipment/capacitor_equipment -equipment/load_equipment -equipment/distribution_transformer_equipment -equipment/vsource_equipment -equipment/distribution_wires -equipment/fuse_equipment -equipment/switch_equipment -equipment/recloser_equipment -equipment/solar_equipment -equipment/inverter_equipment -``` - -```{toctree} -:caption: Controllers -:hidden: true - -controllers/capacitor_controllers -controllers/regulator_controllers -controllers/inverter_controllers -controllers/switch_controllers -controllers/recloser_controllers -``` - -```{toctree} -:caption: Extra Models -:hidden: true - -distribution_enum -limitset -quantities -``` +## Distribution Components + +- [Distribution Battery](components/distribution_battery.md) +- [Distribution Bus](components/distribution_bus.md) +- [Distribution Branch](components/distribution_branch.md) +- [Distribution Capacitor](components/distribution_capacitor.md) +- [Distribution Feeder](components/distribution_feeder.md) +- [Distribution Substation](components/distribution_substation.md) +- [Distribution Load](components/distribution_load.md) +- [Distribution Transformer](components/distribution_transformer.md) +- [Distribution Regulator](components/distribution_regulator.md) +- [Distribution Fuse](components/distribution_fuse.md) +- [Distribution Switch](components/distribution_switch.md) +- [Distribution Recloser](components/distribution_recloser.md) +- [Distribution Voltage Source](components/distribution_vsource.md) +- [Distribution Solar](components/distribution_solar.md) + +## Distribution Equipment + +- [Battery Equipment](equipment/battery_equipment.md) +- [Branch Equipment](equipment/branch_equipment.md) +- [Capacitor Equipment](equipment/capacitor_equipment.md) +- [Load Equipment](equipment/load_equipment.md) +- [Distribution Transformer Equipment](equipment/distribution_transformer_equipment.md) +- [Voltage Source Equipment](equipment/vsource_equipment.md) +- [Distribution Wires](equipment/distribution_wires.md) +- [Fuse Equipment](equipment/fuse_equipment.md) +- [Switch Equipment](equipment/switch_equipment.md) +- [Recloser Equipment](equipment/recloser_equipment.md) +- [Solar Equipment](equipment/solar_equipment.md) +- [Inverter Equipment](equipment/inverter_equipment.md) + +## Controllers + +- [Capacitor Controllers](controllers/capacitor_controllers.md) +- [Regulator Controllers](controllers/regulator_controllers.md) +- [Inverter Controllers](controllers/inverter_controllers.md) +- [Switch Controllers](controllers/switch_controllers.md) +- [Recloser Controllers](controllers/recloser_controllers.md) + +## Extra Models + +- [Distribution Enum](distribution_enum.md) +- [Limit Set](limitset.md) +- [Quantities](quantities.md) diff --git a/docs/cli/index.md b/docs/cli/index.md index afa38add..ecbd33a7 100644 --- a/docs/cli/index.md +++ b/docs/cli/index.md @@ -11,11 +11,4 @@ gdm --help | Command | Description | | --------| -------------| -| [reduce](#reduce) | Performs distribution network reduction | - -```{toctree} -:caption: Commands -:hidden: true - -reduce -``` \ No newline at end of file +| [reduce](reduce.md) | Performs distribution network reduction | \ No newline at end of file diff --git a/docs/myst.yml b/docs/myst.yml new file mode 100644 index 00000000..8346b614 --- /dev/null +++ b/docs/myst.yml @@ -0,0 +1,48 @@ +version: 1 +project: + title: Grid-Data-Models + authors: + - name: Aadil Latif + github: NLR-Distribution-Suite/grid-data-models + bibliography: + - references.bib + exports: + - format: pdf + template: plain_latex_book + output: exports/book.pdf + toc: + - file: intro.md + - title: Installation + children: + - file: installation.ipynb + - file: gdmloader/gdmloader.ipynb + - title: Tutorial + children: + - file: new_features.ipynb + - file: gdm_intro/data_models.ipynb + - file: gdm_intro/units.ipynb + - file: gdm_intro/timeseries.ipynb + - file: dist_system/import_export.ipynb + - file: dist_system/plotting.ipynb + - title: Advanced Usage + children: + - file: dist_system/graphs.ipynb + - file: dist_system/network_reduction.ipynb + - file: dist_system/tracked_changes.ipynb + - title: On CIM and GDM + children: + - file: cim/index.md + - file: cim/distribution-bus.md + - title: MCP Server + children: + - file: mcp/MCP_README.md + - file: mcp/VSCODE_SETUP.md + - title: Reference Guides + children: + - file: api/index.md + - file: cli/index.md +site: + options: + logo: gdm_logo.jpeg + folders: true + template: book-theme diff --git a/pyproject.toml b/pyproject.toml index 1ad6f04f..ae0d71ba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,6 +36,7 @@ dependencies = [ mcp = ["mcp>=1.0.0"] dev = ["pre-commit", "pytest", "pytest-cov", "pytest-doctestplus", "pytest-asyncio", "ruff", "docutils"] doc = [ + "jupyter-book>=2,<3", "sphinx", "pydata-sphinx-theme", "myst-parser",