Skip to content

Move gensim and rdflib to optional extras to slim core install#1390

Draft
Copilot wants to merge 3 commits into
masterfrom
copilot/dependency-cleanup
Draft

Move gensim and rdflib to optional extras to slim core install#1390
Copilot wants to merge 3 commits into
masterfrom
copilot/dependency-cleanup

Conversation

Copilot AI commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

gensim and rdflib were bundled as core dependencies despite being non-core functionality. This change moves them to optional extras so base installs and wheel metadata stay lean while preserving access through feature extras.

  • Dependency surface cleanup

    • Removed gensim and rdflib from [project].dependencies in pyproject.toml.
    • Added both packages to the algos extra.
    • Included them in the optional meta-extra to keep extra composition consistent.
  • Docs alignment

    • Updated installation/dependency docs to classify gensim and rdflib as optional algorithm tooling instead of core requirements.
  • Behavioral guardrails in tests

    • Added tests/test_dependency_cleanup.py to assert:
      • gensim/rdflib are absent from core deps.
      • gensim/rdflib are present in algos.
    • Updated wrapper benchmark test to skip when gensim is not installed (optional-dependency-safe test behavior).
[project]
dependencies = [
  "numpy>=1.19.0",
  "scipy>=1.5.0",
  "networkx>=2.5",
  # no gensim / rdflib here
]

[project.optional-dependencies]
algos = [
  "python-louvain>=0.16",
  "cdlib>=0.3.0",
  "gensim>=4.0.0",
  "rdflib>=6.0.0",
]

Copilot AI changed the title [WIP] Cleanup dependencies for leaner py3plex wheel Move gensim and rdflib to optional extras to slim core install Jun 20, 2026
Copilot AI requested a review from SkBlaz June 20, 2026 11:36
@SkBlaz

SkBlaz commented Jun 24, 2026

Copy link
Copy Markdown
Owner

@copilot ci fails

Copilot AI commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@copilot ci fails

Fixed the CI failure in commit a2d79dc by making tests/property/test_wrappers_sparse_properties.py optional-dependency-safe (pytest.importorskip("gensim")), matching the move of gensim out of core dependencies.

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.

2 participants