Skip to content

Commit 2ae3223

Browse files
committed
Merge branch 'release/2.0.0'
2 parents 2002a54 + cd7a223 commit 2ae3223

File tree

158 files changed

+6197
-6977
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+6197
-6977
lines changed

.checkignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.coveragerc

Lines changed: 0 additions & 27 deletions
This file was deleted.

.editorconfig

Lines changed: 0 additions & 21 deletions
This file was deleted.

.flake8

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
3+
4+
name: Python checks
5+
6+
on:
7+
push:
8+
branches: [ "develop" ]
9+
pull_request:
10+
branches: [ "develop" ]
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
19+
20+
steps:
21+
- uses: actions/checkout@v3
22+
- run: git fetch origin develop
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v3
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
- name: Setup Graphviz
28+
uses: ts-graphviz/setup-graphviz@v1
29+
- name: Install Poetry
30+
uses: snok/install-poetry@v1
31+
with:
32+
virtualenvs-create: true
33+
virtualenvs-in-project: true
34+
installer-parallel: true
35+
- name: Load cached venv
36+
id: cached-poetry-dependencies
37+
uses: actions/cache@v3
38+
with:
39+
path: .venv
40+
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
41+
- name: Install dependencies
42+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
43+
run: poetry install --no-interaction --no-root
44+
#----------------------------------------------
45+
# run ruff
46+
#----------------------------------------------
47+
- name: Linter with ruff
48+
if: matrix.python-version == 3.11
49+
run: |
50+
source .venv/bin/activate
51+
ruff .
52+
#----------------------------------------------
53+
# run black
54+
#----------------------------------------------
55+
- name: Linter with black
56+
if: matrix.python-version == 3.11
57+
run: |
58+
source .venv/bin/activate
59+
black . --check --diff
60+
#----------------------------------------------
61+
# run pytest
62+
#----------------------------------------------
63+
- name: Test with pytest
64+
run: |
65+
source .venv/bin/activate
66+
pytest --cov-report=xml:coverage.xml
67+
coverage xml
68+
#----------------------------------------------
69+
# upload coverage
70+
#----------------------------------------------
71+
- name: Upload coverage to Codecov
72+
uses: codecov/codecov-action@v3
73+
if: matrix.python-version == 3.11
74+
with:
75+
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
76+
directory: .
77+
env_vars: OS,PYTHON
78+
fail_ci_if_error: true
79+
flags: unittests
80+
name: codecov-umbrella
81+
verbose: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ coverage.xml
6060

6161
# Sphinx documentation
6262
docs/_build/
63+
docs/auto_examples/
6364

6465
# PyBuilder
6566
target/

.pre-commit-config.yaml

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,29 @@ repos:
77
exclude: docs/auto_examples
88
- id: trailing-whitespace
99
exclude: docs/auto_examples
10+
- repo: https://github.com/charliermarsh/ruff-pre-commit
11+
# Ruff version.
12+
rev: 'v0.0.220'
13+
hooks:
14+
- id: ruff
15+
# Respect `exclude` and `extend-exclude` settings.
16+
args: ["--force-exclude"]
1017
- repo: https://github.com/psf/black
1118
rev: 22.10.0
1219
hooks:
1320
- id: black
14-
- repo: https://github.com/asottile/reorder_python_imports
15-
rev: v3.9.0
16-
hooks:
17-
- id: reorder-python-imports
21+
22+
- repo: local
23+
hooks:
24+
- id: mypy
25+
name: Mypy
26+
entry: poetry run mypy statemachine/ tests/
27+
types: [python]
28+
language: system
29+
pass_filenames: false
30+
- id: pytest
31+
name: Pytest
32+
entry: poetry run pytest
33+
types: [python]
34+
language: system
35+
pass_filenames: false

.pyup.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.readthedocs.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,19 @@ version: 2
99
build:
1010
os: ubuntu-20.04
1111
tools:
12-
python: "3.8"
12+
python: "3.11"
13+
apt_packages:
14+
- graphviz
15+
jobs:
16+
post_create_environment:
17+
# Install poetry
18+
# https://python-poetry.org/docs/#installing-manually
19+
- pip install poetry
20+
# Tell poetry to not use a virtual environment
21+
- poetry config virtualenvs.create false
22+
# Install dependencies with 'docs' dependency group
23+
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
24+
- poetry install --with diagrams,docs
1325

1426
# Build documentation in the docs/ directory with Sphinx
1527
sphinx:

.travis.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)