iterative / gto

🏷️ Git Tag Ops. Turn your Git repository into Artifact Registry or Model Registry.
https://dvc.org/doc/gto
Apache License 2.0
140 stars 16 forks source link

Story: Bring back consistency between `--push` and `--commit` options and default behaviour with remote repos #358

Closed francesco086 closed 1 year ago

francesco086 commented 1 year ago

Summary / Background

Currently in the help descriptions one reads, for example

--push                         Push created tag automatically (experimental)

but if --repo is fed with a remote repo, the push is happening automatically (which makes sense). However, the description is not clear. Same with the --commit option.

It would be useful to update the help page to make it more understandable.

Scope

These are the affected commands.

Assumptions

Open Questions

aguschin commented 1 year ago

Thank you for bringing this up @francesco086! I agree with your assumption.

Perhaps one could even get rid of the two options altogether, and make it happen for remote repos, and not for local ones.

I often use --push while being already in the local repo. That's very convenient IMO.

I think we could update the option description and update docs (re-generate actually, since I had a helper script generating them).

I guess it should be like:

--push                         Push created git tag to `origin`

Since we deprecated working with artifacts.yaml in 0.3.0, --commit is now irrelevant (sorry to say that, I remember this was huge effort of yours to introduce both). related to #360, since we still have annotate in docs.

And happy to help if you want to contribute this :)

francesco086 commented 1 year ago

Happy to contribute once determined it makes sense ;)

I agree, an update in the documentation is sufficient. Perhaps I would suggest to explicitly mention that if specified repo is remote then push is automatically active. So, perhaps:

--push                         Push created git tag to `origin` (if provided remote repo with `--repo` this is automatic)

Regarding annotate and remote, no hard feeling from my side - this is why software is "soft" and not "hard"-ware :)

aguschin commented 1 year ago

Right, missed that part. Looks good to me! I'd also try to make it a bit more concise if possible, like:

--push                         Push created git tag to `origin` (done automatically for remote repo)
francesco086 commented 1 year ago

Here the PR: https://github.com/iterative/gto/pull/363 (it took much longer to wait for all CI tests to finish running than to make the change 🤣 )

aguschin commented 1 year ago

I think this was fixed. Closing!