Project
kedro.framework.project ¶
kedro.framework.project
module provides utility to
configure a Kedro project and access its settings.
Function | Description |
---|---|
configure_logging |
Configure logging according to the logging_config dictionary. |
configure_project |
Configure a Kedro project by populating its settings with values defined in settings.py and pipeline_registry.py . |
find_pipelines |
Automatically find modular pipelines having a create_pipeline function. |
validate_settings |
Eagerly validate that the settings module is importable if it exists. |
kedro.framework.project.configure_logging ¶
configure_logging(logging_config)
Configure logging according to logging_config
dictionary.
Source code in kedro/framework/project/__init__.py
317 318 319 |
|
kedro.framework.project.configure_project ¶
configure_project(package_name)
Configure a Kedro project by populating its settings with values defined in user's settings.py and pipeline_registry.py.
Source code in kedro/framework/project/__init__.py
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 |
|
kedro.framework.project.find_pipelines ¶
find_pipelines(raise_errors=False)
Automatically find modular pipelines having a create_pipeline
function. By default, projects created using Kedro 0.18.3 and higher
call this function to autoregister pipelines upon creation/addition.
Projects that require more fine-grained control can still define the
pipeline registry without calling this function. Alternatively, they
can modify the mapping generated by the find_pipelines
function.
For more information on the pipeline registry and autodiscovery, see https://docs.kedro.org/en/stable/nodes_and_pipelines/pipeline_registry.html
Parameters:
-
raise_errors
(bool
, default:False
) –If
True
, raise an error upon failed discovery.
Returns:
-
dict[str, Pipeline]
–A generated mapping from pipeline names to
Pipeline
objects.
Raises:
-
ImportError
–When a module does not expose a
create_pipeline
function, thecreate_pipeline
function does not return aPipeline
object, or if the module import fails up front. Ifraise_errors
isFalse
, see Warns section instead.
Warns:
-
UserWarning
–When a module does not expose a
create_pipeline
function, thecreate_pipeline
function does not return aPipeline
object, or if the module import fails up front. Ifraise_errors
isTrue
, see Raises section instead.
Source code in kedro/framework/project/__init__.py
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 |
|
kedro.framework.project.validate_settings ¶
validate_settings()
Eagerly validate that the settings module is importable if it exists. This is desirable to
surface any syntax or import errors early. In particular, without eagerly importing
the settings module, dynaconf would silence any import error (e.g. missing
dependency, missing/mislabelled pipeline), and users would instead get a cryptic
error message Expected an instance of `ConfigLoader`, got `NoneType` instead
.
More info on the dynaconf issue: https://github.com/dynaconf/dynaconf/issues/460
Source code in kedro/framework/project/__init__.py
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
|