Unit tests are still interrupted (during periods of frequent workflow runs) by the GitHub API Rate Limit, making success of the test process appear to be fragile. Can the use of the GitHub API be reduced or eliminated entirely? Most of this code relies on use of a file set (directory with NeXus definitions content from a release, tag, branch, or commit in the NeXus definitions repository) that is stored locally. Any of these file sets could be downloaded (without need of the API) using a URL:
file_set_name = "v2020.10" or "main" or "183-code-coverage" or "Schema-3.4" or "a4fd52d"
compressed_format = "zip" or "tar.gz"
url = f"https://github.com/prjemian/punx/archive/{file_set_name}.{compressed_format}"
Only the update subcommand interacts with GitHub. With update, there are two possibilities for download:
install : download and install a file set that does not exist locally
replace : download and replace a file set that exists locally
The GitHub API is useful in the latter case to determine whether or not a new version exists. Practically, only a branch file set (such as main) could have a new version and thus be updated. At the expense of excessive bandwidth to the end user, the replace would always install the latest commit matching the file set name.
Simpler? Likely would lose the identification of the type (commit, tag, branch, release). Not a major problem.
Unit tests are still interrupted (during periods of frequent workflow runs) by the GitHub API Rate Limit, making success of the test process appear to be fragile. Can the use of the GitHub API be reduced or eliminated entirely? Most of this code relies on use of a file set (directory with NeXus definitions content from a release, tag, branch, or commit in the NeXus definitions repository) that is stored locally. Any of these file sets could be downloaded (without need of the API) using a URL:
Only the
update
subcommand interacts with GitHub. Withupdate
, there are two possibilities for download:install
: download and install a file set that does not exist locallyreplace
: download and replace a file set that exists locallyThe GitHub API is useful in the latter case to determine whether or not a new version exists. Practically, only a
branch
file set (such asmain
) could have a new version and thus be updated. At the expense of excessive bandwidth to the end user, thereplace
would always install the latest commit matching the file set name.Simpler? Likely would lose the identification of the type (commit, tag, branch, release). Not a major problem.
Originally posted by @prjemian in https://github.com/prjemian/punx/issues/184#issuecomment-1003232809