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

drop gitpython in favor of scmrepo #378

Closed pmrowla closed 1 year ago

pmrowla commented 1 year ago

related: https://github.com/iterative/dvc/issues/9100

Should fix https://github.com/iterative/gto/issues/369 Fixes https://github.com/iterative/gto/issues/308

Public facing gto.api interface has not changed in this PR, but internal GTO API has changed. Ideally these changes should probably be released as a major version bump.

This PR will require changes in studio - gitpython instances can no longer be passed into the GTO calls (cc @amritghimire)

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 83.75% and project coverage change: +0.10% :tada:

Comparison is base (73b1dfb) 85.36% compared to head (8fe0e3c) 85.47%. Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #378 +/- ## ========================================== + Coverage 85.36% 85.47% +0.10% ========================================== Files 18 18 Lines 2125 2120 -5 ========================================== - Hits 1814 1812 -2 + Misses 311 308 -3 ``` | [Files Changed](https://app.codecov.io/gh/iterative/gto/pull/378?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iterative) | Coverage Δ | | |---|---|---| | [gto/constants.py](https://app.codecov.io/gh/iterative/gto/pull/378?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iterative#diff-Z3RvL2NvbnN0YW50cy5weQ==) | `100.00% <ø> (ø)` | | | [gto/utils.py](https://app.codecov.io/gh/iterative/gto/pull/378?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iterative#diff-Z3RvL3V0aWxzLnB5) | `79.16% <ø> (-2.50%)` | :arrow_down: | | [gto/index.py](https://app.codecov.io/gh/iterative/gto/pull/378?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iterative#diff-Z3RvL2luZGV4LnB5) | `80.73% <75.71%> (-0.52%)` | :arrow_down: | | [gto/git\_utils.py](https://app.codecov.io/gh/iterative/gto/pull/378?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iterative#diff-Z3RvL2dpdF91dGlscy5weQ==) | `75.24% <76.38%> (-3.57%)` | :arrow_down: | | [gto/registry.py](https://app.codecov.io/gh/iterative/gto/pull/378?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iterative#diff-Z3RvL3JlZ2lzdHJ5LnB5) | `90.53% <87.50%> (-0.04%)` | :arrow_down: | | [gto/tag.py](https://app.codecov.io/gh/iterative/gto/pull/378?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iterative#diff-Z3RvL3RhZy5weQ==) | `92.50% <90.38%> (+2.70%)` | :arrow_up: | | [gto/api.py](https://app.codecov.io/gh/iterative/gto/pull/378?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iterative#diff-Z3RvL2FwaS5weQ==) | `90.14% <97.43%> (+0.63%)` | :arrow_up: | | [gto/base.py](https://app.codecov.io/gh/iterative/gto/pull/378?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iterative#diff-Z3RvL2Jhc2UucHk=) | `88.38% <100.00%> (ø)` | | | [gto/ext.py](https://app.codecov.io/gh/iterative/gto/pull/378?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iterative#diff-Z3RvL2V4dC5weQ==) | `72.50% <100.00%> (+0.70%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/iterative/gto/pull/378/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=iterative)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pmrowla commented 1 year ago

DVC officially, supports Python 3.8 through 3.11 but GTO CI is only run against 3.8 through 3.10 (GTO CI fails if you enable 3.11). As far as I can tell, the 3.11 failure is because GTO requires outdated pylint and mypy installations that are just broken on 3.11. The actual test suite passes in 3.11.

IMO there is a lot more work that needs to be done in GTO to bring it in line with current DVC and iterative/py-template standards, but for the time being I am leaving all of that alone (GTO codebase fails pylint/mypy checks after updating and enabling the py-template or DVC configurations for those tools)

Making GTO pass current mypy/pylint may also require updating other deps (and updating pydantic may require migrating from pydantic v1 to v2 - https://github.com/iterative/gto/pull/375)

amritghimire commented 1 year ago

This PR will require changes in studio - gitpython instances can no longer be passed into the GTO calls (cc @amritghimire)

Thanks, I can look into it once It gets merged.