Skip to content

Commit 017579b

Browse files
committed
.
1 parent 8461b0c commit 017579b

12 files changed

+27
-27
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# fast-graph
1+
# rust-graph
22

33
Graph algorithms implemented in Rust, available as a Python package.
44

@@ -7,13 +7,13 @@ So far, there is only one function implemented: `all_pairs_dijkstra_path_length`
77
## Installation
88

99
```bash
10-
pip install fast-graph
10+
pip install rust-graph
1111
```
1212

1313
## Usage
1414

1515
```python
16-
from fast_graph import all_pairs_dijkstra_path_length
16+
from rust_graph import all_pairs_dijkstra_path_length
1717

1818
weighted_edges = [
1919
(0, 1, 1.0),

pyproject.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ requires = ["maturin>=1.5,<2.0"]
33
build-backend = "maturin"
44

55
[project]
6-
name = "fast-graph"
6+
name = "rust-graph"
77
requires-python = ">=3.8"
8-
description = "Python project template" # OPTIONALLY CHANGE
8+
description = "Simple and fast graph operations written in Rust" # OPTIONALLY CHANGE
99
authors = [
1010
{ name = "Kiyoon Kim" }, # OPTIONALLY CHANGE
1111
]
@@ -26,7 +26,7 @@ classifiers = [
2626
dynamic = ["version"]
2727

2828
[project.urls]
29-
"Homepage" = "https://github.com/deargen/fast-graph"
29+
"Homepage" = "https://github.com/deargen/rust-graph"
3030

3131
[tool.maturin]
3232
features = ["pyo3/extension-module"]
@@ -39,7 +39,7 @@ testpaths = ["tests"]
3939
[tool.ruff]
4040
src = ["src"] # for ruff isort
4141
extend-exclude = [
42-
"src/fast_graph/_version.py", # CHANGE
42+
"src/rust_graph/_version.py", # CHANGE
4343
]
4444

4545
[tool.ruff.lint]
@@ -137,6 +137,6 @@ pythonPlatform = "Linux"
137137

138138
[tool.coverage.report]
139139
omit = [
140-
"src/fast_graph/_version.py", # CHANGE
140+
"src/rust_graph/_version.py", # CHANGE
141141
# OPTIONALLY ADD MORE LATER
142142
]

rust/Cargo.lock

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[package]
2-
name = "fast-graph"
2+
name = "rust-graph"
33
version = "0.0.0"
44
edition = "2021"
55

66
[lib]
7-
name = "fast_graph"
7+
name = "rust_graph"
88
crate-type = [ "cdylib", "rlib",]
99

1010
[dependencies]

rust/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ fn all_pairs_dijkstra_path_length(edges: Vec<(u32, u32, f64)>, cutoff: Option<f6
402402

403403
/// A Python module implemented in Rust.
404404
#[pymodule]
405-
fn fast_graph(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
405+
fn rust_graph(_py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> {
406406
m.add_function(wrap_pyfunction!(all_pairs_dijkstra_path_length, m)?)?;
407407
Ok(())
408408
}

rust/tests/test_dijkstra.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::collections::HashMap;
22

3-
use fast_graph::Graph;
3+
use rust_graph::Graph;
44

55
#[test]
66
fn test_dijkstra_singlesource() {

scripts/hf_download.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
def main():
99
snapshot_download(
10-
repo_id="Deargen/fast-graph",
10+
repo_id="Deargen/rust-graph",
1111
repo_type="dataset",
1212
revision="b30677dd3a76a0ecf51944861adacf433e9ecc04",
1313
local_dir="data",

src/fast_graph/__init__.py

-5
This file was deleted.

src/rust_graph/__init__.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from .rust_graph import *
2+
3+
__doc__ = rust_graph.__doc__
4+
if hasattr(rust_graph, "__all__"):
5+
__all__ = rust_graph.__all__
File renamed without changes.
File renamed without changes.

tests/test_dijkstra.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import trimesh
99
from scipy.sparse import coo_matrix, csr_matrix
1010

11-
from fast_graph import all_pairs_dijkstra_path_length
11+
from rust_graph import all_pairs_dijkstra_path_length
1212

1313
logger = logging.getLogger(__name__)
1414

0 commit comments

Comments
 (0)