diff --git a/client/src/components/History/Content/Dataset/DatasetActions.vue b/client/src/components/History/Content/Dataset/DatasetActions.vue index fd67a64ef08..7d18b320a37 100644 --- a/client/src/components/History/Content/Dataset/DatasetActions.vue +++ b/client/src/components/History/Content/Dataset/DatasetActions.vue @@ -91,7 +91,7 @@ export default { return !this.item.purged && ["ok", "failed_metadata", "error"].includes(this.item.state); }, showError() { - return this.item.state == "error"; + return this.item.state == "error" || this.item.state == "failed_metadata"; }, showInfo() { return this.item.state != "noPermission"; diff --git a/lib/galaxy/tool_util/deps/mulled/get_tests.py b/lib/galaxy/tool_util/deps/mulled/get_tests.py index 76576520438..847f50d255c 100644 --- a/lib/galaxy/tool_util/deps/mulled/get_tests.py +++ b/lib/galaxy/tool_util/deps/mulled/get_tests.py @@ -297,7 +297,8 @@ def hashed_test_search( r.raise_for_status() p = "-".join(package) for line in r.text.split("\n"): - if p in line: + # include only linux-64 builds since that is hardcoded in get_anaconda_url and the only target for container builds + if p in line and "linux-64" in line: build = line.split(p)[1].split(".tar.bz2")[0] if build == "": containers.append(f"{package[0]}:{package[1]}") diff --git a/scripts/bootstrap_history.py b/scripts/bootstrap_history.py index 9cb48ecefcf..28e4e10e0c1 100644 --- a/scripts/bootstrap_history.py +++ b/scripts/bootstrap_history.py @@ -337,7 +337,7 @@ def release_issue(argv): freeze_date=freeze_date, ) release_issue_contents = RELEASE_ISSUE_TEMPLATE.safe_substitute(**release_issue_template_params) - github = _github_client() + github = github_client() repo = github.get_repo(f"{PROJECT_OWNER}/{PROJECT_NAME}") repo.create_issue( title=f"Publication of Galaxy Release v {release_name}", @@ -423,7 +423,7 @@ def check_blocking_prs(argv): def check_blocking_issues(argv): release_name = argv[2] block = 0 - github = _github_client() + github = github_client() repo = github.get_repo(f"{PROJECT_OWNER}/{PROJECT_NAME}") issues = repo.get_issues(state="open") for issue in issues: @@ -480,7 +480,7 @@ def _release_dates(version): def _get_prs(release_name, state="closed"): - github = _github_client() + github = github_client() repo = github.get_repo(f"{PROJECT_OWNER}/{PROJECT_NAME}") pull_requests = repo.get_pulls(state=state) reached_old_prs = False @@ -649,7 +649,7 @@ def _text_target(pull_request, labels=None, skip_merge=True): if labels is None: labels = [] try: - github = _github_client() + github = github_client() labels = github.issues.labels.list_by_issue(int(pr_number), user=PROJECT_OWNER, repo=PROJECT_NAME) labels = [label.name.lower() for label in labels] except Exception as e: @@ -739,11 +739,25 @@ def _releases(): return sorted(f.rstrip(".rst") for f in release_note_files) -def _github_client(): - github_json_path = os.path.expanduser("~/.github.json") - with open(github_json_path) as fh: - github_json_dict = json.load(fh) - return Github(**github_json_dict) +def github_client() -> Github: + """Search environment for github access token and produce client object. + + Easiest thing to do is just to set an environment variable GITHUB_AUTH to + your personal access token ( + https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token + ). Alternatively, this can be placed into a json file in ~/.github.json in a + map keyed on login_or_token. + """ + auth = os.environ.get("GITHUB_AUTH") + if auth is not None: + return Github(auth) + else: + github_json_path = os.path.expanduser("~/.github.json") + if not os.path.exists(github_json_path): + return Github(None) + with open(github_json_path) as fh: + github_json_dict = json.load(fh) + return Github(**github_json_dict) def _release_file(release): diff --git a/scripts/release.py b/scripts/release.py index 4b1f0678230..bad5462fe07 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -1,5 +1,4 @@ import datetime -import os import pathlib import re import subprocess @@ -18,6 +17,7 @@ import click from bootstrap_history import ( _pr_to_labels, _text_target, + github_client, strip_release, ) from click.core import ( @@ -29,13 +29,10 @@ from docutils import ( utils, ) from docutils.parsers.rst import Parser -from github import ( - Github, - PullRequest, -) +from github import PullRequest from packaging.version import Version -g = Github(os.environ.get("GITHUB_AUTH")) +g = github_client() PROJECT_OWNER = "galaxyproject" PROJECT_NAME = "galaxy" REPO = f"{PROJECT_OWNER}/{PROJECT_NAME}"