From 515545df2c8310b62de00511559ad68d1ff6fef6 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Sun, 24 Apr 2022 07:08:05 +0200 Subject: [PATCH 1/5] tox: solated_build = true Signed-off-by: Unai Martinez-Corral --- tox.ini | 1 + 1 file changed, 1 insertion(+) diff --git a/tox.ini b/tox.ini index 04d44ca..97242ab 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,6 @@ [tox] envlist = py3 +isolated_build = true [testenv] deps = From dcb67bb65bd70e5021359cd36006702d2446eb87 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Sun, 24 Apr 2022 07:11:31 +0200 Subject: [PATCH 2/5] ci: test Python 3.9 and 3.10 too Signed-off-by: Unai Martinez-Corral --- .github/workflows/ci.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4cbf29..50eddd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,12 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python-version: [3.6, 3.7, 3.8] + python-version: + - '3.6' + - '3.7' + - '3.8' + - '3.9' + - '3.10' steps: - uses: actions/checkout@v2 From d78c240509254016dddbbf6a062692562d7fb950 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Sun, 24 Apr 2022 07:12:31 +0200 Subject: [PATCH 3/5] switch from tox.ini to pyproject.toml Signed-off-by: Unai Martinez-Corral --- pyproject.toml | 23 +++++++++++++++++++++++ tox.ini | 10 ---------- 2 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 pyproject.toml delete mode 100644 tox.ini diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d70625f --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,23 @@ +[build-system] +requires = [ + "setuptools >= 35.0.2", + "wheel >= 0.29.0" +] +build-backend = "setuptools.build_meta" + +[tool.black] +line-length = 120 + +[tool.tox] +legacy_tox_ini = """ +[tox] +isolated_build = true +envlist = py3 + +[testenv] +deps = + pytest + requests + filetype +commands = pytest {posargs} +""" diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 97242ab..0000000 --- a/tox.ini +++ /dev/null @@ -1,10 +0,0 @@ -[tox] -envlist = py3 -isolated_build = true - -[testenv] -deps = - pytest - requests - filetype -commands = pytest {posargs} From 37661dacd326b3d47c9892978d3ba817bb5e8371 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Sun, 24 Apr 2022 07:14:56 +0200 Subject: [PATCH 4/5] ci: disable fail-fast Signed-off-by: Unai Martinez-Corral --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50eddd6..f065e3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: os: [ubuntu-latest] python-version: From 7c4219e97093f42c598f10aeb9b1c20394447c45 Mon Sep 17 00:00:00 2001 From: Unai Martinez-Corral Date: Sun, 24 Apr 2022 07:16:19 +0200 Subject: [PATCH 5/5] format: run black Signed-off-by: Unai Martinez-Corral --- setup.py | 4 +--- stdm/__init__.py | 12 +++--------- tests/test_stdm.py | 4 +--- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/setup.py b/setup.py index 9a2abea..39c7a0a 100644 --- a/setup.py +++ b/setup.py @@ -33,9 +33,7 @@ def read(fname): description="SymbiFlow Tools Data Manager", python_requires=">=3.6", url="https://github.com/SymbiFlow/symbiflow-tools-data-manager.git", - entry_points={ - "console_scripts": ["symbiflow_get_latest_artifact_url=stdm.__init__:main"] - }, + entry_points={"console_scripts": ["symbiflow_get_latest_artifact_url=stdm.__init__:main"]}, install_requires=[ "requests", ], diff --git a/stdm/__init__.py b/stdm/__init__.py index b5b4741..c5baee2 100644 --- a/stdm/__init__.py +++ b/stdm/__init__.py @@ -23,9 +23,7 @@ # For now we use only `symbiflow-arch-defs` and download tarballs -def get_latest_artifact_url( - project="symbiflow-arch-defs", build_name="install", jobset="continuous" -): +def get_latest_artifact_url(project="symbiflow-arch-defs", build_name="install", jobset="continuous"): # Handle case in which there is build_name is absent if build_name: build_name = f"/{build_name}" @@ -78,9 +76,7 @@ def get_latest_artifact_url( def main(): - parser = argparse.ArgumentParser( - description="Retrieves the latest artifacts of SymbiFlow-related CIs." - ) + parser = argparse.ArgumentParser(description="Retrieves the latest artifacts of SymbiFlow-related CIs.") parser.add_argument( "--project", @@ -121,9 +117,7 @@ def main(): if args.get_build_number: assert not (args.get_all_urls or args.get_single_url) - _, build_number = get_latest_artifact_url( - args.project, args.build_name, args.jobset - ) + _, build_number = get_latest_artifact_url(args.project, args.build_name, args.jobset) print(build_number) elif args.get_all_urls: diff --git a/tests/test_stdm.py b/tests/test_stdm.py index 96978c9..ff70733 100644 --- a/tests/test_stdm.py +++ b/tests/test_stdm.py @@ -20,9 +20,7 @@ import pytest import argparse -parser = argparse.ArgumentParser( - description="Retrieves the latest artifacts of SymbiFlow-related CIs." -) +parser = argparse.ArgumentParser(description="Retrieves the latest artifacts of SymbiFlow-related CIs.") def test_get_symbiflow_arch_defs_tarball():