Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Refactoring of rules configuration and rules converter #681

Merged
merged 30 commits into from
May 17, 2023

Conversation

kentquirk
Copy link
Contributor

@kentquirk kentquirk commented May 15, 2023

Which problem is this PR solving?

This is a reworking of the refinery rules structure. The existing rules configuration format is both awkwardly structured for technical reasons, as well as just being confusing. People make a lot of mistakes.

This structure organizes refinery rules into a map of environment name (dataset in classic mode) to sampler config, and reserves the name __default__ for the default case. It also puts the sampler configurations indented under the sampler type, which avoids another level of confusion.

Short description of the changes

  • Refactor the sampler_config file so all the configuration types are near each other
  • Rename the Rule and Condition slices to Rules and Conditions
  • Decorate all the types with yaml (and sometimes json) tags
  • Add a "rules" command to the conversion tool that uses this stuff to do the conversion

This work isn't "done" (there is more planned) but it's stable enough to call it a checkpoint, review as-is, and do the next things as separate PRs.

@kentquirk kentquirk added breaking-change Prefer 'version: bump major', but use this for breaking changes that don't bump major. wip Work In Progress labels May 15, 2023
@kentquirk kentquirk added this to the v2.0 milestone May 15, 2023
@kentquirk kentquirk force-pushed the kent.v2.convert_rules branch from 009ff7e to 472916c Compare May 15, 2023 22:24
Base automatically changed from kent.v2.rename_dataset_to_destname to main May 17, 2023 19:17
@kentquirk kentquirk marked this pull request as ready for review May 17, 2023 20:21
@kentquirk kentquirk requested a review from a team as a code owner May 17, 2023 20:21
@kentquirk kentquirk merged commit abc5c01 into main May 17, 2023
@kentquirk kentquirk deleted the kent.v2.convert_rules branch May 17, 2023 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Prefer 'version: bump major', but use this for breaking changes that don't bump major. wip Work In Progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants