From b2e0ded532e9562a9e3607f4252073441391b818 Mon Sep 17 00:00:00 2001 From: rorour Date: Sat, 9 Jul 2022 00:28:35 +0000 Subject: [PATCH 01/18] change merged pr action to run on master instead of feature branch --- .github/workflows/ci-pull-request.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-pull-request.yml b/.github/workflows/ci-pull-request.yml index 4e76868c..dd911d0a 100644 --- a/.github/workflows/ci-pull-request.yml +++ b/.github/workflows/ci-pull-request.yml @@ -1,14 +1,16 @@ name: ci-pull-request on: pull_request: - types: [opened, reopened, synchronize, closed] + branches: + - main + - master + push: branches: - main - master jobs: ci-pull-request: - if: ${{ github.event.action != 'closed' || github.event.pull_request.merged == true }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From db9f52a3948646107fd9ce85ffd5e302d2f2508c Mon Sep 17 00:00:00 2001 From: rorour Date: Tue, 12 Jul 2022 00:06:37 +0000 Subject: [PATCH 02/18] functional, ran fmt --- pykern/pkcli/github.py | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/pykern/pkcli/github.py b/pykern/pkcli/github.py index 224f1e72..9760a1bd 100644 --- a/pykern/pkcli/github.py +++ b/pykern/pkcli/github.py @@ -326,6 +326,50 @@ def restore(git_txz): _shell(["git", "checkout"]) +def verify_head_passed_ci(repo): + import requests + + branch = "master" # TODO(rorour) find a way to set master/main + owner = "radiasoft" # TODO(rorour) remove var + + def _run_on_repo(*cmd): + return ( + subprocess.check_output( + ["git", "-C", os.environ["HOME"] + "/src/" + owner + "/" + repo, *cmd], + stderr=subprocess.STDOUT, + ) + .decode("utf-8") + .rstrip("\n") + ) + + r = requests.get( + _GITHUB_API + + "/repos/" + + owner + + "/" + + repo + + "/actions/runs?per_page=1&page=1&branch=" + + branch, + headers={ + "Accept": "application/vnd.github+json", + "Authorization": "token " + os.environ["GITHUB_PAT"], + }, + ) + assert r.json().get("workflow_runs"), f"no workflow runs for branch {branch}" + api_head_sha = r.json().get("workflow_runs")[0].get("head_sha") + _run_on_repo("branch") + _run_on_repo("checkout", branch) + _run_on_repo("pull") + origin_head_sha = _run_on_repo("rev-parse", f"origin/{branch}") + assert ( + api_head_sha == origin_head_sha + ), f"most recent run on {branch}={api_head_sha} does not match {origin_head_sha}" + c = r.json().get("workflow_runs")[0].get("conclusion") + e = "success" + assert c == e, f"conclusion={c} does not match expected={e}" + print(f"HEAD from {branch} passed ci (sha {api_head_sha})") + + class _GitHub(object): def __init__(self): self._github = None From 33279aca915e367c8c3576cc6614b985c2175cad Mon Sep 17 00:00:00 2001 From: rorour Date: Tue, 12 Jul 2022 20:05:29 +0000 Subject: [PATCH 03/18] remove print and unncessary line --- pykern/pkcli/github.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pykern/pkcli/github.py b/pykern/pkcli/github.py index 9760a1bd..9a6e7caf 100644 --- a/pykern/pkcli/github.py +++ b/pykern/pkcli/github.py @@ -357,7 +357,6 @@ def _run_on_repo(*cmd): ) assert r.json().get("workflow_runs"), f"no workflow runs for branch {branch}" api_head_sha = r.json().get("workflow_runs")[0].get("head_sha") - _run_on_repo("branch") _run_on_repo("checkout", branch) _run_on_repo("pull") origin_head_sha = _run_on_repo("rev-parse", f"origin/{branch}") @@ -367,7 +366,7 @@ def _run_on_repo(*cmd): c = r.json().get("workflow_runs")[0].get("conclusion") e = "success" assert c == e, f"conclusion={c} does not match expected={e}" - print(f"HEAD from {branch} passed ci (sha {api_head_sha})") + pkdlog(f"HEAD from {branch} passed ci (sha {api_head_sha})") class _GitHub(object): From 623e1bd5118772ed03b2dd4e2692a8d8f7d9c1f7 Mon Sep 17 00:00:00 2001 From: rorour Date: Tue, 12 Jul 2022 20:16:53 +0000 Subject: [PATCH 04/18] use f strings --- pykern/pkcli/github.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/pykern/pkcli/github.py b/pykern/pkcli/github.py index 9a6e7caf..db0f2ca9 100644 --- a/pykern/pkcli/github.py +++ b/pykern/pkcli/github.py @@ -335,7 +335,7 @@ def verify_head_passed_ci(repo): def _run_on_repo(*cmd): return ( subprocess.check_output( - ["git", "-C", os.environ["HOME"] + "/src/" + owner + "/" + repo, *cmd], + ["git", "-C", os.environ["HOME"] + f"/src/{owner}/{repo}", *cmd], stderr=subprocess.STDOUT, ) .decode("utf-8") @@ -343,13 +343,7 @@ def _run_on_repo(*cmd): ) r = requests.get( - _GITHUB_API - + "/repos/" - + owner - + "/" - + repo - + "/actions/runs?per_page=1&page=1&branch=" - + branch, + f"{_GITHUB_API}/repos/{owner}/{repo}/actions/runs?per_page=1&page=1&branch={branch}", headers={ "Accept": "application/vnd.github+json", "Authorization": "token " + os.environ["GITHUB_PAT"], From b09f39dd081e33c2fea46f0f81697bb23d7c3e7f Mon Sep 17 00:00:00 2001 From: rorour Date: Fri, 15 Jul 2022 18:51:11 +0000 Subject: [PATCH 05/18] changes from comments --- pykern/pkcli/github.py | 44 +++++++++++------------------------------- pykern/pkconfig.py | 2 +- 2 files changed, 12 insertions(+), 34 deletions(-) diff --git a/pykern/pkcli/github.py b/pykern/pkcli/github.py index db0f2ca9..bec8570f 100644 --- a/pykern/pkcli/github.py +++ b/pykern/pkcli/github.py @@ -326,41 +326,19 @@ def restore(git_txz): _shell(["git", "checkout"]) -def verify_head_passed_ci(repo): - import requests - - branch = "master" # TODO(rorour) find a way to set master/main - owner = "radiasoft" # TODO(rorour) remove var +def t(repo, branch=None): + r = _repo_arg(repo) - def _run_on_repo(*cmd): - return ( - subprocess.check_output( - ["git", "-C", os.environ["HOME"] + f"/src/{owner}/{repo}", *cmd], - stderr=subprocess.STDOUT, - ) - .decode("utf-8") - .rstrip("\n") - ) + def _branch(r, name, reraise=True): + try: + return r.branch(name=name) + except github3.exceptions.NotFoundError: + if reraise: + raise - r = requests.get( - f"{_GITHUB_API}/repos/{owner}/{repo}/actions/runs?per_page=1&page=1&branch={branch}", - headers={ - "Accept": "application/vnd.github+json", - "Authorization": "token " + os.environ["GITHUB_PAT"], - }, - ) - assert r.json().get("workflow_runs"), f"no workflow runs for branch {branch}" - api_head_sha = r.json().get("workflow_runs")[0].get("head_sha") - _run_on_repo("checkout", branch) - _run_on_repo("pull") - origin_head_sha = _run_on_repo("rev-parse", f"origin/{branch}") - assert ( - api_head_sha == origin_head_sha - ), f"most recent run on {branch}={api_head_sha} does not match {origin_head_sha}" - c = r.json().get("workflow_runs")[0].get("conclusion") - e = "success" - assert c == e, f"conclusion={c} does not match expected={e}" - pkdlog(f"HEAD from {branch} passed ci (sha {api_head_sha})") + b = _branch(r, branch) if branch else _branch(r, "master", False) or _branch(r, "main") + pkdp(b.latest_sha()) + pkdp([c.conclusion for c in b.commit.check_runs()]) class _GitHub(object): diff --git a/pykern/pkconfig.py b/pykern/pkconfig.py index 3b482d3c..e9264448 100644 --- a/pykern/pkconfig.py +++ b/pykern/pkconfig.py @@ -158,7 +158,7 @@ class Required(tuple, object): cfg = pkconfig.init( any_param=(1, int, 'A parameter with a default'), - needed=pkconfig.Required(int, 'A parameter with a default'), + needed=pkconfig.Required(int, 'A parameter without a default'), ) Args: From d5a6ebeb4761ed0c062a6c73119b339cf59648ba Mon Sep 17 00:00:00 2001 From: rorour Date: Fri, 15 Jul 2022 18:54:29 +0000 Subject: [PATCH 06/18] fmt --- pykern/pkcli/github.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pykern/pkcli/github.py b/pykern/pkcli/github.py index bec8570f..0640d968 100644 --- a/pykern/pkcli/github.py +++ b/pykern/pkcli/github.py @@ -336,7 +336,11 @@ def _branch(r, name, reraise=True): if reraise: raise - b = _branch(r, branch) if branch else _branch(r, "master", False) or _branch(r, "main") + b = ( + _branch(r, branch) + if branch + else _branch(r, "master", False) or _branch(r, "main") + ) pkdp(b.latest_sha()) pkdp([c.conclusion for c in b.commit.check_runs()]) From cd27fb89fef18cf9d45360a54188d621d2433be6 Mon Sep 17 00:00:00 2001 From: rorour Date: Fri, 15 Jul 2022 18:57:25 +0000 Subject: [PATCH 07/18] remove pkdp --- pykern/pkcli/github.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pykern/pkcli/github.py b/pykern/pkcli/github.py index 0640d968..6888548e 100644 --- a/pykern/pkcli/github.py +++ b/pykern/pkcli/github.py @@ -341,8 +341,8 @@ def _branch(r, name, reraise=True): if branch else _branch(r, "master", False) or _branch(r, "main") ) - pkdp(b.latest_sha()) - pkdp([c.conclusion for c in b.commit.check_runs()]) + pkdlog(b.latest_sha()) + pkdlog([c.conclusion for c in b.commit.check_runs()]) class _GitHub(object): From db8023e10f394b9764f76e1d3a114b7722570e68 Mon Sep 17 00:00:00 2001 From: rorour Date: Fri, 15 Jul 2022 23:21:09 +0000 Subject: [PATCH 08/18] use github3 library instead of requests --- pykern/pkcli/github.py | 59 ++++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 19 deletions(-) diff --git a/pykern/pkcli/github.py b/pykern/pkcli/github.py index 6888548e..f9249639 100644 --- a/pykern/pkcli/github.py +++ b/pykern/pkcli/github.py @@ -5,6 +5,7 @@ :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function +from pykern import pkcli from pykern import pkconfig from pykern import pkio from pykern import pkjson @@ -49,6 +50,45 @@ def backup(): pkdlog("DONE") +def ci_check(repo, branch=None): + + def _branch(r, name, reraise=True): + try: + return r.branch(name=name) + except github3.exceptions.NotFoundError: + if reraise: + raise + + def _run_on_repo(*cmd): + return ( + subprocess.check_output( + ["git", "-C", os.environ["HOME"] + f"/src/{repo}", *cmd], + stderr=subprocess.STDOUT, + ) + .decode("utf-8") + .rstrip("\n") + ) + + r = _repo_arg(repo) + b = ( + _branch(r, branch) + if branch + else _branch(r, "master", False) or _branch(r, "main") + ) + s = b.commit.sha + _run_on_repo("checkout", b.name) + _run_on_repo("pull") + o = _run_on_repo("rev-parse", f"origin/{b.name}") + if not s == o: + raise pkcli.command_error(f"Most recent run on {b.name}={s} does not match {o}") + c = [c.conclusion for c in b.commit.check_runs()] + if not c: + raise pkcli.command_error("No workflow runs for commit") + if 'success' not in c or any(x not in ('success', 'skipped') for x in c): + raise pkcli.command_error(f"Unsuccessful conclusion for workflow run {c}") + pkdlog(f"HEAD from {b.name} passed ci (sha {s})") + + def collaborators(org, filename, affiliation="outside", private=True): """Lists direct repos to which user has access and is not a team member @@ -326,25 +366,6 @@ def restore(git_txz): _shell(["git", "checkout"]) -def t(repo, branch=None): - r = _repo_arg(repo) - - def _branch(r, name, reraise=True): - try: - return r.branch(name=name) - except github3.exceptions.NotFoundError: - if reraise: - raise - - b = ( - _branch(r, branch) - if branch - else _branch(r, "master", False) or _branch(r, "main") - ) - pkdlog(b.latest_sha()) - pkdlog([c.conclusion for c in b.commit.check_runs()]) - - class _GitHub(object): def __init__(self): self._github = None From 84133e45b3bf641643e71b790a884ae63f2762b0 Mon Sep 17 00:00:00 2001 From: rorour Date: Fri, 15 Jul 2022 23:21:49 +0000 Subject: [PATCH 09/18] fmt --- pykern/pkcli/github.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pykern/pkcli/github.py b/pykern/pkcli/github.py index f9249639..f7de3b58 100644 --- a/pykern/pkcli/github.py +++ b/pykern/pkcli/github.py @@ -51,7 +51,6 @@ def backup(): def ci_check(repo, branch=None): - def _branch(r, name, reraise=True): try: return r.branch(name=name) @@ -84,7 +83,7 @@ def _run_on_repo(*cmd): c = [c.conclusion for c in b.commit.check_runs()] if not c: raise pkcli.command_error("No workflow runs for commit") - if 'success' not in c or any(x not in ('success', 'skipped') for x in c): + if "success" not in c or any(x not in ("success", "skipped") for x in c): raise pkcli.command_error(f"Unsuccessful conclusion for workflow run {c}") pkdlog(f"HEAD from {b.name} passed ci (sha {s})") From 208f8e09fffbb30870ed2e73912fb58fdafe9409 Mon Sep 17 00:00:00 2001 From: rorour Date: Fri, 15 Jul 2022 23:24:40 +0000 Subject: [PATCH 10/18] string format --- pykern/pkcli/github.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pykern/pkcli/github.py b/pykern/pkcli/github.py index f7de3b58..7ff51ff8 100644 --- a/pykern/pkcli/github.py +++ b/pykern/pkcli/github.py @@ -61,7 +61,7 @@ def _branch(r, name, reraise=True): def _run_on_repo(*cmd): return ( subprocess.check_output( - ["git", "-C", os.environ["HOME"] + f"/src/{repo}", *cmd], + ["git", "-C", f"{os.environ['HOME']}/src/{repo}", *cmd], stderr=subprocess.STDOUT, ) .decode("utf-8") From 0be93f0d99229da03b7ee0293c13867f08425e1d Mon Sep 17 00:00:00 2001 From: rorour Date: Tue, 19 Jul 2022 19:43:44 +0000 Subject: [PATCH 11/18] changes from comments --- pykern/pkcli/github.py | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/pykern/pkcli/github.py b/pykern/pkcli/github.py index 7ff51ff8..8a1b4ac7 100644 --- a/pykern/pkcli/github.py +++ b/pykern/pkcli/github.py @@ -57,16 +57,7 @@ def _branch(r, name, reraise=True): except github3.exceptions.NotFoundError: if reraise: raise - - def _run_on_repo(*cmd): - return ( - subprocess.check_output( - ["git", "-C", f"{os.environ['HOME']}/src/{repo}", *cmd], - stderr=subprocess.STDOUT, - ) - .decode("utf-8") - .rstrip("\n") - ) + return None r = _repo_arg(repo) b = ( @@ -75,17 +66,12 @@ def _run_on_repo(*cmd): else _branch(r, "master", False) or _branch(r, "main") ) s = b.commit.sha - _run_on_repo("checkout", b.name) - _run_on_repo("pull") - o = _run_on_repo("rev-parse", f"origin/{b.name}") - if not s == o: - raise pkcli.command_error(f"Most recent run on {b.name}={s} does not match {o}") c = [c.conclusion for c in b.commit.check_runs()] if not c: - raise pkcli.command_error("No workflow runs for commit") + pkcli.command_error("No workflow runs for commit") if "success" not in c or any(x not in ("success", "skipped") for x in c): - raise pkcli.command_error(f"Unsuccessful conclusion for workflow run {c}") - pkdlog(f"HEAD from {b.name} passed ci (sha {s})") + pkcli.command_error(f"Unsuccessful conclusion={c}") + return f"branch={b.name} sha={s} passed ci" def collaborators(org, filename, affiliation="outside", private=True): From 92f8cb5ae798c6456ced913c26ada41747101e27 Mon Sep 17 00:00:00 2001 From: rorour Date: Tue, 19 Jul 2022 22:59:21 +0000 Subject: [PATCH 12/18] simplify conditional --- pykern/pkcli/github.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pykern/pkcli/github.py b/pykern/pkcli/github.py index 8a1b4ac7..7098269f 100644 --- a/pykern/pkcli/github.py +++ b/pykern/pkcli/github.py @@ -69,7 +69,7 @@ def _branch(r, name, reraise=True): c = [c.conclusion for c in b.commit.check_runs()] if not c: pkcli.command_error("No workflow runs for commit") - if "success" not in c or any(x not in ("success", "skipped") for x in c): + if not c[0] == "success": pkcli.command_error(f"Unsuccessful conclusion={c}") return f"branch={b.name} sha={s} passed ci" From 49014a8d17a76e7fb62bc12a07d7e337831e44f7 Mon Sep 17 00:00:00 2001 From: rorour Date: Tue, 19 Jul 2022 23:25:13 +0000 Subject: [PATCH 13/18] changes from comments --- pykern/pkcli/github.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pykern/pkcli/github.py b/pykern/pkcli/github.py index 7098269f..9545faae 100644 --- a/pykern/pkcli/github.py +++ b/pykern/pkcli/github.py @@ -68,9 +68,9 @@ def _branch(r, name, reraise=True): s = b.commit.sha c = [c.conclusion for c in b.commit.check_runs()] if not c: - pkcli.command_error("No workflow runs for commit") - if not c[0] == "success": - pkcli.command_error(f"Unsuccessful conclusion={c}") + pkcli.command_error(f"branch={b.name} sha={s} No workflow runs for commit") + if c[0] != "success": + pkcli.command_error(f"branch={b.name} sha={s} Unsuccessful conclusion={c}") return f"branch={b.name} sha={s} passed ci" From ea3c408a5e353e43282c3a154677ec387b309992 Mon Sep 17 00:00:00 2001 From: rorour Date: Tue, 19 Jul 2022 23:34:05 +0000 Subject: [PATCH 14/18] simplify repetition --- pykern/pkcli/github.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pykern/pkcli/github.py b/pykern/pkcli/github.py index 9545faae..d4c85bab 100644 --- a/pykern/pkcli/github.py +++ b/pykern/pkcli/github.py @@ -67,11 +67,12 @@ def _branch(r, name, reraise=True): ) s = b.commit.sha c = [c.conclusion for c in b.commit.check_runs()] + i = f"branch={b.name} sha={s}" if not c: - pkcli.command_error(f"branch={b.name} sha={s} No workflow runs for commit") + pkcli.command_error(f"{i} No workflow runs for commit") if c[0] != "success": - pkcli.command_error(f"branch={b.name} sha={s} Unsuccessful conclusion={c}") - return f"branch={b.name} sha={s} passed ci" + pkcli.command_error(f"{i} Unsuccessful conclusion={c}") + return f"{i} Passed CI" def collaborators(org, filename, affiliation="outside", private=True): From bd116b3570773c3bc81f2445986bf86ce2ead018 Mon Sep 17 00:00:00 2001 From: rorour Date: Wed, 20 Jul 2022 19:35:12 +0000 Subject: [PATCH 15/18] debugging error - not ready --- .github/workflows/ci-pull-request.yml | 8 +++++--- pykern/pksubprocess.py | 2 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-pull-request.yml b/.github/workflows/ci-pull-request.yml index dd911d0a..fb5c64d9 100644 --- a/.github/workflows/ci-pull-request.yml +++ b/.github/workflows/ci-pull-request.yml @@ -1,4 +1,4 @@ -name: ci-pull-request +name: python-ci on: pull_request: branches: @@ -10,8 +10,10 @@ on: - master jobs: - ci-pull-request: + python-ci: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - run: curl -LsS https://radia.run | bash -s ci-pull-request + - run: curl -LsS https://radia.run | bash -s python-ci + - run: echo "pwd=$PWD" + - run: echo "ls= $(ls)" diff --git a/pykern/pksubprocess.py b/pykern/pksubprocess.py index 2b1b9c38..1f5624d9 100644 --- a/pykern/pksubprocess.py +++ b/pykern/pksubprocess.py @@ -82,6 +82,7 @@ def wait_pid(): return s try: + print(f'cmd={cmd} output={output} msg={msg}') stdout = output if isinstance(output, six.string_types): stdout = open(output, "w") @@ -101,6 +102,7 @@ def wait_pid(): s = wait_pid() p = None if s != 0: + print('raising runtime error') raise RuntimeError("error exit({})".format(s)) if msg: msg("{}: normal exit(0): {}", pid, cmd) From bccda25cbb2c00ad9a16855734abfdaf7e7c69a3 Mon Sep 17 00:00:00 2001 From: rorour Date: Wed, 20 Jul 2022 19:36:31 +0000 Subject: [PATCH 16/18] debugging error - not ready --- .github/workflows/{ci-pull-request.yml => python-ci.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{ci-pull-request.yml => python-ci.yml} (100%) diff --git a/.github/workflows/ci-pull-request.yml b/.github/workflows/python-ci.yml similarity index 100% rename from .github/workflows/ci-pull-request.yml rename to .github/workflows/python-ci.yml From aefac8d3cc8aebc7d9b015594d68e9cffe51dffe Mon Sep 17 00:00:00 2001 From: rorour Date: Wed, 20 Jul 2022 19:40:17 +0000 Subject: [PATCH 17/18] debugging error - not ready --- .github/workflows/python-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/python-ci.yml index fb5c64d9..42954ad7 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/python-ci.yml @@ -15,5 +15,3 @@ jobs: steps: - uses: actions/checkout@v3 - run: curl -LsS https://radia.run | bash -s python-ci - - run: echo "pwd=$PWD" - - run: echo "ls= $(ls)" From 03e0b4875b4d0e30cc5ea78dfa07e2726545003f Mon Sep 17 00:00:00 2001 From: rorour Date: Wed, 20 Jul 2022 20:14:00 +0000 Subject: [PATCH 18/18] remove debug stuff --- .github/workflows/{python-ci.yml => ci-pull-request.yml} | 6 +++--- pykern/pksubprocess.py | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) rename .github/workflows/{python-ci.yml => ci-pull-request.yml} (63%) diff --git a/.github/workflows/python-ci.yml b/.github/workflows/ci-pull-request.yml similarity index 63% rename from .github/workflows/python-ci.yml rename to .github/workflows/ci-pull-request.yml index 42954ad7..dd911d0a 100644 --- a/.github/workflows/python-ci.yml +++ b/.github/workflows/ci-pull-request.yml @@ -1,4 +1,4 @@ -name: python-ci +name: ci-pull-request on: pull_request: branches: @@ -10,8 +10,8 @@ on: - master jobs: - python-ci: + ci-pull-request: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - run: curl -LsS https://radia.run | bash -s python-ci + - run: curl -LsS https://radia.run | bash -s ci-pull-request diff --git a/pykern/pksubprocess.py b/pykern/pksubprocess.py index 1f5624d9..2b1b9c38 100644 --- a/pykern/pksubprocess.py +++ b/pykern/pksubprocess.py @@ -82,7 +82,6 @@ def wait_pid(): return s try: - print(f'cmd={cmd} output={output} msg={msg}') stdout = output if isinstance(output, six.string_types): stdout = open(output, "w") @@ -102,7 +101,6 @@ def wait_pid(): s = wait_pid() p = None if s != 0: - print('raising runtime error') raise RuntimeError("error exit({})".format(s)) if msg: msg("{}: normal exit(0): {}", pid, cmd)