From a6580a475bfa1654aaa0b9f32457da0000f6be86 Mon Sep 17 00:00:00 2001 From: Ralph Liu Date: Tue, 22 Oct 2024 12:21:35 -0700 Subject: [PATCH 1/5] Fixes from running .gitignore:python/nx-cugraph/objects.inv docs/nx-cugraph/source/nx_cugraph/how-it-works.md:The latest list of algorithms supported by nx-cugraph can be found [here](https://github.com/rapidsai/cugraph/blob/HEAD/python/nx-cugraph/README.md#algorithms) or in the next section. docs/nx-cugraph/source/nx_cugraph/index.rst:By simply `installing and enabling nx-cugraph `_, users can see significant speedup on workflows where performance is hindered by the default NetworkX implementation. With ``nx-cugraph``, users can have GPU-based, large-scale performance **without** changing their familiar and easy-to-use NetworkX code. --- .pre-commit-config.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8ff284210..282a73b05 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,14 +18,14 @@ repos: - id: black language_version: python3 args: [--target-version=py310] - files: ^(python/.*|benchmarks/.*)$ - exclude: ^python/nx-cugraph/ + files: ^(nx_cugraph.*|benchmarks/.*)$ + exclude: ^nx_cugraph/ - repo: https://github.com/PyCQA/flake8 rev: 7.1.1 hooks: - id: flake8 args: ["--config=.flake8"] - files: python/.*$ + files: nx_cugraph.*$ types: [file] types_or: [python] # TODO: Enable [python, cython] additional_dependencies: ["flake8-force"] @@ -63,8 +63,8 @@ repos: hooks: - id: nx-cugraph-meta-data-update name: nx-cugraph meta-data updater - entry: bash -c "PYTHONPATH=./python/nx-cugraph python ./python/nx-cugraph/_nx_cugraph/__init__.py" - files: ^python/nx-cugraph/ + entry: bash -c "PYTHONPATH=./nx_cugraph python ./nx_cugraph/_nx_cugraph/__init__.py" + files: ^nx_cugraph types: [python] language: python pass_filenames: false @@ -73,8 +73,8 @@ repos: hooks: - id: nx-cugraph-readme-update name: nx-cugraph README updater - entry: bash -c "PYTHONPATH=./python/nx-cugraph python ./python/nx-cugraph/scripts/update_readme.py ./python/nx-cugraph/README.md" - files: ^python/nx-cugraph/ + entry: bash -c "PYTHONPATH=./nx_cugraph python ./scripts/update_readme.py ./README.md" + files: ^nx_cugraph/ types_or: [python, markdown] language: python pass_filenames: false From 06857771704865a57edc347eee7ad4e8c7242c13 Mon Sep 17 00:00:00 2001 From: Ralph Liu Date: Tue, 22 Oct 2024 12:46:38 -0700 Subject: [PATCH 2/5] Specify rules to ignore in nx_cugraph/__init__.py --- .flake8 | 1 + .pre-commit-config.yaml | 12 ++---------- _nx_cugraph/VERSION | 1 - 3 files changed, 3 insertions(+), 11 deletions(-) delete mode 120000 _nx_cugraph/VERSION diff --git a/.flake8 b/.flake8 index cdda8d108..28d4f21a4 100644 --- a/.flake8 +++ b/.flake8 @@ -13,3 +13,4 @@ per-file-ignores = nx_cugraph/tests/*.py:T201, __init__.py:F401,F403, _nx_cugraph/__init__.py:E501, + nx_cugraph/__init__.py:E402,F401,F403, diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 282a73b05..c45697f2a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,14 +12,6 @@ repos: - id: end-of-file-fixer - id: mixed-line-ending - id: trailing-whitespace - - repo: https://github.com/psf/black - rev: 22.10.0 - hooks: - - id: black - language_version: python3 - args: [--target-version=py310] - files: ^(nx_cugraph.*|benchmarks/.*)$ - exclude: ^nx_cugraph/ - repo: https://github.com/PyCQA/flake8 rev: 7.1.1 hooks: @@ -63,7 +55,7 @@ repos: hooks: - id: nx-cugraph-meta-data-update name: nx-cugraph meta-data updater - entry: bash -c "PYTHONPATH=./nx_cugraph python ./nx_cugraph/_nx_cugraph/__init__.py" + entry: bash -c "PYTHONPATH=. python _nx_cugraph/__init__.py" files: ^nx_cugraph types: [python] language: python @@ -73,7 +65,7 @@ repos: hooks: - id: nx-cugraph-readme-update name: nx-cugraph README updater - entry: bash -c "PYTHONPATH=./nx_cugraph python ./scripts/update_readme.py ./README.md" + entry: bash -c "PYTHONPATH=. python ./scripts/update_readme.py ./README.md" files: ^nx_cugraph/ types_or: [python, markdown] language: python diff --git a/_nx_cugraph/VERSION b/_nx_cugraph/VERSION deleted file mode 120000 index d62dc733e..000000000 --- a/_nx_cugraph/VERSION +++ /dev/null @@ -1 +0,0 @@ -../../../VERSION \ No newline at end of file From 9e6f0c63b1a7e4c246d56e780ea048be58d3effc Mon Sep 17 00:00:00 2001 From: Ralph Liu Date: Tue, 22 Oct 2024 12:47:03 -0700 Subject: [PATCH 3/5] Updated via pre-commit checks --- .github/workflows/add-to-project.yaml | 2 +- .github/workflows/labeler.yaml | 2 +- .github/workflows/pr.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/add-to-project.yaml b/.github/workflows/add-to-project.yaml index 6fec09bae..13ad5079c 100644 --- a/.github/workflows/add-to-project.yaml +++ b/.github/workflows/add-to-project.yaml @@ -17,4 +17,4 @@ jobs: - uses: actions/add-to-project@v0.3.0 with: project-url: https://github.com/orgs/rapidsai/projects/47 - github-token: ${{ secrets.ADD_TO_PROJECT_GITHUB_TOKEN }} \ No newline at end of file + github-token: ${{ secrets.ADD_TO_PROJECT_GITHUB_TOKEN }} diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml index 15569e01d..31e78f82a 100644 --- a/.github/workflows/labeler.yaml +++ b/.github/workflows/labeler.yaml @@ -8,4 +8,4 @@ jobs: steps: - uses: actions/labeler@v4 with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file + repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 05d8ab765..b75446551 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -56,4 +56,4 @@ jobs: uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@python-3.12 with: build_type: pull-request - script: ci/test_wheel_nx-cugraph.sh \ No newline at end of file + script: ci/test_wheel_nx-cugraph.sh From 884a6e4c2007c2cd0fe3ddf91319575570d961bf Mon Sep 17 00:00:00 2001 From: Ralph Liu Date: Tue, 22 Oct 2024 12:47:26 -0700 Subject: [PATCH 4/5] Remove unnecessary f-string --- _nx_cugraph/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_nx_cugraph/__init__.py b/_nx_cugraph/__init__.py index a5e45979f..e84da60f3 100644 --- a/_nx_cugraph/__init__.py +++ b/_nx_cugraph/__init__.py @@ -36,7 +36,7 @@ "backend_name": "cugraph", "project": "nx-cugraph", "package": "nx_cugraph", - "url": f"https://rapids.ai/nx-cugraph", + "url": "https://rapids.ai/nx-cugraph", "short_summary": "GPU-accelerated backend.", # "description": "TODO", "functions": { @@ -180,7 +180,7 @@ "ego_graph": "Weighted ego_graph with negative cycles is not yet supported. `NotImplementedError` will be raised if there are negative `distance` edge weights.", "eigenvector_centrality": "`nstart` parameter is not used, but it is checked for validity.", "from_pandas_edgelist": "cudf.DataFrame inputs also supported; value columns with str is unsuppported.", - "generic_bfs_edges": "`neighbors` and `sort_neighbors` parameters are not yet supported.", + "generic_bfs_edges": "`neighbors` parameter is not yet supported.", "katz_centrality": "`nstart` isn't used (but is checked), and `normalized=False` is not supported.", "louvain_communities": "`seed` parameter is currently ignored, and self-loops are not yet supported.", "pagerank": "`dangling` parameter is not supported, but it is checked for validity.", From 3c43da6aaaa98c8f8326ed8debabd4b47e72fe4e Mon Sep 17 00:00:00 2001 From: Ralph Liu Date: Tue, 22 Oct 2024 12:49:49 -0700 Subject: [PATCH 5/5] Update symbolic link for VERSION --- _nx_cugraph/VERSION | 1 + 1 file changed, 1 insertion(+) create mode 120000 _nx_cugraph/VERSION diff --git a/_nx_cugraph/VERSION b/_nx_cugraph/VERSION new file mode 120000 index 000000000..6ff19de4b --- /dev/null +++ b/_nx_cugraph/VERSION @@ -0,0 +1 @@ +../VERSION \ No newline at end of file