Skip to content

rename: Python module hebb → hebb_py#7

Merged
ammar-s847 merged 1 commit into
mainfrom
chore/python-module-rename-to-hebb-py
May 26, 2026
Merged

rename: Python module hebb → hebb_py#7
ammar-s847 merged 1 commit into
mainfrom
chore/python-module-rename-to-hebb-py

Conversation

@ammar-s847
Copy link
Copy Markdown
Contributor

Summary

The PyPI distribution is `hebb-py` (the bare `hebb` name is taken by an unrelated astronomy package, "Halo Extreme Bayesian Bootstrap"). Aligning the module name with the distribution name makes `pip install hebb-py` / `import hebb_py` self-consistent and avoids any chance of import collision with the astronomy package.

Changes

  • `python/Cargo.toml`: `[lib] name = "hebb_py"` (was `"hebb"`). Controls the cdylib filename and therefore the Python module name.
  • `python/src/lib.rs`: `#[pymodule] fn hebb_py(...)` (was `fn hebb(...)`).
  • `python/src/cortex.rs`: `hebb.` Python-path references in doc-comments → `hebb_py.` (e.g., `hebb.seeds.random` → `hebb_py.seeds.random`). Rust paths (`hebb::*`) are unchanged.
  • `README.md` / `CLAUDE.md` / `.github/workflows/ci.yml`: `import hebb` → `import hebb_py`, including the CI smoke test.
  • `.gitignore`: also adds `/Cargo.lock` (accidentally tracked otherwise; libraries shouldn't ship a lock file).

Rust paths (`hebb::*`, `cargo add hebb`) and the crate name on crates.io are unchanged — this is a Python-side rename only.

Verification

  • `cargo check --workspace --features disk` green
  • `maturin build --release` produces `hebb_py-0.1.0-...whl`
  • `pip install` + `import hebb_py; sim = hebb_py.Sim(); sim.run(1.0, 200)` → ran 13 spikes locally

Test plan

  • CI green
  • Manual: build wheel locally, install, `import hebb_py` works

The PyPI distribution is `hebb-py` (the bare `hebb` name is taken by
an unrelated astronomy package). Aligning the module name with the
distribution name makes `pip install hebb-py` / `import hebb_py`
self-consistent and avoids any chance of import collision with the
astronomy package.

Mechanical changes:
- python/Cargo.toml: `[lib] name = "hebb_py"`
- python/src/lib.rs: `#[pymodule] fn hebb_py(...)`
- python/src/cortex.rs: `hebb.*` Python-path comments → `hebb_py.*`
- README/CLAUDE.md/CI: `import hebb` → `import hebb_py`

Rust paths (`hebb::*`, `cargo add hebb`) and the crate name on
crates.io are unchanged — this is a Python-side rename only.
@ammar-s847 ammar-s847 merged commit 2b212a5 into main May 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant