question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make config glob paths configurable by the user

See original GitHub issue

Description

Is your feature request related to a problem? A clear and concise description of what the problem is: “I’m always frustrated when …”

Fix #1210

Today catalog config is loaded via the following paths (this also applies the same to parameters):

conf_catalog = conf_loader.get('catalog*', 'catalog*/**')

https://github.com/kedro-org/kedro/blob/e78990c6b606a27830f0d502afa0f639c0830950/kedro/framework/context/context.py#L356

These are hardcoded in the library and the user of a project cannot change without getting creative. I think there would be a lot of user value (1) making these configurable (2) being transparent with how this works.

Context

Why is this change important to you? How would you use it? How can it benefit other users?

  • It feels restrictive to stop users controlling this when so much of the framework is configurable
  • We have evidence of users want to do _catalog suffixes (as opposed to prefixes) which aren’t supported by the default pattern

Possible Implementation

(Optional) Suggest an idea for implementing the addition or change.

  • In 0.18.x it may make sense to expose in settings.py

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:9 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
AntonyMilneQBcommented, Mar 24, 2022

I’m going to reopen this because I think it was closed on the misunderstanding that this is already possible through a custom ConfigLoader, which as far as I can tell it’s not. It’s really about a custom KedroContext.

This is a request I’ve heard several times before (or at least the question of “what are the patterns kedro looks for in finding catalog/params”), and I think it makes a lot of sense to make this more transparent and configurable.

I’m not sure exactly how far we should go into making these patterns exposed to the user (e.g. whether we should make them configurable in settings.py, whether CONTEXT_ARGS should be configurable), but given that CONTEXT_CLASS is already exposed in settings.py it would be very easy to make these patterns configurable simply by making them class properties/methods than can be directly overridden rather than buried inside other methods.

This won’t immediately meet @DebanjanBanerjeeQB’s ask that we shouldn’t need to make a custom class just for a small change to naming convention, since you would still need to make a custom KedroContext class to change the patterns. But at least it would make configuring these patterns possible. After that we can consider whether users should be able to change them without needing to make a custom KedroContext.

2reactions
datajoelycommented, Mar 23, 2022

So I actually disagree here - I think it’s highly likely that a novice user would like to control this without the added complexity of the creating a custom class.

The smallest version of this I can imagine involves inheriting from the config loader you were already using, and overriding _get_config_credentials(self) and the params(self) which is type @property. I really think this is prohibitively complex for novices.

What about adding the defaults as constructor arguments?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Advanced Configuration Tricks - tutorials - Laminas Docs
Alter the configuration glob path based on computed values; Configuration is passed to the Application instance, and then the ModuleManager in order to ......
Read more >
Advanced configuration - GitLab Docs
You can change the behavior of GitLab Runner and of individual registered runners. To do this, you modify a file called config.toml ,...
Read more >
Configuration Files - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
Content Configuration - Tailwind CSS
Paths are configured as glob patterns, making it easy to match all of the content files in your project without a ton of...
Read more >
Application Configuration – Using Zend Framework 3
In line 11, there is the module_paths key which tells ZF3 about directories where to look for source files belonging to modules. Application...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found