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

[external-renames] ExternalTargetData -> TargetSnap #20787

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

smackesey
Copy link
Collaborator

@smackesey smackesey commented Mar 28, 2024

Summary & Motivation

Renames:

  • ExternalTargetData -> TargetSnap
  • rename associated methods that reference "external targets"

How I Tested These Changes

Existing test suite.

@@ -166,7 +166,7 @@ def get_sensors_for_pipeline(
results = []
for external_sensor in external_sensors:
if pipeline_selector.job_name not in [
target.job_name for target in external_sensor.get_external_targets()
target.job_name for target in external_sensor.get_targets()
Copy link
Member

Choose a reason for hiding this comment

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

Since we're establishing new conventions, should this be get_target_snaps or get_targets?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The convention I've been following in this stack is that accessors on a Snap class that return other snaps are not qualified with "snap". Snaps are implicitly understood to contain other snaps.

Open to debate on this but IMO it makes for more readable code in a world where you can use editor hover to get type information for an accessor.

Copy link
Member

@schrockn schrockn left a comment

Choose a reason for hiding this comment

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

q mgmt

@smackesey smackesey merged commit 5b4b688 into master Sep 27, 2024
1 check passed
@smackesey smackesey deleted the sean/er-target-data branch September 27, 2024 19:06
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.

2 participants