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

Move domain logic to individual processors #1926

Merged
merged 3 commits into from
Dec 9, 2024

Conversation

sfc-gh-bdufour
Copy link
Contributor

Pre-review checklist

  • I've confirmed that instructions included in README.md are still correct after my changes in the codebase.
  • I've added or updated automated unit tests to verify correctness of my new code.
  • (N/A) I've added or updated integration tests to verify correctness of my new code.
  • I've confirmed that my changes are working by executing CLI's commands manually on MacOS.
  • I've confirmed that my changes are working by executing CLI's commands manually on Windows.
  • I've confirmed that my changes are up-to-date with the target branch.
  • (N/A) I've described my changes in the release notes.
  • I've described my changes in the section below.

Changes description

This change is part 1 of a series of refactorings aiming to enable the templates processor in domains other than native apps. This change specifically aims to move domain logic out of the compiler and into individual processors. This will facilitate moving the common portion of the processors to a shared location (under the artifacts module in the CLI's API). Attempting to do so now would leave a significant number of references to native apps in common code, which I would prefer to avoid.

@sfc-gh-bdufour sfc-gh-bdufour force-pushed the bdufour-dynamic-processor-reg branch 2 times, most recently from eac2521 to 6b094b8 Compare December 6, 2024 14:19
@sfc-gh-bdufour sfc-gh-bdufour marked this pull request as ready for review December 6, 2024 15:20
@sfc-gh-bdufour sfc-gh-bdufour requested review from a team as code owners December 6, 2024 15:20
sfc-gh-pjafari
sfc-gh-pjafari previously approved these changes Dec 6, 2024
Comment on lines 179 to 182
is_enabled_fn = getattr(processor_cls, "is_enabled", None)
if is_enabled_fn is None:
# No custom static method provided, enabled by default
return True
Copy link
Contributor

Choose a reason for hiding this comment

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

getattr(processor_cls, "is_enabled", lambda: True)

@sfc-gh-bdufour sfc-gh-bdufour force-pushed the bdufour-dynamic-processor-reg branch from 38d3271 to dceb994 Compare December 9, 2024 17:18
@sfc-gh-bdufour sfc-gh-bdufour enabled auto-merge (squash) December 9, 2024 17:18
@sfc-gh-bdufour sfc-gh-bdufour merged commit daa2e22 into main Dec 9, 2024
20 checks passed
@sfc-gh-bdufour sfc-gh-bdufour deleted the bdufour-dynamic-processor-reg branch December 9, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants