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

DM-33204: Use ResourcePath instead of ButlerURI throughout. #224

Merged
merged 1 commit into from
Jan 13, 2022

Conversation

timj
Copy link
Member

@timj timj commented Jan 11, 2022

Also replaces a few Union[str, ButlerURI] and similar with the new
ResourcePathExpression type alias.

This is essentially a cherry pick of commit b014171 from #222.

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

Location of document to write a `PipelineIR` object.
"""
butlerUri = ButlerURI(uri)
butlerUri.write(yaml.dump(self.to_primitives(), sort_keys=False).encode())
with ResourcePath(uri).open("w") as buffer:
Copy link
Member Author

Choose a reason for hiding this comment

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

@TallJimbo I was torn whether to keep the I/O code as it was or adopt the new form that you had written on the branch (also the from_uri method above).

Copy link
Member

Choose a reason for hiding this comment

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

No opinion from me.

@timj timj changed the title Use ResourcePath instead of ButlerURI throughout. DM-33204: Use ResourcePath instead of ButlerURI throughout. Jan 11, 2022
@timj timj force-pushed the tickets/DM-33204 branch from 0d8c3c1 to 6964a3e Compare January 11, 2022 21:58
@@ -234,7 +236,8 @@ def applyTo(self, config):

for otype, override in self._overrides:
if otype is OverrideTypes.File:
config.load(override)
with override.open("r") as buffer:
Copy link
Member Author

Choose a reason for hiding this comment

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

Now that ResourcePath is a standalone package we should consider using it in pex_config directly.

Also replaces a few Union[str, ButlerURI] and similar with the new
ResourcePathExpression type alias.
@timj timj force-pushed the tickets/DM-33204 branch from 6964a3e to 0588191 Compare January 12, 2022 16:37
@timj timj merged commit baa8aad into main Jan 13, 2022
@timj timj deleted the tickets/DM-33204 branch January 13, 2022 04:30
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