-
Notifications
You must be signed in to change notification settings - Fork 29
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
Use diff in repository class #451
Conversation
…code-dvc into switch-repo-to-diff
… switch-repo-to-diff
{ 'changed deps': { 'data/MNIST': 'modified' } }, | ||
{ 'changed outs': { 'model.pt': 'modified', logs: 'modified' } }, | ||
'always changed' | ||
const mockDiff = stub(CliReader, 'diff').resolves({ |
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.
[F] This is straight dump from the CLI
extension/src/cli/reader.ts
Outdated
> | ||
|
||
export const status = (options: ExecutionOptions): Promise<Status> => | ||
readCliProcessJson<Status>(options, Command.STATUS) |
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.
[C] Dithered a bit on whether to remove this or not as "we'll need it later" but it doesn't have a test AND just follow YAGNI, it's in the commit history.
} | ||
if (this.state.notInCache?.has(uri.fsPath)) { | ||
return DecorationProvider.DecorationNotInCache | ||
} | ||
if (this.state.modified?.has(uri.fsPath)) { | ||
return DecorationProvider.DecorationModified | ||
} | ||
if (this.state.stageModified?.has(uri.fsPath)) { | ||
return DecorationProvider.DecorationStageModified |
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.
Avoid too many return
statements within this function.
Code Climate has analyzed commit 7f374d2 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 98.6% (50% is the threshold). This pull request will bring the total coverage in the repository to 88.1% (0.0% change). View more on Code Climate. |
split this up into reviewable chunks |
Feel free to take a look at what is here but it is very rough (so that I could demo the approach in this #318 (comment)).
I am going to break bits off of this to make it easier to review.
diff
has anadded
status as opposed tonew
so I switched across to use that.I will add
renamed
into the dependent classes in a subsequent PR.