Dvc: stage: don't write default wdir

Created on 27 Aug 2019  路  6Comments  路  Source: iterative/dvc

https://github.com/iterative/dvc/blob/0.57.0/dvc/stage.py#L632

. doesn't evaluate to False and so not skipped.

bug p1-important

All 6 comments

What is the reasoning for not writing wdir? We actually have test checking that wdir . is written.

@pared just not printing default values, to make it look nicer. If wdir is not specified we default it to '.' anyway https://github.com/iterative/dvc/blob/0.58.0/dvc/stage.py#L453 , so it seems like we could simply remove it. Good point about that test, it was a part of https://github.com/iterative/dvc/commit/e26db30f6039a82f00a54475a0dc9a34b7861937 , and might've been just a sanity check, but we need to take a closer look to confirm that.

@shcheklein, do you remember if test test_default_wdir_is_written was just sanity check?
I think the most important is that default wdir is ignored in checksum, right?

@pared Yes, I think it was a sanity check. And yes, default wdir ignored in checksum is an important one. I would keep the sanity check anyway, just change it appropriately.

@efiop
regretfully, https://github.com/iterative/dvc/blob/0.58.0/dvc/stage.py#L453 can happen only if cwd, (which is obsolete) is specified, so removing assignment frome there is not enough.

I prepared solution for current issue, but I also believe that we should create new issue, which would take care of using wdir inside Stage.create. Currently there are 2 places (here and here) where we get its value from kwargs, which makes logic invloved with wdir not clear.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JoeyCarson picture JoeyCarson  路  53Comments

Suor picture Suor  路  39Comments

danfischetti picture danfischetti  路  41Comments

shcheklein picture shcheklein  路  36Comments

gcoter picture gcoter  路  38Comments