Skip to content

Make hydra-core an optional dependency - #287

Merged
timkpaine merged 2 commits into
mainfrom
feature/optional-hydra
Oct 27, 2026
Merged

timkpaine merged 2 commits into
mainfrom
feature/optional-hydra

Conversation

@timkpaine

Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

    1 files  ±0      1 suites  ±0   2m 5s ⏱️ -16s
1 559 tests +1  1 554 ✅ +1  5 💤 ±0  0 ❌ ±0 
1 625 runs  +1  1 620 ✅ +1  5 💤 ±0  0 ❌ ±0 

Results for commit 37adbc5. ± Comparison against base commit 1364e8c.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.83%. Comparing base (1364e8c) to head (37adbc5).

Files with missing lines Patch % Lines
ccflow/base.py 80.00% 1 Missing and 1 partial ⚠️
ccflow/tests/test_import.py 66.66% 1 Missing and 1 partial ⚠️
ccflow/ui/panel/cli.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #287      +/-   ##
==========================================
- Coverage   93.84%   93.83%   -0.02%     
==========================================
  Files         203      203              
  Lines       22477    22488      +11     
  Branches     1457     1458       +1     
==========================================
+ Hits        21094    21101       +7     
- Misses       1096     1099       +3     
- Partials      287      288       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…xample

The full extra ships the panel/spaday UI servers, whose CLIs import
ccflow.utils.hydra when building their argument parser, so hydra-core
must be installed for them to run. The narwhals_pipelines notebook loads
its registry through a Hydra config via load_config, which also requires
hydra-core now that it is optional.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@ptomecek ptomecek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. hydra-core is cleanly made optional: lazy imports throughout, and _dict_config_type() correctly avoids importing omegaconf just to isinstance-check (a DictConfig can't exist unless omegaconf is already loaded). The dedicated test_without_hydra covers the optional path, and I verified the config/registry/lazy suites pass with and without hydra present.

I pushed one small fix: hydra-core was added to develop and test but not full, which ships the panel/spaday UI servers. Their CLIs import ccflow.utils.hydra while building the argument parser, so pip install ccflow[full] would have left the UI unable to start (it fails even at --help). Also added a one-line note to the narwhals_pipelines notebook, since its setup cell loads the registry via load_config and now needs hydra-core.

@timkpaine
timkpaine merged commit 7666a7d into main Oct 27, 2026
17 of 20 checks passed
@timkpaine
timkpaine deleted the feature/optional-hydra branch October 27, 2026 20:07
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