Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/tox_runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
Expand All @@ -30,14 +31,14 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install `grep 'tox==' < requirements-dev.txt`

- name: Cache tox environments
uses: actions/cache@v3
with:
path: .tox
key: ${{ runner.os }}-tox-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/tox.ini') }}-${{ hashFiles('**/setup.cfg') }}
key: ${{ runner.os }}-tox-${{ hashFiles('**/requirements-dev.txt') }}-${{ hashFiles('**/pyproject.toml') }}

- name: Run tox on the repo
run: |
tox
tox
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
language: python
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
install:
- pip install -r requirements.txt
- pip install -r requirements-dev.txt
script:
- pytest --cov-report term --cov=taskflow

29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# taskflow

## Install
In the project root, run:

```bash
pip install .
```
or
```bash
pip install taskflow
```
or add this to your `requirements.txt` file:

`taskflow @ git+ssh://git@github.com/Vectorworks/taskflow.git@v{tag}`

## Development
If you are using a virtual environment, make sure to activate it before running the following commands.

To run tox locally you need only the dev requirements, which can be installed with:

```bash
pip install -e .[dev]
```
or

```bash
pip install -r requirements-dev.txt
```


[![Build Status](https://travis-ci.com/Vectorworks/taskflow.svg?branch=master)](https://travis-ci.com/Vectorworks/taskflow)

taskflow is a simple workflow library, designed to be easily extended to support asynchronous distributed execution.
Expand Down
77 changes: 77 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
[build-system]
requires = ["setuptools>=80.3.1"]
build-backend = "setuptools.build_meta"

[project]
name = "taskflow"
dynamic = ["version", "optional-dependencies"]
urls = {"homepage" = "https://git@github.com/Vectorworks/taskflow.git"}
description = "A simple workflow library."
readme = "README.md"
requires-python = ">=3.9"

[tool.setuptools.dynamic]
version = {attr = "taskflow.__version__"}
optional-dependencies = { dev = { file = ["requirements-dev.txt"] } }

[tool.setuptools.packages.find]
where = ["."]

[tool.setuptools.package-data]
taskflow = ["**/*"]

[tool.pytest.ini_options]
testpaths = ["taskflow/tests"]

[tool.flake8]
exclude = [".cache", ".git", ".tox", ".vscode"]
max-line-length = 120

[tool.isort]
skip = [".cache", ".git", ".tox", ".vscode"]
indent = 4
line_length = 120
multi_line_output = 2
combine_as_imports = true
include_trailing_comma = true
default_section = "THIRDPARTY"
known_libraries = []
known_first_party = ["taskflow"]
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "LIBRARIES", "FIRSTPARTY", "LOCALFOLDER"]

[tool.tox]
envlist = ["py310-django32", "py310-django42", "py311-django42", "lint", "isort"]
skip_missing_interpreters = true

[tool.tox.env.default]
recreate = false
alwayscopy = true
usedevelop = false
setenv = {PYTHONPATH = "{toxinidir}"}
changedir = "{toxinidir}"

[tool.tox.env.py310-django32]
extras = ["dev"]
deps = ["django>=3.2,<4.0"]
basepython = ["python3.10"]
commands = [["python", "-m", "pytest"]]

[tool.tox.env.py310-django42]
extras = ["dev"]
deps = ["django>=4.2,<4.3"]
basepython = ["python3.10"]
commands = [["python", "-m", "pytest"]]

[tool.tox.env.py311-django42]
extras = ["dev"]
deps = ["django>=4.2,<4.3"]
basepython = ["python3.11"]
commands = [["python", "-m", "pytest"]]

[tool.tox.env.lint]
extras = ["dev"]
commands = [["python", "-m", "flake8", "taskflow"]]

[tool.tox.env.isort]
extras = ["dev"]
commands = [["python", "-m", "isort", "--check-only", "--diff", "taskflow"]]
11 changes: 11 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# test
pytest==8.3.5
pytest-cov==6.0.0
pytest-mock==3.14.0

# codestyle
flake8==7.2.0
flake8-pyproject==1.2.3
isort==5.13.2

tox==4.26.0
5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

22 changes: 0 additions & 22 deletions setup.cfg

This file was deleted.

58 changes: 0 additions & 58 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion taskflow/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__title__ = "Taskflow"
__version__ = "0.2.2"
__version__ = "0.3.0"

from .flow import * # noqa
from .tasks import * # noqa
29 changes: 0 additions & 29 deletions tox.ini

This file was deleted.