From b13c5f29a0538a5ed80f56cc50b0036b1ce29baf Mon Sep 17 00:00:00 2001 From: Han Wang Date: Sat, 7 May 2022 12:45:52 -0700 Subject: [PATCH] Update Python and Platform support (#30) * update support * fix * update * fix * update * update --- .devcontainer/devcontainer.json | 17 +++++------------ .github/workflows/test.yml | 15 +++++++-------- .github/workflows/test_win.yml | 28 ++++++++++++++++++++++++++++ .pre-commit-config.yaml | 8 ++++---- README.md | 3 ++- adagio/instances.py | 2 +- adagio_version/__init__.py | 2 +- setup.py | 4 +++- 8 files changed, 51 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/test_win.yml diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ea79a10..e04fb7c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,14 +1,6 @@ { - "name": "Python 3", - "build": { - "dockerfile": "Dockerfile", - "context": "..", - "args": { - "VARIANT": "3.7", - "INSTALL_NODE": "false", - "NODE_VERSION": "lts/*" - } - }, + "name": "Fugue Development Environment", + "image": "fugueproject/devenv:0.4.4", "settings": { "terminal.integrated.shell.linux": "/bin/bash", "python.pythonPath": "/usr/local/bin/python", @@ -30,7 +22,8 @@ "forwardPorts": [ 8888 ], - "postCreateCommand": [ - "make devenv" + "postCreateCommand": "make devenv", + "mounts": [ + "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ] } diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 15dc325..51ed1ab 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,7 @@ # This workflow will install Python dependencies, run tests and lint with a variety of Python versions # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions -name: Test +name: Test Linux on: push: @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - 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 @@ -26,9 +26,8 @@ jobs: run: make devenv - name: Test run: make test - - name: Coveralls - env: - COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} - run: | - pip install coveralls - coveralls + - name: "Upload coverage to Codecov" + if: matrix.python-version == 3.8 + uses: codecov/codecov-action@v1 + with: + fail_ci_if_error: true diff --git a/.github/workflows/test_win.yml b/.github/workflows/test_win.yml new file mode 100644 index 0000000..c14c0d6 --- /dev/null +++ b/.github/workflows/test_win.yml @@ -0,0 +1,28 @@ +# This workflow will install Python dependencies, run tests and lint with a variety of Python versions +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Test Windows + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + runs-on: windows-latest + strategy: + matrix: + python-version: [3.7, 3.8, 3.9, "3.10"] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: make devenv + - name: Test + run: make test diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4cdb6eb..4916709 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ exclude: | ) repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.2.0 + rev: v4.2.0 hooks: - id: check-ast - id: check-docstring-first @@ -21,7 +21,7 @@ repos: - id: trailing-whitespace - id: check-vcs-permalinks - repo: https://gitlab.com/pycqa/flake8 - rev: '3.8.3' + rev: '3.9.2' hooks: - id: flake8 types: [python] @@ -34,11 +34,11 @@ repos: - flake8-tidy-imports - pycodestyle - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.782 + rev: v0.950 hooks: - id: mypy - repo: https://github.com/ambv/black - rev: 20.8b1 + rev: 22.3.0 hooks: - id: black types: [python] diff --git a/README.md b/README.md index e2379ac..6f1c78b 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,14 @@ [![PyPI pyversions](https://img.shields.io/pypi/pyversions/adagio.svg)](https://pypi.python.org/pypi/adagio/) [![PyPI license](https://img.shields.io/pypi/l/adagio.svg)](https://pypi.python.org/pypi/adagio/) [![PyPI version](https://badge.fury.io/py/adagio.svg)](https://pypi.python.org/pypi/adagio/) -[![Coverage Status](https://coveralls.io/repos/github/fugue-project/adagio/badge.svg)](https://coveralls.io/github/fugue-project/adagio) +[![codecov](https://codecov.io/gh/fugue-project/adagio/branch/master/graph/badge.svg?token=P82AEINHFY)](https://codecov.io/gh/fugue-project/adagio) [Join Fugue-Project on Slack](https://join.slack.com/t/fugue-project/shared_invite/zt-he6tcazr-OCkj2GEv~J9UYoZT3FPM4g) A Dag IO framework for [Fugue projects](https://github.com/fugue-project) ## Installation + ``` pip install adagio ``` diff --git a/adagio/instances.py b/adagio/instances.py index 8de1885..0ce95cd 100644 --- a/adagio/instances.py +++ b/adagio/instances.py @@ -23,7 +23,7 @@ from adagio.exceptions import AbortedError, SkippedError, WorkflowBug from adagio.specs import ConfigSpec, InputSpec, OutputSpec, TaskSpec, WorkflowSpec -from six import reraise +from six import reraise # type: ignore from triad.collections.dict import IndexedOrderedDict, ParamDict from triad.exceptions import InvalidOperationError from triad.utils.assertion import assert_or_throw as aot diff --git a/adagio_version/__init__.py b/adagio_version/__init__.py index d31c31e..788da1f 100644 --- a/adagio_version/__init__.py +++ b/adagio_version/__init__.py @@ -1 +1 @@ -__version__ = "0.2.3" +__version__ = "0.2.4" diff --git a/setup.py b/setup.py index caed288..ecef95f 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ author_email="goodwanghan@gmail.com", keywords="adagio dag directed acyclic graph workflow", url="http://github.com/fugue-project/adagio", - install_requires=["triad>=0.5.3"], + install_requires=["triad>=0.6.1"], extras_require={}, classifiers=[ # "3 - Alpha", "4 - Beta" or "5 - Production/Stable" @@ -28,6 +28,8 @@ "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3 :: Only", ], python_requires=">=3.6",