Skip to content

Conversation

@lwjohnst86
Copy link
Member

Description

As per #156, renaming custom checks to be extensions instead. Will implement the Extensions class in another PR.

Needs a quick review.

Checklist

  • Ran just run-all

Copy link
Member

@signekb signekb left a comment

Choose a reason for hiding this comment

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

Nice---should this be singular though? So extension.py and Extension rather than extensions.py and Extensions? That would mirror the singular of exclusion.py and Exclusion.

@github-project-automation github-project-automation bot moved this from In Review to In Progress in Iteration planning Oct 27, 2025
@lwjohnst86
Copy link
Member Author

Exclusion is only one exclude at a time. But Extensions hold multiple extensions (required, custom, etc). Extensions can have one or more.

@lwjohnst86 lwjohnst86 requested a review from signekb October 27, 2025 14:55
@lwjohnst86 lwjohnst86 moved this from In Progress to In Review in Iteration planning Oct 27, 2025
martonvago
martonvago previously approved these changes Oct 27, 2025
@signekb
Copy link
Member

signekb commented Oct 27, 2025

@lwjohnst86
Hmm, it doesn't feel that intuitive to me that one of them can only contain one and the other can contain multiple. What's the reasoning behind this design? :)

@lwjohnst86
Copy link
Member Author

@signekb see how the config file will look: https://github.com/seedcase-project/check-datapackage/pull/156/files#diff-c4ffca5e2b64e9668128b0ab736e53790f9fc76bfd1d3c7a2e3073691a772ca0R230-R262

I agree that it feels a bit off that one is singular and the other is plural. We could rename Exclusion to be Exclusions to match the config [[exclusions]], but then the actual Exclusion can only have one exclusion. If we wanted it to have many, it would be Exclusions.exclusions=[Exclusion(...)], which is a bit redundant.

With Extensions, it has Extensions(required_checks=[required1, required2], custom_checks=[...]).

The reason for the plural is that Extensions is a meta-class that holds two (or future more) custom check classes. And the way it would be used in the config file is that it has to be able to hold multiple nested tables/classes. Otherwise it would be [[extension_required]] and [[extension_custom_check]], which to me doesn't feel very clean and we would need to implement custom logic for each new extension class.

@lwjohnst86
Copy link
Member Author

@signekb and actually, the name of the parameter in Config() is exclusions and extensions, so they are both plural. Just that the Exclusion class is not.

@lwjohnst86
Copy link
Member Author

@signekb and the individual extensions are singular CustomCheck and RequiredCheck.

@lwjohnst86 lwjohnst86 moved this from In Review to In Progress in Iteration planning Nov 3, 2025
@lwjohnst86 lwjohnst86 moved this from In Progress to In Review in Iteration planning Nov 3, 2025
@lwjohnst86 lwjohnst86 requested a review from martonvago November 3, 2025 10:29
martonvago
martonvago previously approved these changes Nov 3, 2025
@lwjohnst86 lwjohnst86 merged commit 8642fe6 into main Nov 4, 2025
6 checks passed
@lwjohnst86 lwjohnst86 deleted the refactor/rename-file-to-extensions branch November 4, 2025 08:36
@github-project-automation github-project-automation bot moved this from In Review to Done in Iteration planning Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants