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

version.py: prevent Git version computation from raiseing #2624

Merged
merged 2 commits into from
May 22, 2024
Merged

Conversation

ryan-williams
Copy link
Member

@ryan-williams ryan-williams commented May 22, 2024

Issue and/or context: TileDB-Inc/tiledbsoma-feedstock#157, #2560, #2563, #2588, #2590

Changes:

  • lines/line helpers catch CalledProcessErrors, return None
    • Git-version computations they are used in are all optional / best-effort
  • Don't raise RuntimeError if Git remote tags aren't found, or if multiple lines of stdout are returned from commands expected to return 1; just return None.

Notes for Reviewers:
Tested in a couple configurations locally:

  • normal Git clone
  • "wheel build" (not in a Git clone)
  • shallow Git clone, with a remote containing release tags
  • shallow Git clone, with a remote containing no release tags

"sdist & wheels" GHA is also running, here.

@ryan-williams ryan-williams marked this pull request as ready for review May 22, 2024 17:00
Copy link

codecov bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.24%. Comparing base (27cc8a9) to head (0eb45bd).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2624   +/-   ##
=======================================
  Coverage   90.24%   90.24%           
=======================================
  Files          37       37           
  Lines        4038     4038           
=======================================
  Hits         3644     3644           
  Misses        394      394           
Flag Coverage Δ
python 90.24% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
python_api 90.24% <ø> (ø)
libtiledbsoma ∅ <ø> (∅)

@ryan-williams ryan-williams merged commit 2f9d6bb into main May 22, 2024
31 checks passed
@ryan-williams ryan-williams deleted the rw/ver branch May 22, 2024 18:43
nguyenv pushed a commit that referenced this pull request May 23, 2024
* `version.py`: prevent Git version computation from `raise`ing

* `version.py`: ensure `__file__ == "apis/python/version.py"` relative to Git root
github-actions bot pushed a commit that referenced this pull request May 23, 2024
* `version.py`: prevent Git version computation from `raise`ing

* `version.py`: ensure `__file__ == "apis/python/version.py"` relative to Git root
johnkerl pushed a commit that referenced this pull request May 23, 2024
…#2636)

* `version.py`: prevent Git version computation from `raise`ing

* `version.py`: ensure `__file__ == "apis/python/version.py"` relative to Git root

Co-authored-by: Ryan Williams <ryan.williams@tiledb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants