Skip to content

Conversation

@arnavk23
Copy link
Contributor

Reference Issues/PRs

Fixes #478

What does this implement/fix? Explain your changes.

This implements a global config manager for skbase as requested in issue #478.

It adds a global config system that allows setting config values globally, with priority order:

  1. Local configs set via BaseObject.set_config
  2. Global configs set via skbase.config.set_config
  3. Defaults from class MRO

It also includes an extension point __skbase_get_config__ for downstream packages to provide their own global configs (e.g., for specific object types like forecasters in sktime).

The implementation includes:

  • skbase.config module with get_config, set_config, reset_config, config_context
  • Integration into BaseObject.get_config with the specified priority
  • Comprehensive unit tests

Does your contribution introduce a new dependency? If yes, which one?

No

What should a reviewer concentrate their feedback on?

  • The design of the global config priority order
  • The extension mechanism for downstream packages
  • Whether the API meets the requirements from the issue

Any other comments?

This is based on the draft in #149 but adjusted to meet the exact requirements from #478, including the priority order and extension for object types.

PR checklist

For all contributions
  • I've reviewed the project documentation on contributing
  • I've added myself to the list of contributors.
  • The PR title starts with either [ENH], [CI/CD], [MNT], [DOC], or [BUG] indicating whether the PR topic is related to enhancement, CI/CD, maintenance, documentation, or a bug.
For code contributions
  • Unit tests have been added covering code functionality
  • Appropriate docstrings have been added (see documentation standards)
  • New public functionality has been added to the API Reference

arnavk23 and others added 2 commits January 27, 2026 17:15
- Implement global config system with set_config, get_config, reset_config, config_context
- Integrate global config into BaseObject.get_config with priority: local > global > defaults
- Add extension point __skbase_get_config__ for downstream packages
- Add comprehensive tests
- Add missing newlines at end of files
- Remove trailing whitespace
- Sort imports
- Add skbase.config modules to SKBASE_MODULES and SKBASE_PUBLIC_MODULES
- Add config functions to SKBASE_PUBLIC_FUNCTIONS_BY_MODULE and SKBASE_FUNCTIONS_BY_MODULE
@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 96.05263% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.57%. Comparing base (306958d) to head (a67ab9a).
⚠️ Report is 177 commits behind head on main.

Files with missing lines Patch % Lines
skbase/base/_base.py 72.72% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #491      +/-   ##
==========================================
- Coverage   85.07%   83.57%   -1.50%     
==========================================
  Files          45       55      +10     
  Lines        3015     3964     +949     
==========================================
+ Hits         2565     3313     +748     
- Misses        450      651     +201     

☔ View full report in Codecov by Sentry.
📢 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.

@arnavk23
Copy link
Contributor Author

@fkiraly whenever you are free, please take a look. Thanks!

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.

[ENH] global config manager

1 participant