Fix/issue 1895 - #2052
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2052 +/- ##
==========================================
- Coverage 75.53% 75.52% -0.01%
==========================================
Files 214 214
Lines 39682 39687 +5
==========================================
+ Hits 29974 29975 +1
- Misses 9708 9712 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
0cdb465 to
84222f6
Compare
…tras Move 17 dependencies from core to optional extras in pyproject.toml, reducing the base install footprint from 29 to 12 core dependencies. - New extras: ai, duckdb, graphic-walker, intake - Removed from core: chardet, duckdb, griffe, instructor, intake, lxml, markitdown, nbformat, panel-graphic-walker, panel-splitjs, pydantic, pydantic-extra-types, semchunk, tabulate, tiktoken, vl-convert-python - pyarrow removed from core (zero direct imports) - chardet moved to tests extra - pixi.toml updated: test-core feature includes intake, dask-core, pyarrow to compensate for removed core deps; new graphic-walker feature added Fixes holoviz#1895
3e03cc6 to
f6a9d40
Compare
|
@ahuang11 Version constraints like intake <2 are pre-existing pins carried over from core. Adjusting or loosening version bounds is out of scope for this cleanup and should be tracked in a separate issue. |
|
Can we drop intake? |
|
@ahuang11 intake — IntakeSource, IntakeSQLSource, and IntakeDremioSQLSource are kept for backward compatibility, but lumen's built-in sources (DuckDBSource, SQLAlchemySource, FileSource) cover the same use cases without an extra dependency. The intake sources are effectively redundant at this point. Removing them would be a breaking change for anyone with type: intake in their specs, so i suggest it should be tracked as a separate issue with a deprecation cycle rather than bundled into this cleanup. |
|
Make it an optional dep* |
|
Yes, already done. intake is now an optional extra |
|
duckdb is also core to using lumen ai |
…pendencies in core
|
Good catch @ahuang11 , thanks! I went back through all the deps and moved The rest of the optional stuff (LLM providers, intake, lxml) is kept in extras. Pushed the update! |
|
Actually, I think AI should NOT be separate dependencies; Lumen has pivoted towards full AI. |
…ly intake and lxml to extras
…ithout modifying test files
chardet is imported inside try/except ImportError in lumen/util.py with a
graceful latin-1 fallback - the base install works without it. The only test
exercising it already uses pytest.importorskip('chardet'). Belongs in the
tests extra, not core dependencies.

Description
Clean up requirements in lumen by moving 17 dependencies from core to
optional extras, reducing the base install footprint from 29 to 12 core
dependencies.
Dependency classification
chardettestsextralumen/util.py:644degrades to'latin-1'; used bylumen/tests/transforms/test_sql.py:137viapytest.importorskipduckdbduckdbextralumen/sources/duckdb.py:9andlumen/ai/vector_store.py:15griffeaiextralumen/ai/translate.py:17instructoraiextralumen/ai/{config,llm,utils}.pyintakeintakeextralumen/sources/intake.py:5lxmllumen/source; already intestsextramarkitdownaiextralumen/ai/{config,vector_store}.pyinside try/exceptnbformataiextralumen/ai/export.py:9panel-graphic-walkergraphic-walkerextra'graphic_walker'inlumen/views/base.py:1758panel-splitjsaiextralumen/ai/ui.py:32pyarrowpydanticaiextralumen/ai/pydantic-extra-typesaiextralumen/ai/translate.py:24semchunkaiextralumen/ai/vector_store.pytabulateaiextratiktokenaiextralumen/ai/utils.py:1335inside try/exceptvl-convert-pythonaiextralumen/ai/editors.py:399inside functionRemaining core (12)
bokeh,holoviews,hvplot,jinja2,narwhals,numpy,packaging,pandas,panel,panel-material-ui,param,sqlglot[c]New optional extras
ai: instructor, griffe, markitdown, nbformat, pydantic, pydantic-extra-types, semchunk, tabulate, tiktoken, vl-convert-python, panel-splitjsduckdb: duckdbgraphic-walker: panel-graphic-walkerintake: intakepixi.toml changes
[dependencies]removedintake,lxml[feature.ai.dependencies]removedchardet,duckdb,pyarrow,panel-graphic-walker; addedtabulate[feature.sql.dependencies]changedduckdbfrom*to>=1.2.0, addedintake <2[feature.graphic-walker.dependencies]section forpanel-graphic-walker >=0.6.4test-312/test-313addedgraphic-walkerfeature[feature.test-core.dependencies]addedpyarrow,dask-core,intake <2(these were transitively available before via core deps)pyarrow — removed from core
A grep of
lumen/source shows zero directimport pyarrowstatements — it is only referenced as a string inDATAFRAME_BACKENDS(lumen/util.py:110) and in comments. Moving it out is safe: users who need pyarrow can install it explicitly or via thetestsextra.chardet — moved to
testsextrachardet is imported inside a
try/except ImportErroratlumen/util.py:644-655with a graceful'latin-1'fallback, so the base install works without it. However,lumen/tests/transforms/test_sql.py:137doespytest.importorskip("chardet"), so it belongs in thetestsextra rather than being fully removed.Docs status
Docs require follow-up but are out of scope (toml-only change). A grep of all
.mdfiles found:docs/installation.mdanddocs/quick_start.mduse provider-only extras (lumen[ai-openai],lumen[ai-anthropic], etc.) that do not chain in the baseaiextra — pre-existing issue (provider extras never includedlumen[ai]before this PR). Should be updated tolumen[ai,ai-openai]etc.docs/configuration/spec/deployment.md:204-206sayspip install intakeas a standalone command. Should referencepip install lumen[intake].docs/contributing.md:70sayspip install -e ".[tests]"— no longer pulls in AI/sql/graphic-walker deps. Should bepip install -e ".[dev]".lumen-aipackage name.DuckDBSourcewithout install instructions for the newduckdbextra.None of these were changed in this PR but should be addressed in a follow-up.
Fixes #1895
AI Disclosure
Tool & Model: opencode + big-pickle
Usage: Dependency classification via grep analysis of
lumen/source tree; test execution and verification; PR description drafting. All classifications were verified by manual code inspection and confirmed by running the test suite locally.Checklist