Skip to content

cheats/rules: Refactor into partial object and set rules + Rename to newer terminology#9

Merged
philipaconrad merged 6 commits intomainfrom
philip/partial-object-rule
Mar 5, 2025
Merged

cheats/rules: Refactor into partial object and set rules + Rename to newer terminology#9
philipaconrad merged 6 commits intomainfrom
philip/partial-object-rule

Conversation

@philipaconrad
Copy link
Copy Markdown
Member

@philipaconrad philipaconrad commented Mar 5, 2025

What changed?

This PR splits partial set and object rules into their own sections, and refactors the naming scheme from "partial" and "complete" rules to multi-value and single-value rules, respectively. I've included some short notes about the older terminology too.

This commit splits partial set and object rules into their own sections.

Signed-off-by: Philip Conrad <philip@chariot-chaser.net>
@philipaconrad philipaconrad added the enhancement New feature or request label Mar 5, 2025
@philipaconrad philipaconrad self-assigned this Mar 5, 2025
Copy link
Copy Markdown
Member

@anderseknert anderseknert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although I don't think we should import rego.v1 in any new examples. We should also consider how we name these rule types, but leaving it at your discretion.

Comment thread cheats/rules/partial-object/cheat.rego Outdated
Comment thread build/cheatsheet.pdf
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This generated PDF looks a bit wonky but we can come back to that once this is in.

Copy link
Copy Markdown
Contributor

@charlieegan3 charlieegan3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

This commit refactors the naming scheme for complete/partial rules to be
the more modern single/multi-value terminology.

Also included: Notes about the older terminology that still appears in
docs and learning materials.

Signed-off-by: Philip Conrad <philip@chariot-chaser.net>
@philipaconrad philipaconrad changed the title cheats/rules/partial: Refactor into partial object and set rules. cheats/rules: Refactor into partial object and set rules + Rename to newer terminology Mar 5, 2025
Signed-off-by: Philip Conrad <philip@chariot-chaser.net>
Signed-off-by: Philip Conrad <philip@chariot-chaser.net>
@philipaconrad
Copy link
Copy Markdown
Member Author

ℹ️ In keeping with the discussion we had in Slack, I've refactored how we name the rule types:

  • Complete Rules ➡️ Single-Value Rules
  • Partial Set Rules ➡️ Multi-Value Set Rules
  • Partial Object Rules ➡️ Multi-Value Object Rules

I've also added some short notes about "In older documentation..." describing the older naming scheme.

Signed-off-by: Philip Conrad <philip@chariot-chaser.net>
Signed-off-by: Philip Conrad <philip@chariot-chaser.net>
@philipaconrad philipaconrad merged commit bc1e9f6 into main Mar 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants