Skip to content

Feature/Test workflow now properly supports python 3.7, 3.10 and 3.11. #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 28, 2023
Merged
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
9 changes: 4 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,23 @@ name: Connect DevOps Testing Library Tests

on:
push:
branches: [ '*' ]
tags: [ '*' ]
pull_request:
branches: [ master ]
pull_request:
types: [ opened, synchronize, reopened ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.7, 3.8, 3.9 ]
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
1 change: 0 additions & 1 deletion connect/devops_testing/bdd/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from behave import fixture
from behave.runner import Context

from connect.client import ConnectClient
from connect.devops_testing.fixtures import make_request_builder, make_request_dispatcher

Expand Down
6 changes: 2 additions & 4 deletions connect/devops_testing/request.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
from __future__ import annotations

import json
import time
from abc import abstractmethod
from copy import deepcopy
from typing import List, Optional, Union

from connect.client import ConnectClient
from connect.devops_testing.utils import find_by_id, merge, request_model, request_parameters

from faker import Faker

import json
import time

_asset_template = {
"type": "purchase",
"status": "pending",
Expand Down
45 changes: 35 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,41 @@ keywords = [
'framework'
]
classifiers = [
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development :: Build Tools",
"Topic :: Software Development :: Libraries :: Python Modules"
]

[tool.poetry.dependencies]
python = "^3.8"
python = ">=3.7,<4"
behave = "^1.2"
connect-openapi-client = "*"
connect-openapi-client = "^25.0"
Faker = "^9.8.2"
Pygments = "^2.13.0"

[tool.poetry.dev-dependencies]
pytest = "^6.1.2"
pytest-cov = "^2.10.1"
pytest-mock = "^3.3.1"
pytest-asyncio = "^0.15.1"
pytest-httpx = "^0.12.0"
python-dotenv = "^0.19.2"
coverage = { extras = ["toml"], version = "^5.3" }
responses = "^0.12.0"
flake8 = "~3.8"
flake8-bugbear = "~20"
flake8 = "^5.0"
flake8-bugbear = "^22"
flake8-cognitive-complexity = "^0.1"
flake8-commas = "~2.0"
flake8-commas = "^2.1"
flake8-future-import = "~0.4"
flake8-import-order = "~0.18"
flake8-broken-line = "~0.3"
flake8-comprehensions = "^3.3.1"
flake8-broken-line = "~0.5"
flake8-comprehensions = "^3.10"
flake8-debugger = "^4.0.0"
flake8-eradicate = "^1.0.0"
flake8-eradicate = "^1.3.0"
flake8-string-format = "^0.3.0"
flake8-pyproject = "^1.2.2"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand All @@ -75,3 +79,24 @@ exclude_lines = [

[tool.coverage.html]
skip_covered = true

[tool.flake8]
exclude = [
'.idea',
'.vscode',
'.git',
'*/migrations/*.py',
'*.eggs',
'*.egg',
'tests/',
'setup.py',
'connect/.data',
'samples'
]

show_source = true
max_line_length = 120
import-order-style = 'smarkets'
max_cognitive_complexity = 15
ignore = ['FI1', 'I100', 'W503', 'FI58']

11 changes: 0 additions & 11 deletions tox.ini

This file was deleted.