diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml new file mode 100644 index 0000000..de30448 --- /dev/null +++ b/.github/workflows/sphinx.yml @@ -0,0 +1,26 @@ +name: "Sphinx: Render docs" + +on: push + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Build HTML + uses: ammaraskar/sphinx-action@master + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: html-docs + path: docs/build/html/ + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/build/html diff --git a/docs/api.rst b/docs/api.rst index 03e01fe..aa14b82 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -1,10 +1,10 @@ .. _api_ref: -.. automodule:: GrowBikeNet +.. automodule:: growbikenet :members: :undoc-members: -.. currentmodule:: GrowBikeNet +.. currentmodule:: growbikenet GrowBikeNet API reference ========================== @@ -21,4 +21,4 @@ GrowBikeNet does these things with these functions. functions.intersects_properly functions.get_seed_points functions.node_to_edge_attributes - functions \ No newline at end of file + functions diff --git a/docs/api/GrowBikeNet.functions.get_seed_points.rst b/docs/api/GrowBikeNet.functions.get_seed_points.rst index dfb9f43..b7937c3 100644 --- a/docs/api/GrowBikeNet.functions.get_seed_points.rst +++ b/docs/api/GrowBikeNet.functions.get_seed_points.rst @@ -1,6 +1,6 @@ -GrowBikeNet.functions.get\_seed\_points +growbikenet.functions.get\_seed\_points ======================================= -.. currentmodule:: GrowBikeNet.functions +.. currentmodule:: growbikenet.functions -.. autofunction:: get_seed_points \ No newline at end of file +.. autofunction:: get_seed_points diff --git a/docs/api/GrowBikeNet.functions.intersects_properly.rst b/docs/api/GrowBikeNet.functions.intersects_properly.rst index 7ec451e..59951e9 100644 --- a/docs/api/GrowBikeNet.functions.intersects_properly.rst +++ b/docs/api/GrowBikeNet.functions.intersects_properly.rst @@ -1,6 +1,6 @@ -GrowBikeNet.functions.intersects\_properly +growbikenet.functions.intersects\_properly ========================================== -.. currentmodule:: GrowBikeNet.functions +.. currentmodule:: growbikenet.functions -.. autofunction:: intersects_properly \ No newline at end of file +.. autofunction:: intersects_properly diff --git a/docs/api/GrowBikeNet.functions.node_to_edge_attributes.rst b/docs/api/GrowBikeNet.functions.node_to_edge_attributes.rst index 9247ac4..cf350a1 100644 --- a/docs/api/GrowBikeNet.functions.node_to_edge_attributes.rst +++ b/docs/api/GrowBikeNet.functions.node_to_edge_attributes.rst @@ -1,6 +1,6 @@ -GrowBikeNet.functions.node\_to\_edge\_attributes +growbikenet.functions.node\_to\_edge\_attributes ================================================ -.. currentmodule:: GrowBikeNet.functions +.. currentmodule:: growbikenet.functions -.. autofunction:: node_to_edge_attributes \ No newline at end of file +.. autofunction:: node_to_edge_attributes diff --git a/docs/api/GrowBikeNet.functions.rst b/docs/api/GrowBikeNet.functions.rst index 40cd5f7..a1fd82f 100644 --- a/docs/api/GrowBikeNet.functions.rst +++ b/docs/api/GrowBikeNet.functions.rst @@ -1,7 +1,7 @@ -GrowBikeNet.functions +growbikenet.functions ===================== -.. automodule:: GrowBikeNet.functions +.. automodule:: growbikenet.functions .. rubric:: Functions @@ -30,4 +30,4 @@ MultiLineString Point combinations - \ No newline at end of file + diff --git a/docs/conf.py b/docs/conf.py index 4eaa325..a3ab86d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,11 +15,11 @@ import os import sys -import growbikenet # noqa +#import growbikenet # noqa # sys.path.insert(0, os.path.abspath("../")) -version = growbikenet.__version__ -release = version +#version = growbikenet.__version__ +#release = version # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom @@ -28,7 +28,7 @@ "sphinx.ext.autodoc", "sphinx.ext.autosummary", "sphinx.ext.linkcode", - "sphinxcontrib.bibtex", + #"sphinxcontrib.bibtex", "sphinx.ext.mathjax", "sphinx.ext.doctest", "sphinx.ext.intersphinx", @@ -115,4 +115,4 @@ def find_source(): except Exception: filename = info["module"].replace(".", "/") + ".py" tag = "main" if "+" in release else ("v" + release) - return f"https://github.com/BikeNetKit/GrowBikeNet/blob/{tag}/{filename}" \ No newline at end of file + return f"https://github.com/BikeNetKit/GrowBikeNet/blob/{tag}/{filename}"