Skip to content

Commit 59610da

Browse files
authored
Fix module not found (#172)
* Convert to src style package from flat * Update robinhood path for src structure * Bump version, modify changelog * Update README
1 parent 64c7517 commit 59610da

File tree

14 files changed

+31
-19
lines changed

14 files changed

+31
-19
lines changed

.github/workflows/build_and_deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
- name: Clone robinhood
2222
run: |
23-
git clone https://github.com/martinus/robin-hood-hashing ripser/robinhood
23+
git clone https://github.com/martinus/robin-hood-hashing robinhood
2424
2525
- name: Build wheels
2626
uses: pypa/[email protected]
@@ -41,7 +41,7 @@ jobs:
4141

4242
- name: Clone robinhood
4343
run: |
44-
git clone https://github.com/martinus/robin-hood-hashing ripser/robinhood
44+
git clone https://github.com/martinus/robin-hood-hashing robinhood
4545
4646
- name: Build sdist
4747
run: pipx run build --sdist

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 0.6.9
2+
3+
- Convert package to `src` style.
4+
- Fix build command not including python source files.
5+
16
# 0.6.8
27

38
- Update CD commands for newer build system.

MANIFEST.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
include *.txt
22
include *.md
3-
include ripser/pyRips.pxd
4-
include ripser/ripser.cpp
5-
include ripser/pyRipser.pyx
3+
include src/ripser/pyRips.pxd
4+
include src/ripser/ripser.cpp
5+
include src/ripser/pyRipser.pyx

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,15 @@ If you're looking for a GPU-accelerated version of Ripser, you can find it at [R
2929

3030
## Setup
3131

32-
Ripser.py is available on all major platforms. All that is required is that you install the standard Python numerical computing libraries and Cython.
32+
Ripser.py is available on `pypi` with wheels for all major platforms. To install, type the following command into your environment:
33+
34+
```bash
35+
pip install python
36+
```
37+
### Local build
38+
39+
If the above command fails, you can build `ripser.py` locally. All that is required is that you
40+
install the standard Python numerical computing libraries and Cython.
3341

3442
Dependencies:
3543

@@ -47,33 +55,35 @@ Cython should be the only library required before installation. To install, type
4755

4856
```
4957
pip install cython
50-
pip install ripser
5158
```
5259

53-
If you are having trouble installing, please let us know!
60+
Following this, clone the repository, `cd` into the clone, and execute `pip install -v .`
5461

55-
## Optional dependency
62+
63+
#### Optional dependency
5664

5765
Ripser.py when compiled from source can have a _steroid_<sup>1</sup> shot by replacing the standard `unordered_map` from the STL by one of the fastest implementation available: [robin_hood](https://github.com/martinus/robin-hood-hashing). Benchmarking of Ripser.py using the `robin_hood` implementation showed speed-ups up to **30%**.
5866

5967
To be able to use `robin_hood` instead of STL, you only need to clone the repository containing the implementation:
6068

6169
```
6270
# Run this command at the root of the project
63-
git clone https://github.com/martinus/robin-hood-hashing ripser/robinhood
71+
git clone https://github.com/martinus/robin-hood-hashing robinhood
6472
```
6573

6674
After cloning robinhood with the above command, install `ripser.py` with
6775

6876
```
69-
pip install -v -e .
77+
pip install -v .
7078
```
7179

72-
This will install a local, editable version of `ripser.py` with verbose output. In the verbose output,
80+
This will install a local version of `ripser.py` with verbose output. In the verbose output,
7381
you will see confirmation that robinhood was found or not.
7482

7583
<sup>1</sup> The Python package is already compiled with `robin_hood` by default.
7684

85+
If you are having trouble installing, please let us know!
86+
7787
## Usage
7888

7989
The interface is as simple as can be:

pyproject.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ docs = ["sktda_docs_config"]
4747

4848
examples = ["tadasets", "jupyter", "pillow"]
4949

50-
[tool.setuptools.packages.find]
51-
where = ["ripser"]
52-
5350
[project.urls]
5451
Homepage = "https://ripser.scikit-tda.org"
5552
Documentation = "https://ripser.scikit-tda.org"

ripser/_version.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
def get_version():
19-
VERSIONFILE = "ripser/_version.py"
19+
VERSIONFILE = "src/ripser/_version.py"
2020
verstrline = open(VERSIONFILE, "rt").read()
2121
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
2222
mo = re.search(VSRE, verstrline, re.M)
@@ -60,7 +60,7 @@ def run(self):
6060
macros = [("USE_COEFFICIENTS", 1), ("NDEBUG", 1), ("ASSEMBLE_REDUCTION_MATRIX", 1)]
6161

6262
# Robinhood
63-
robinhood_path = os.path.join("ripser", "robinhood")
63+
robinhood_path = os.path.join("robinhood")
6464
if os.path.isdir(robinhood_path):
6565
print(
6666
"\nFound local copy of robinhood! Using robinhood for ripser.py compilation.\n"
@@ -81,7 +81,7 @@ def run(self):
8181

8282
ext_modules = Extension(
8383
"pyRipser",
84-
sources=["ripser/pyRipser.pyx"],
84+
sources=["src/ripser/pyRipser.pyx"],
8585
define_macros=macros,
8686
extra_compile_args=extra_compile_args,
8787
extra_link_args=extra_link_args,
File renamed without changes.

src/ripser/_version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "0.6.10"
File renamed without changes.

0 commit comments

Comments
 (0)