-
Notifications
You must be signed in to change notification settings - Fork 23
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
refactor: construct bucket paths with scheme prefixes #18
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BREAKING CHANGES: GCSPaths must include a path scheme Before GCSPath would convert `/bucket-name/file` into `gs://bucket-name/file` internally. This leads to ambiguity *(thanks @honnibal) when dealing with regular file-system paths and bucket paths together. Does the path `/foo/bar` point to an absolute file path or a GCS bucket named foo? Now paths **must be** constructed with a path scheme. This allows GCSPath to deal with both types of paths, and is needed for the CLI apps to come.
justindujardin
changed the title
refactor: construct bucket paths with service prefixes
refactor: construct bucket paths with scheme prefixes
Apr 23, 2020
- add "pathy" entry point to the gcspath package - add Typer requirement - add typer CLI app for copying and moving files - basic test
GCSPath wants to work with many kinds of paths, and it's not always clear upfront what kind of path a string represents. If you're on a local file system, the path "/usr/bin/something" may be totally valid, but as a GCSPath it isn't valid because there's no service scheme attached to it, e.g. "gs://bucket/usr/bin/something" FluidPath is a Union of pathlib.Path and GCSPath which allows type-checking of the paths without needing explicit knowledge of what kind of path it is, until that knowledge is needed. *note* I originally thought of using "UnionPath" instead of "FluidPath" but the intellisense for completing "GCSPath.union" was very crowded, and a helper should be easy to type with completion.
- removes files or folders - add tests
- prints the full paths of files found in the location
- it does more than just GCS at this point
feat(pathy): rename library to be more generic
feat(cli): add pathy executable with cp and mv commands
justindujardin
added
enhancement
New feature or request
merge when passing
Merge the PR automatically once all status checks have passed
labels
Apr 24, 2020
🎉 This PR is included in version 0.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
merge when passing
Merge the PR automatically once all status checks have passed
released
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BREAKING CHANGES: GCSPaths must include a path scheme
Before GCSPath would convert
/bucket-name/file
intogs://bucket-name/file
internally. This leads to ambiguity *(thanks @honnibal) when dealing with regular file-system paths and bucket paths together. Does the path/foo/bar
point to an absolute file path or a GCS bucket named foo?Now paths must be constructed with a path scheme. This allows GCSPath to deal with both types of paths, and is needed for the CLI app/s to come.