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

add API to check whether it's a GTO repo #187

Merged
merged 2 commits into from
Jun 29, 2022

Conversation

aguschin
Copy link
Contributor

close #186

@aguschin aguschin self-assigned this Jun 23, 2022
@codecov-commenter
Copy link

codecov-commenter commented Jun 23, 2022

Codecov Report

Merging #187 (50923a0) into main (eecb005) will increase coverage by 0.08%.
The diff coverage is 86.95%.

@@            Coverage Diff             @@
##             main     #187      +/-   ##
==========================================
+ Coverage   83.26%   83.35%   +0.08%     
==========================================
  Files          16       16              
  Lines        1494     1514      +20     
==========================================
+ Hits         1244     1262      +18     
- Misses        250      252       +2     
Impacted Files Coverage Δ
gto/cli.py 73.86% <0.00%> (ø)
gto/api.py 72.38% <71.42%> (-0.62%) ⬇️
gto/config.py 94.68% <100.00%> (+0.42%) ⬆️
gto/registry.py 91.04% <100.00%> (+0.56%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eecb005...50923a0. Read the comment docs.

@aguschin aguschin requested review from amritghimire and Suor June 24, 2022 10:33
gto/api.py Outdated
Comment on lines 22 to 27
def is_gto_repo(repo: Union[str, Repo]):
"""Check if repo is a gto repo"""
try:
return GitRegistry.from_repo(repo).is_gto_repo()
except NoRepo:
return False
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks a bit strange to me having this in a public API, TBH.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making that method private since I think it's some extra case not needed for every GTO API user.

@aguschin aguschin merged commit 9f125e7 into main Jun 29, 2022
@aguschin aguschin deleted the feature/api-to-get-gto-repo-existence branch June 29, 2022 10:51
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.

API call to check if the repo is a GTO repo
3 participants