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

show versions registered in specified git ref #335

Closed
wants to merge 1 commit into from

Conversation

aguschin
Copy link
Contributor

close #312

Implements #312 (comment):

$ git clone https://github.com/iterative/example-gto
$ cd example-gto
$ gto show
╒══════════╤══════════╤════════╤═════════╤════════════╕
│ name     │ latest   │ #dev   │ #prod   │ #staging   │
╞══════════╪══════════╪════════╪═════════╪════════════╡
│ churn    │ v3.1.1   │ v3.1.1 │ v3.0.0  │ v3.1.0     │
│ cv-class │ v0.1.13  │ -      │ -       │ -          │
│ segment  │ v0.4.1   │ v0.4.1 │ -       │ -          │
╘══════════╧══════════╧════════╧═════════╧════════════╛
$ gto show nn:HEAD  # show versions for nn in HEAD
╒════════════╤═══════════╤═════════╤═════════════════════╤══════════════╕
│ artifact   │ version   │ stage   │ created_at          │ ref          │
╞════════════╪═══════════╪═════════╪═════════════════════╪══════════════╡
│ churn      │ v3.1.0    │ staging │ 2022-11-20 09:36:38 │ [email protected] │
╘════════════╧═══════════╧═════════╧═════════════════════╧══════════════╛
$ gto show nn:HEAD --ref
[email protected]
$ gto show :HEAD  # show all artifacts that have versions/assignments in HEAD
╒════════════╤═══════════╤═════════╤═════════════════════╤══════════════╕
│ artifact   │ version   │ stage   │ created_at          │ ref          │
╞════════════╪═══════════╪═════════╪═════════════════════╪══════════════╡
│ churn      │ v3.1.0    │ staging │ 2022-11-20 09:36:38 │ [email protected] │
╘════════════╧═══════════╧═════════╧═════════════════════╧══════════════╛
$ gto show @v3.1.0  # show all v3.1.0 versions for all artifacts
╒════════════╤═══════════╤═════════╤═════════════════════╤══════════════╕
│ artifact   │ version   │ stage   │ created_at          │ ref          │
╞════════════╪═══════════╪═════════╪═════════════════════╪══════════════╡
│ churn      │ v3.1.0    │ staging │ 2022-11-20 09:36:38 │ [email protected] │
╘════════════╧═══════════╧═════════╧═════════════════════╧══════════════╛
$ gto show "#staging"  # show all versions in staging for all artifacts
╒════════════╤═══════════╤═════════╤═════════════════════╤══════════════╕
│ artifact   │ version   │ stage   │ created_at          │ ref          │
╞════════════╪═══════════╪═════════╪═════════════════════╪══════════════╡
│ churn      │ v3.1.0    │ staging │ 2022-11-20 09:36:38 │ [email protected] │
╘════════════╧═══════════╧═════════╧═════════════════════╧══════════════╛
$ gto show --long  # alternative way to show the registry
╒════════════╤═══════════╤═════════╤═════════════════════╤══════════════╕
│ artifact   │ version   │ stage   │ created_at          │ ref          │
╞════════════╪═══════════╪═════════╪═════════════════════╪══════════════╡
│ churn      │ v3.1.1    │ dev     │ 2022-11-27 08:16:38 │ [email protected] │
│ churn      │ v3.1.0    │ staging │ 2022-11-20 09:36:38 │ [email protected] │
│ churn      │ v3.0.0    │ prod    │ 2022-11-15 18:29:58 │ [email protected] │
│ cv-class   │ v0.1.13   │         │ 2022-11-18 02:03:18 │ [email protected] │
│ cv-class   │ 793ff78   │         │ 2022-11-19 05:49:58 │ 793ff78          │
│ segment    │ v0.4.1    │ dev     │ 2022-11-16 22:16:38 │ [email protected] │
│ segment    │ 793ff78   │         │ 2022-11-19 05:49:58 │ 793ff78        │
╘════════════╧═══════════╧═════════╧═════════════════════╧════════════════╛

@aguschin aguschin self-assigned this Jan 31, 2023
@aguschin aguschin changed the title Show versions in specific git ref show versions registered in specified git ref Jan 31, 2023
@aguschin
Copy link
Contributor Author

aguschin commented Jan 31, 2023

TODO:

  • stop using shortcuts in gto.api.show
  • implement --long in CLI
  • how to get --long in API?
  • gto.api.show or (gto.api.show_versions and gto.api.show_registry)?
  • post an example how to get tag for provided commit with API

@aguschin
Copy link
Contributor Author

@bgalvao, Hi! Started implementing this, but couldn't finish in one go. I'll have a vacation this week, will get back to it on the next one!

@aguschin aguschin marked this pull request as draft January 31, 2023 14:29
@bgalvao
Copy link

bgalvao commented Jan 31, 2023

@aguschin fair enough. Enjoy vacation!

@aguschin aguschin closed this Sep 4, 2023
@aguschin aguschin deleted the feature/show-use-revision branch September 4, 2023 08:09
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

Successfully merging this pull request may close these issues.

Get artifact version registered at commit
2 participants