You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can use setuptools_scm.version.Version to convert GitHub branch and tags to PyPI-compatible strings, and use this as a lookup table for komodo packages that use * as version.
mapping= {}
forbtinbranch_and_tags:
try:
version=setuptools_scm.version.Version(bt)
mapping[str(version)] =btexcept: # Could not parse version string, ignorepassprint("Your branch is:", mapping["1.2.3b4"]) # => 1.2.3-beta.4
Snippet for getting releases from GitHub using pygithub.
>>>importgithub>>>g=github.Github() # <- Use token or you will quickly use too many requests...>>>repo=g.get_repo("equinor/ert")
>>>releases=repo.get_releases()
>>> [r.tag_nameforrinreleases]
['2.25.0-rc1', '2.25.0-rc0', ..., '2017.07']
We can use
setuptools_scm.version.Version
to convert GitHub branch and tags to PyPI-compatible strings, and use this as a lookup table for komodo packages that use*
as version.Github has APIs for getting branches and tags:
These are potentially paginated, so we should use an external Python package to fetch.
The text was updated successfully, but these errors were encountered: