Is the process "To develop adi_py, use the conda_environment.yml to set up a conda environment before you build." in README obsolete?
Description
Some questions about "To develop adi_py, use the conda_environment.yml to set up a conda environment before you build."
-
The python version is pinned to py3.9, should there be notes on how to develop in other python version. (Realizing that there is adi_py available for py310 and py311 at https://anaconda.org/ARM-DOE/adi_py/files, the issue should be resolved internally but it might be good to update the README instruction.)
-
adi_py itself is listed as a dependency in conda_environment.yml. What are the reasons for that? The special concerns are:
- The actual underlying dependency is hidden. e.g., cython. As a result, it doesn't help the environment dependency resolver to resolve the dependency.
- When experimenting with the resolver behavior, I used conda to install adi_py==3.21.1 and adi_py==3.20.0 in python 3.10 environment, respectively. Then I ran
python -c "import cython; print(cython.__version__)"
, in adi_py==3.21.1, the cython version is 0.29.37, while in adi_py==3.20.0, the cython version is 3.0.10. It puzzles me why the behavior is like that. And it is a dependency management red flag since as an older version, adi_py==3.0.10 uses a newer dependency by default which can cause broken code due to dependency version shift.
proposal
To improve packaging quality, list the actual dependencies in setup.py, i.e., in "install_requires" section (ref: https://setuptools.pypa.io/en/latest/userguide/dependency_management.html#declaring-required-dependency). Note: using from setuptools import setup
instead of from distutils.core import setup
. This helps dependency management especially improving clarity by avoiding vauge self-listed dependency.
P.S.: Generally speaking, the dependency can fall into different categories: development, testing, release/build. If the development in this context is purely about API development, then create an environment with self-listed dependency is not extreme harmful but still not best practice. But it also seems redundant to have to build c binding dependencies if merely for API development, since the self-listed dependency should serve the purpose for that.