Skip to content

Commit

Permalink
Merge branch 'release/2.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
fgmacedo committed Mar 5, 2023
2 parents 2002a54 + cd7a223 commit 2ae3223
Show file tree
Hide file tree
Showing 158 changed files with 6,197 additions and 6,977 deletions.
3 changes: 0 additions & 3 deletions .checkignore

This file was deleted.

27 changes: 0 additions & 27 deletions .coveragerc

This file was deleted.

21 changes: 0 additions & 21 deletions .editorconfig

This file was deleted.

4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

81 changes: 81 additions & 0 deletions .github/workflows/python-package.yml
@@ -0,0 +1,81 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python checks

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v3
- run: git fetch origin develop
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
#----------------------------------------------
# run ruff
#----------------------------------------------
- name: Linter with ruff
if: matrix.python-version == 3.11
run: |
source .venv/bin/activate
ruff .
#----------------------------------------------
# run black
#----------------------------------------------
- name: Linter with black
if: matrix.python-version == 3.11
run: |
source .venv/bin/activate
black . --check --diff
#----------------------------------------------
# run pytest
#----------------------------------------------
- name: Test with pytest
run: |
source .venv/bin/activate
pytest --cov-report=xml:coverage.xml
coverage xml
#----------------------------------------------
# upload coverage
#----------------------------------------------
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: matrix.python-version == 3.11
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
directory: .
env_vars: OS,PYTHON
fail_ci_if_error: true
flags: unittests
name: codecov-umbrella
verbose: true
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -60,6 +60,7 @@ coverage.xml

# Sphinx documentation
docs/_build/
docs/auto_examples/

# PyBuilder
target/
Expand Down
26 changes: 22 additions & 4 deletions .pre-commit-config.yaml
Expand Up @@ -7,11 +7,29 @@ repos:
exclude: docs/auto_examples
- id: trailing-whitespace
exclude: docs/auto_examples
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: 'v0.0.220'
hooks:
- id: ruff
# Respect `exclude` and `extend-exclude` settings.
args: ["--force-exclude"]
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.9.0
hooks:
- id: reorder-python-imports

- repo: local
hooks:
- id: mypy
name: Mypy
entry: poetry run mypy statemachine/ tests/
types: [python]
language: system
pass_filenames: false
- id: pytest
name: Pytest
entry: poetry run pytest
types: [python]
language: system
pass_filenames: false
1 change: 0 additions & 1 deletion .pyup.yml

This file was deleted.

14 changes: 13 additions & 1 deletion .readthedocs.yaml
Expand Up @@ -9,7 +9,19 @@ version: 2
build:
os: ubuntu-20.04
tools:
python: "3.8"
python: "3.11"
apt_packages:
- graphviz
jobs:
post_create_environment:
# Install poetry
# https://python-poetry.org/docs/#installing-manually
- pip install poetry
# Tell poetry to not use a virtual environment
- poetry config virtualenvs.create false
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
- poetry install --with diagrams,docs

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand Down
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

24 changes: 0 additions & 24 deletions AUTHORS.rst

This file was deleted.

141 changes: 0 additions & 141 deletions CONTRIBUTING.rst

This file was deleted.

0 comments on commit 2ae3223

Please sign in to comment.