intersystems-community / intersystems-community/iris-vector-graph
pydantic and numpy were undeclared runtime dependencies (fixed in v2.19.1)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
Summary
pydantic and numpy were imported unconditionally at module level in result.py, _validate.py, cypher/translator.py, fusion.py, and vector_utils.py but were not declared in [project.dependencies] — only in the [full] optional extra.
A clean pip install iris-vector-graph==2.19.0 would fail with ModuleNotFoundError unless the user also installed [full].
How it was caught
Architecture review surfaced that 5 packages load unconditionally on from iris_vector_graph import IRISGraphEngine but were absent from declared runtime deps. Verified by tracing the import chain: result.py → cypher/translator.py → pydantic; fusion.py → numpy.
Fix
Added pydantic>=2.0.0 and numpy>=1.24.0 to [project.dependencies] in v2.19.1.
Prevention
Before each release, verify that every unconditional top-level import in the IRISGraphEngine import chain is declared in [project.dependencies]. A quick check:
python3 -c "
import sys
before = set(sys.modules.keys())
from iris_vector_graph import IRISGraphEngine
after = set(sys.modules.keys())
third_party = {m.split('.')[0] for m in after - before
if not m.startswith('iris_vector_graph')
and not m.startswith('_')
and m not in sys.stdlib_module_names}
print('Third-party hard deps:', sorted(third_party))
"
Compare the output against [project.dependencies] in pyproject.toml before every release.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with pyproject.toml and inspect [project.dependencies], then run the import-chain check shown in the issue. Compare its third-party modules with the declared dependencies; the reported fix is already present in v2.19.1, so done means confirming the declarations and checking for any remaining unconditional imports.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- build-system, release
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 15/100