-
Notifications
You must be signed in to change notification settings - Fork 14
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
Improvements to CLI #33
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6b2756d
Rename `add-many` / `add-one` CLI commands
chrisjsewell 3553e0e
Improve `KeyError` messages
chrisjsewell 2c5397d
Clarify auto-caching in `jcache execute`
chrisjsewell 986ee85
Rename `URI` to `Origin URI` for formatted cache record
chrisjsewell 19341e7
Add `--latest-only` option to `jcache cache list`
chrisjsewell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about the default being
--latest-only
and having a flag like--include-history
instead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason why I'm hesitant to use
--include-history
is that the terminology is not strictly true in how the cache actually operates. Filtering for a certainOrigin URI
and sorting byCreated
does not guarantee to show a history for that URI; for example if you start changing file names of notebooks, or for a specific example:notebook.ipynb
and cache itnotebook.ipynb
and cache thatAssuming the actual cache isn't committed to git, you now have two versions of
notebook.ipynb
in the cache and the older one is actually the latest for the branch you are currently on.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#34 could be an alternative way to show only particular records
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that makes sense. I am just trying to think of the most common use-case, and generally speaking we should be tailoring the default UI around the common use-cases. I think it's much more common for someone to think "I want to see a list of the notebooks that are in the cache" than for them to also think "and I want to see values for every version that I have ever cached for a given notebook".
Though your branching example is a tricky one, that would definitely confuse people if they only had a single notebook listed in the cache by default even though it was out of date:-/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m definitely open to some form of solution, but it should be carefully considered what the balance is between ease-of-use and compliance with underlying logic