-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
init: rename/alias --no-scm and --subdir? #2901
Comments
We can make an alias and deprecate, hide --no-scm |
Context: iterative/dvc.org#540 (comment) |
We could even automate detecting whether there's a Git repo underneath and not offer this option, merging this issue with #2472. |
Also, maybe --subdir should be --sub-git? (Context: iterative/dvc.org#1022 (comment)) |
I really don't the idea of The use case for me - is being able to create isolated DVC sub-projects. Mostly due to monorepos. So, starting explanations from Git or naming an option this leads this into a wrong direction. |
Good points, I agree with a lot of that now that I thing about it.
Except it kind of is about Git originally, here's the original issue: Support for multiple .dvc roots in a single git repo /issues/2349 . You can have a parent DVC project started with --subdir. "subdir" refers to a subdirectory of a Git repo, which can also be a DVC repo but that's not the key aspect. Another interface I just thought of would be to kind of join these options into a single $ mkdir repo && cd repo
$ git init
$ dvc init --scm=root # same as plain dvc init
$ mkdir repo && cd repo
$ git init
$ mkdir dir && cd dir
$ dvc init --scm=subdir
$ mkdir project && cd project
$ dvc init --scm=no |
looks like you don't need one of those (at least and also, let's imagine we forget about no-scm, let's assume for now that we always deal with Git (this is 99% of the cases) - would you name the first two options differently? |
Yes, the
Same as If
That's one of the use cases: a DVC subproject inside a parent DVC repository (tracked by Git) – not a subproject inside a non-git parent project though. But there's also the use case of a root DVC project inside a plain Git repo a.k.a. monorepo (I think that's the main one). So what about |
it's might be rare but those are big companies with the large projects - so they are important because of this :) no-scm is rare and it's not yet clear if anybody using it at all except us for tests and debug.
sounds the same to me - isolated sub-project. What is the difference?
Again, not sure I'm following. Could you elaborate? |
To summarize, both options are related to Git so (1) one idea is to combine them into one, but in any case we would need to decide the final naming, either for the option itself, or for the accepted values. (2) if we want to name them based on the use case and avoid technical/implementation jargon, I would say --no-scm should be called (3) --subdir is also not a great name IMO because the main use case is mostly about monorepos (DVC project inside Git repo subdir). [To answer your question @shcheklein:] I wouldn't call this a sub-project either because that implies the parent is also a project and that's not always the case, probably not even the most common case. |
So, that's probably the key - where I do see things differently (and may be I'm wrong, of course). They are related in a way how they use Git, but for the
I think it's fine to call in case of a monorepo all separate projects a sub-project - at least it's clear to me what it means. |
Some additional thoughts.
|
I think so, yes. It affects them in that they look for .git/ above the .dvc/ root.
I don't think this is what I think
Maybe I didn't understand you, but only --subdir looks for .git root above cwd.
I think it was introduced to allow multiple DVC projects inside a single Git repo (monorepo use case, see #2349). It's not possible doing this accidentally (with plain Anyway, this is a huge discussion about options names. Probably there's no huge impact in renaming them, but I think this shows there's still some confusion as to what these options achieve. |
Actually there's already an issue related to this in the docs repo. I added a iterative/dvc.org#1039 (comment) there. So up to you guys to keep this discussion any further or not. Just curious to see what Pawel and maybe @efiop think, if they have some extra time to read above. |
Let's not mix things together. Let's forget about
again, it's a technical implementation detail, it does not answer the question why do we need this?
that's important. If we forget about no-scm and implementation details and read the current doc is something not clear enough? how can we improve that? |
Sorry for chiming in so late.
@jorgeorpinel you are right here. As to renaming the option I have no strong opinion here. I understand that current naming might not be perfectly describing what those options do. But this seems to be the problem with initialization issue all along: we had to had quite a few discussions just to agree on the behavior in different situations. If anything, I would refrain from using |
Yes @shcheklein, migrated this part of the discussion to iterative/dvc.org/issues/1039. And thanks for the input, Pawel. So I guess since there's no strong opinions in the option names and no users have reported much ocnfusion around this (that I know of), we can close this! |
UPDATE: Skip to #2901 (comment)
Since Git is the only SCM supported and there are no plans (yet) to support any other SCM.
The text was updated successfully, but these errors were encountered: