diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4cbf29..f065e3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,9 +7,15 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: false 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 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/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(): diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 04d44ca..0000000 --- a/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps = - pytest - requests - filetype -commands = pytest {posargs}