| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b6f513f commit 0768f97
12 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,6 +25,27 @@ jobs: | |||
| 25 | 25 | - name: Test with pytest | |
| 26 | 26 | run: pytest | |
| 27 | 27 | ||
| 28 | + mypy: | ||
| 29 | + runs-on: ubuntu-latest | ||
| 30 | + steps: | ||
| 31 | + - uses: actions/checkout@v4 | ||
| 32 | + - name: Set up Python 3.11 | ||
| 33 | + uses: actions/setup-python@v5 | ||
| 34 | + with: | ||
| 35 | + python-version: "3.11" | ||
| 36 | + - name: Install dependencies | ||
| 37 | + run: | | ||
| 38 | + python -m pip install --upgrade pip | ||
| 39 | + pip install .[dev] | ||
| 40 | + - name: Run mypy | ||
| 41 | + # Informational only for now: the type-hinting pass surfaced a | ||
| 42 | + # baseline of pre-existing design tensions (Liskov-incompatible | ||
| 43 | + # overrides, embedded-graph invariants not visible to the type | ||
| 44 | + # checker) that are tracked separately, not fixed here. Don't fail | ||
| 45 | + # the build on them yet. | ||
| 46 | + continue-on-error: true | ||
| 47 | + run: mypy src/pgraph/PGraph.py | ||
| 48 | + | ||
| 28 | 49 | codecov: | |
| 29 | 50 | needs: unittest | |
| 30 | 51 | runs-on: ubuntu-latest | |
@@ -62,7 +83,6 @@ jobs: | |||
| 62 | 83 | run: | | |
| 63 | 84 | python -m pip install --upgrade pip | |
| 64 | 85 | pip install .[docs] | |
| 65 | - pip install git+https://github.com/petercorke/sphinx-autorun.git | ||
| 66 | 86 | sudo apt-get update | |
| 67 | 87 | sudo apt-get install -y graphviz | |
| 68 | 88 | - name: Build docs | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | PGraph module | |
| 2 | 2 | ============= | |
| 3 | 3 | ||
| 4 | - .. automodule:: PGraph | ||
| 4 | + .. automodule:: pgraph.PGraph | ||
| 5 | 5 | :members: | |
| 6 | 6 | :undoc-members: | |
| 7 | 7 | :show-inheritance: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,13 +30,33 @@ | |||
| 30 | 30 | # ones. | |
| 31 | 31 | extensions = [ | |
| 32 | 32 | "sphinx.ext.autodoc", | |
| 33 | + "sphinx.ext.autosummary", | ||
| 33 | 34 | "sphinx.ext.todo", | |
| 34 | 35 | "sphinx.ext.viewcode", | |
| 35 | 36 | "sphinx.ext.mathjax", | |
| 36 | 37 | "sphinx.ext.coverage", | |
| 38 | + "sphinx.ext.intersphinx", | ||
| 37 | 39 | "sphinx.ext.inheritance_diagram", | |
| 40 | + "sphinx_autodoc_typehints", | ||
| 41 | + "sphinx_copybutton", | ||
| 42 | + "sphinx_pyrunblock", | ||
| 43 | + "sphinx_codeautolink", | ||
| 38 | 44 | ] | |
| 39 | 45 | ||
| 46 | + autosummary_generate = True | ||
| 47 | + | ||
| 48 | + # copybutton configuration: strip >>> and ... prompts when copying | ||
| 49 | + copybutton_prompt_text = r">>> |\.\.\. " | ||
| 50 | + copybutton_prompt_is_regexp = True | ||
| 51 | + | ||
| 52 | + # sphinx_codeautolink: link names in code blocks to their API docs | ||
| 53 | + codeautolink_autodoc_inject = False | ||
| 54 | + | ||
| 55 | + intersphinx_mapping = { | ||
| 56 | + "python": ("https://docs.python.org/3", None), | ||
| 57 | + "numpy": ("https://numpy.org/doc/stable/", None), | ||
| 58 | + } | ||
| 59 | + | ||
| 40 | 60 | html_theme_options = { | |
| 41 | 61 | "logo_only": False, | |
| 42 | 62 | "display_version": True, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,7 @@ Directed graph | |||
| 2 | 2 | -------------- | |
| 3 | 3 | ||
| 4 | 4 | ||
| 5 | - .. autoclass:: PGraph.DGraph | ||
| 5 | + .. autoclass:: pgraph.PGraph.DGraph | ||
| 6 | 6 | :undoc-members: | |
| 7 | 7 | :show-inheritance: | |
| 8 | 8 | :inherited-members: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | Directed graph vertex | |
| 2 | 2 | --------------------- | |
| 3 | 3 | ||
| 4 | - .. autoclass:: PGraph.DVertex | ||
| 4 | + .. autoclass:: pgraph.PGraph.DVertex | ||
| 5 | 5 | :undoc-members: | |
| 6 | 6 | :show-inheritance: | |
| 7 | 7 | :inherited-members: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | Edge | |
| 2 | 2 | ---- | |
| 3 | 3 | ||
| 4 | - .. autoclass:: PGraph.Edge | ||
| 4 | + .. autoclass:: pgraph.PGraph.Edge | ||
| 5 | 5 | :undoc-members: | |
| 6 | 6 | :show-inheritance: | |
| 7 | 7 | :inherited-members: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,5 +3,5 @@ Convert graph to matrix form | |||
| 3 | 3 | ||
| 4 | 4 | These methods convert a graph to a matrix representation . | |
| 5 | 5 | ||
| 6 | - .. autoclass:: PGraph.PGraph | ||
| 6 | + .. autoclass:: pgraph.PGraph.PGraph | ||
| 7 | 7 | :members: distance, adjacency, degree, incidence, Laplacian | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,5 +3,5 @@ Path planning | |||
| 3 | 3 | ||
| 4 | 4 | These methods find optimal paths from a start vertex to a goal vertex. | |
| 5 | 5 | ||
| 6 | - .. autoclass:: PGraph.PGraph | ||
| 6 | + .. autoclass:: pgraph.PGraph.PGraph | ||
| 7 | 7 | :members: path_BFS, path_UCS, path_Astar | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,7 @@ Undirected graph | |||
| 2 | 2 | ---------------- | |
| 3 | 3 | ||
| 4 | 4 | ||
| 5 | - .. autoclass:: PGraph.UGraph | ||
| 5 | + .. autoclass:: pgraph.PGraph.UGraph | ||
| 6 | 6 | :undoc-members: | |
| 7 | 7 | :show-inheritance: | |
| 8 | 8 | :inherited-members: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | Undirected graph vertex | |
| 2 | 2 | ----------------------- | |
| 3 | 3 | ||
| 4 | - .. autoclass:: PGraph.UVertex | ||
| 4 | + .. autoclass:: pgraph.PGraph.UVertex | ||
| 5 | 5 | :undoc-members: | |
| 6 | 6 | :show-inheritance: | |
| 7 | 7 | :inherited-members: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments