Skip to content

Commit a8e990a

Browse files
add stubs and python linter (#2207)
Add stubs generation and black linting to pr checks and bot commits
1 parent 363197c commit a8e990a

File tree

13 files changed

+424
-960
lines changed

13 files changed

+424
-960
lines changed

.github/workflows/test_python_workflow.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,12 @@ jobs:
5858
cache: 'pip'
5959
- name: Install Python dependencies
6060
run: |
61+
echo "Installing test dependencies..."
6162
python -m pip install pytest tox
6263
python -m pip install -e examples/netflow
64+
python -m pip install black
65+
echo "Installing linting dependencies from cache..."
66+
python -m pip install maturin mypy networkx pyvis pandas-stubs
6367
- name: Setup Node.js
6468
uses: actions/setup-node@v4
6569
with:
@@ -78,6 +82,22 @@ jobs:
7882
if: matrix.os == 'ubuntu-latest' && matrix.python == '3.13'
7983
run: |
8084
python docs/scripts/gen_docs_graphql_pages.py
85+
- name: Run python linter
86+
if: matrix.os == 'ubuntu-latest' && matrix.python == '3.13'
87+
run: |
88+
cd python && black .
89+
- name: Run stubsgen
90+
if: matrix.os == 'ubuntu-latest' && matrix.python == '3.13'
91+
run: |
92+
echo "Installing Raphtory from cache..."
93+
pip install raphtory
94+
echo "Installing stubsgen"
95+
python -m pip install -e stub_gen
96+
cd python/scripts && python gen-stubs.py
97+
- name: Run mypy
98+
run: |
99+
mypy -m raphtory
100+
81101
- name: Check for uncommitted changes
82102

83103
if: matrix.os == 'ubuntu-latest' && matrix.python == '3.13'

docs/reference/graphql/graphql_API.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1896,43 +1896,43 @@ Export all nodes and edges from this graph view to another existing graph
18961896
</thead>
18971897
<tbody>
18981898
<tr>
1899-
<td colspan="2" valign="top"><strong id="graphalgorithmplugin.shortest_path">shortest_path</strong></td>
1900-
<td valign="top">[<a href="#shortestpathoutput">ShortestPathOutput</a>!]!</td>
1899+
<td colspan="2" valign="top"><strong id="graphalgorithmplugin.pagerank">pagerank</strong></td>
1900+
<td valign="top">[<a href="#pagerankoutput">PagerankOutput</a>!]!</td>
19011901
<td></td>
19021902
</tr>
19031903
<tr>
1904-
<td colspan="2" align="right" valign="top">source</td>
1905-
<td valign="top"><a href="#string">String</a>!</td>
1904+
<td colspan="2" align="right" valign="top">iterCount</td>
1905+
<td valign="top"><a href="#int">Int</a>!</td>
19061906
<td></td>
19071907
</tr>
19081908
<tr>
1909-
<td colspan="2" align="right" valign="top">targets</td>
1910-
<td valign="top">[<a href="#string">String</a>!]!</td>
1909+
<td colspan="2" align="right" valign="top">threads</td>
1910+
<td valign="top"><a href="#int">Int</a></td>
19111911
<td></td>
19121912
</tr>
19131913
<tr>
1914-
<td colspan="2" align="right" valign="top">direction</td>
1915-
<td valign="top"><a href="#string">String</a></td>
1914+
<td colspan="2" align="right" valign="top">tol</td>
1915+
<td valign="top"><a href="#float">Float</a></td>
19161916
<td></td>
19171917
</tr>
19181918
<tr>
1919-
<td colspan="2" valign="top"><strong id="graphalgorithmplugin.pagerank">pagerank</strong></td>
1920-
<td valign="top">[<a href="#pagerankoutput">PagerankOutput</a>!]!</td>
1919+
<td colspan="2" valign="top"><strong id="graphalgorithmplugin.shortest_path">shortest_path</strong></td>
1920+
<td valign="top">[<a href="#shortestpathoutput">ShortestPathOutput</a>!]!</td>
19211921
<td></td>
19221922
</tr>
19231923
<tr>
1924-
<td colspan="2" align="right" valign="top">iterCount</td>
1925-
<td valign="top"><a href="#int">Int</a>!</td>
1924+
<td colspan="2" align="right" valign="top">source</td>
1925+
<td valign="top"><a href="#string">String</a>!</td>
19261926
<td></td>
19271927
</tr>
19281928
<tr>
1929-
<td colspan="2" align="right" valign="top">threads</td>
1930-
<td valign="top"><a href="#int">Int</a></td>
1929+
<td colspan="2" align="right" valign="top">targets</td>
1930+
<td valign="top">[<a href="#string">String</a>!]!</td>
19311931
<td></td>
19321932
</tr>
19331933
<tr>
1934-
<td colspan="2" align="right" valign="top">tol</td>
1935-
<td valign="top"><a href="#float">Float</a></td>
1934+
<td colspan="2" align="right" valign="top">direction</td>
1935+
<td valign="top"><a href="#string">String</a></td>
19361936
<td></td>
19371937
</tr>
19381938
</tbody>

0 commit comments

Comments
 (0)