Skip to content
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

Make project-root files toggle-able (e.g. DVC #29

Open
rtbs-dev opened this issue Mar 10, 2022 · 1 comment
Open

Make project-root files toggle-able (e.g. DVC #29

rtbs-dev opened this issue Mar 10, 2022 · 1 comment

Comments

@rtbs-dev
Copy link

Currently the tool will find any path containing a .dvc folder, however there are times when it is necessary to initialize dvc in a subdirectory. This comes up when e.g. packaging the mydata.csv.dvc files via, say, importlib to let users treat datasets as dependencies in the code itself.

On that note, dvc actually does this for you, with dvc.api.Repo.find_root(). It may be worth modularizing the assumptions here a bit, to let users assemble the "right" assumptions for what a "root directory" is, while providing sane defaults to the rest.

@jamesmyatt
Copy link
Contributor

jamesmyatt commented Jul 19, 2022

The dev branch exposes the underlying functions that allows you to specify the search criteria. https://github.com/chendaniely/pyprojroot/tree/dev. Also the default criteria looks for a directory called ".dvc" exactly, rather than just something that matches the glob ".dvc". Hopefully, this will be released.

However, if dvc does exactly what you need already, then I would just use that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants