hugoledoux/startinpy

List numpy as required dependency?

Closed this issue · 1 comments

Hi there,

Just starting the review at openjournals/joss-reviews#7123, and I've followed the installation instructions at https://startinpy.readthedocs.io/0.11.0/installation.html from a clean environment to pip install startinpy. After installation, I tried running a trimmed version of the example at https://startinpy.readthedocs.io/0.11.0/howitworks.html#some-examples-of-the-data-structure-and-infinity:

import startinpy

t = startinpy.DT()
t.insert_one_pt([0.5, 0.5, 1.0])
# (1, True, True)
print(t.points)

and got the following PanicException:

thread '<unnamed>' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/numpy-0.19.0/src/npyffi/array.rs:52:14:
Failed to access NumPy array API capsule: PyErr { type: <class 'ModuleNotFoundError'>, value: ModuleNotFoundError("No module named 'numpy'"), traceback: None }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
pyo3_runtime.PanicException: Failed to access NumPy array API capsule: PyErr { type: <class 'ModuleNotFoundError'>, value: ModuleNotFoundError("No module named 'numpy'"), traceback: None }

The exception is quite clear that numpy is missing, but I'm wondering if it would be good to list numpy as a required dependency in the pyproject.toml here:

[project]
name = "startinpy"
requires-python = ">=3.9"
requires-dist = ["toml>=0.10.2"]
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]

so that numpy will be installed when pip install startinpy is ran? Would there be cases where numpy is not required? (note that I haven't looked through the codebase in detail yet, just reporting some first user experience).

cheers!