-
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
Add command to add data to datasets #847
Conversation
extension/src/vscode/pickFile.ts
Outdated
@@ -12,3 +12,19 @@ export const pickFile = async (title: string): Promise<string | undefined> => { | |||
return fsPath |
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] File needs renamed
@@ -187,7 +189,10 @@ export class TrackedExplorerTree implements TreeDataProvider<string> { | |||
const absolutePath = join(path, relative.path) | |||
this.pathItems[absolutePath] = { | |||
dvcRoot, | |||
isDirectory: relative.isdir, | |||
// TODO: revert after https://github.com/iterative/dvc/issues/6094 is fixed |
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 a patch for the bug. Definitely not a long term solution.
) | ||
if (paths) { | ||
await moveTargets(paths, destination) | ||
return fireWatcher(this.getDataPlaceholder(destination)) |
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] Updates the decorations.
@@ -0,0 +1,30 @@ | |||
import { window } from 'vscode' |
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 file has been renamed from pickFile
.
Open to a better name if you have one.
af558fb
to
925980b
Compare
@@ -8,6 +9,11 @@ import { isInWorkspace } from './workspace' | |||
import { Repository } from '../repository' | |||
import { EXPERIMENTS_GIT_REFS } from '../experiments/repository' | |||
|
|||
export const fireWatcher = (path: string): Promise<void> => { | |||
const now = new Date().getTime() / 1000 |
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.
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.
was "good" trying to work out why this only didn't work in the windows part of the CI.
.mockReturnValueOnce(true) | ||
.mockReturnValueOnce(true) | ||
.mockReturnValueOnce(true) | ||
.mockReturnValueOnce(true) |
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 a consequence of https://github.com/iterative/vscode-dvc/pull/847/files#r716349187. Very inefficient but temporary.
Code Climate has analyzed commit 669f142 and detected 1 issue on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (85% is the threshold). This pull request will bring the total coverage in the repository to 96.1% (0.0% change). View more on Code Climate. |
This PR adds a command to the tracked tree which gives users the ability to add data to a tracked folder from anywhere on their machine. The user can choose files or folders and can pick multiple of each. The command "moves" data instead of coping it so there is a warning modal in place to ask for confirmation.
Demo:
Screen.Recording.2021-09-27.at.2.43.41.pm.mov
Note: Adding a folder into a tracked directory yields the following error from
dvc list
->I will raise a new bug in the DVC repo. There is placeholder on the board to do it.