Skip to content

Replace the plugin/configuration system with new version that is more extensible#75

Merged
gpauloski merged 15 commits intomainfrom
issue-21
Jun 22, 2024
Merged

Replace the plugin/configuration system with new version that is more extensible#75
gpauloski merged 15 commits intomainfrom
issue-21

Conversation

@gpauloski
Copy link
Copy Markdown
Contributor

@gpauloski gpauloski commented Jun 22, 2024

Description

This is a complete rework of the plugin and CLI configuration system. The initial goal was to support configuration files, which ended up being non-trivial to do.

The resulting refactor now supports the following features:

  • There is now an EngineConfig class
  • All config types inherit from an abstract base type to ensure the correct methods and attributes are provided
  • All plugin config types (app, executor, filter, transformer) can be registered with the @register(kind) decorator
  • CLI arguments now use a hierarchical representation so attribute names will not clash between different plugins and attributes don't need to be prefixed by the plugin name
  • The CLI supports the --config option to load a base configuration from a TOML file
  • TOML config files and CLI options can be intermixed with CLI options taking precedence
  • Configuration logging, parsing validation, and errors have been improved

A lot of items were renamed or moved around, so this is a very breaking change. The CLI arguments have also changed so all docs have been updated.

Fixes

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (internal implementation changes)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (no changes to the code)
  • CI change (changes to CI workflows, packages, templates, etc.)
  • Version changes (changes to the package or dependency versions)

Testing

Extensively tested with new unit tests and running the CLI with various combinations of options.

Pull Request Checklist

Please confirm the PR meets the following requirements.

  • Relevant tags are added (breaking, bug, dependencies, documentation, enhancement, refactor).
  • Code changes pass pre-commit (e.g., ruff, mypy, etc.).
  • Tests have been added to show the fix is effective or that the new feature works.
  • New and existing unit tests pass locally with the changes.
  • Docs have been updated and reviewed if relevant.

@gpauloski gpauloski added breaking Backwards incompatible change to public interfaces documentation Improvements or additions to documentation enhancement New features or improvements to existing functionality labels Jun 22, 2024
@gpauloski gpauloski merged commit bd6d5ba into main Jun 22, 2024
@gpauloski gpauloski deleted the issue-21 branch June 22, 2024 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Backwards incompatible change to public interfaces documentation Improvements or additions to documentation enhancement New features or improvements to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve logging in run set up Support configuration files

1 participant