-
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 file system watcher for dvc.yaml #1282
Conversation
a13732a
to
e8af2a2
Compare
|
||
export const loadYaml = <T>(path: string): T | undefined => { | ||
try { | ||
return load(readFileSync(path, 'utf-8')) as T |
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] Don't want everything to fall over if the file is corrupted.
} | ||
|
||
private async initialize() { | ||
const files = await findFiles(join('**', 'dvc.yaml')) |
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] We have to find all of the files in the workspace and then cut down (limitation of using workspace
from VS Code.
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.
It's not possible to use a ${dvcRoot}/**/dvc.yaml
pattern? Stranger things have happened, so I won't be too surprised if so.
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 did test that, it didn't return anything.
} | ||
|
||
private async initialize() { | ||
const files = await findFiles(join('**', 'dvc.yaml')) |
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.
It's not possible to use a ${dvcRoot}/**/dvc.yaml
pattern? Stranger things have happened, so I won't be too surprised if so.
e8af2a2
to
50fd368
Compare
Code Climate has analyzed commit 50fd368 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 85.0% (85% is the threshold). This pull request will bring the total coverage in the repository to 96.2% (-0.2% change). View more on Code Climate. |
2/3
master
<- #1281 <- this <- #1284This PR adds the file system watcher that will watch
dvc.yaml
files for updates and then load them and send them through theExperiments
class to theCheckpointsModel
. For now I plan to have oneFileSystemData
perExperiments
class but if more than more class (e.g plots) ends up needing these event I'll pull it out and use a similar pattern to the one we do to instantiatePlots
andExperiments
.