Skip to content
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

Update Qase SDK version and dependencies #56

Merged
merged 6 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
3 changes: 2 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.11", "3.12"]
fail-fast: false

steps:
- uses: actions/checkout@v4
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,8 @@ fabric.properties

# pyenv
.python-version

# VS Code settings
.vscode/*
!.vscode/project-related-words.txt
!.vscode/cspell.json
37 changes: 8 additions & 29 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,17 @@ repos:
- id: check-merge-conflict
- id: detect-private-key

- repo: https://github.com/pycqa/isort
rev: 5.12.0
# Typo search tool
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.3.0
hooks:
- id: isort
name: isort (python)
- id: cspell

- repo: https://github.com/pycqa/flake8
rev: 6.0.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
hooks:
- id: flake8
exclude: .venv|__init__.py
additional_dependencies: [
# A plugin for Flake8 finding likely bugs and design problems in your program.
# https://github.com/PyCQA/flake8-bugbear
flake8-bugbear,
# Extension to enforce better comma placement.
# https://github.com/PyCQA/flake8-commas
flake8-commas,
# A flake8 plugin that warn about backslashes usage.
# https://github.com/wemake-services/flake8-broken-line
# Disabled until support of flake8>=6.0.0, see
# https://github.com/wemake-services/flake8-broken-line/pull/280
# flake8-broken-line,
# A simple module that adds an extension for the fantastic pydocstyle tool to flake8.
# https://github.com/PyCQA/flake8-docstrings
flake8-docstrings,
# McCabe complexity checker.
# https://github.com/PyCQA/mccabe
mccabe,
# Configuring flake8 using pyproject.toml
Flake8-pyproject,
]
- id: ruff
- id: ruff-format

- repo: https://github.com/asottile/add-trailing-comma
rev: v2.4.0
Expand Down
20 changes: 20 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"ignorePaths": [
".git/",
".gitignore",
".venv"
],
"dictionaryDefinitions": [
{
"name": "project-related-words",
"path": "./project-related-words.txt",
"addWords": true
}
],
"dictionaries": [
"python",
"python-common",
"docker",
"project-related-words"
]
}
29 changes: 29 additions & 0 deletions .vscode/project-related-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
addhooks
addinivalue
addoption
filelock
hookspecs
hookwrapper
modifyitems
nodeid
pluginmanager
Qase
qaseio
sessionstart
terminalreporter
tryfirst
trylast
workerinput
TASKNUMBER
Saritasa
wasxfail
longrepr
longreprtext
snok
autotests
autouse
fixturenames
getfixturevalue
conftests
makereport
firstresult
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

We follow [Semantic Versions](https://semver.org/).

# Version 2.0.0

- Use updated `qaseio` sdk (^4.0.0)
- Drop `Python 3.10` support
- Drop `pytest-variables` support (now use pytest options to provide browser name)
- Small code and structure improvements
NikAzanov marked this conversation as resolved.
Show resolved Hide resolved

# Version 1.2.0

- Fix `filelock` blocking for parallel tests run
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ def test_demo():
Since this package is mostly used for selenium tests, you need to provide a
value for `--webdriver` flag. If you set `--webdriver=remote` and want to specify
name of remote browser (not just Remote), use `--remote-browser`
flag or set capabilities via `variables`. This will be used in test run name and
in attachments path.
flag. This will be used in test run name and in attachments path.

To enable plugin use flag `--qase-enabled`.

Expand Down
180 changes: 136 additions & 44 deletions poetry.lock

Large diffs are not rendered by default.

207 changes: 164 additions & 43 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "pytest-qaseio"
description = "Pytest plugin for Qase.io integration"
version = "1.2.0"
version = "2.0.0"
license = "MIT"

authors = [
Expand Down Expand Up @@ -35,8 +35,8 @@ classifiers = [
pytest_qaseio = "pytest_qaseio.plugin"

[tool.poetry.dependencies]
python = "^3.10"
qaseio = "^3.4.1"
python = "^3.11"
qaseio = "^4.0.0"
selenium = "^4.21.0"
arrow = "^1.3.0"
filelock = "^3.14.0"
Expand All @@ -60,7 +60,7 @@ enable_error_code = [

allow_redefinition = false
check_untyped_defs = true
disallow_any_explicit = true
disallow_any_explicit = false
disallow_any_generics = true
disallow_untyped_calls = true
ignore_errors = false
Expand All @@ -76,45 +76,166 @@ warn_redundant_casts = true
warn_unused_configs = true
warn_unreachable = true

[tool.isort]
# isort configuration:
# https://pycqa.github.io/isort/docs/configuration/options.html
line_length = 79
multi_line_output = 3
include_trailing_comma = true
[[tool.mypy.overrides]]
module = "qaseio.*"
implicit_reexport = true


[tool.ruff]
line-length = 100
indent-width = 4
target-version = "py310"
NikAzanov marked this conversation as resolved.
Show resolved Hide resolved
exclude = [
"config",
".venv",
"venv",
"__init__.py",
"plugins/selenium_plugin",
NikAzanov marked this conversation as resolved.
Show resolved Hide resolved
]

[tool.ruff.lint]
extend-select = [
# https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
"W",
"E",
# https://docs.astral.sh/ruff/rules/#mccabe-c90
"C90",
# https://docs.astral.sh/ruff/rules/#isort-i
"I",
# https://docs.astral.sh/ruff/rules/#pep8-naming-n
"N",
# https://docs.astral.sh/ruff/rules/#pydocstyle-d
"D",
# https://docs.astral.sh/ruff/rules/#pyupgrade-up
"UP",
# https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
"ANN",
# https://docs.astral.sh/ruff/rules/#flake8-bandit-s
"S",
# https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
"B",
# https://docs.astral.sh/ruff/rules/#flake8-builtins-a
"A",
# https://docs.astral.sh/ruff/rules/#flake8-commas-com
"COM",
# https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
"C4",
# https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz
"DTZ",
# https://docs.astral.sh/ruff/rules/#flake8-debugger-t10
"T10",
# https://docs.astral.sh/ruff/rules/#flake8-django-dj
"DJ",
# https://docs.astral.sh/ruff/rules/#flake8-print-t20
"T20",
# https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
"PT",
# https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
"SIM",
# https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
"PTH",
# https://docs.astral.sh/ruff/rules/#flake8-todos-td
"TD",
# https://docs.astral.sh/ruff/rules/#eradicate-era
"ERA",
# https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
"RUF"
]

[tool.flake8]
# https://www.flake8rules.com/
ignore = [
# https://www.flake8rules.com/rules/E126.html
"E12",
# https://www.flake8rules.com/rules/W503.html
"W503",
# https://www.flake8rules.com/rules/W504.html
"W504",
# https://github.com/m-burst/flake8-pytest-style/blob/master/docs/rules/PT004.md
"PT004",
# Missing docstring in public module
"D100",
# Missing docstring in public method
"D102",
# Missing docstring in public function
"D103",
# Missing docstring in magic method
"D105",
# Missing docstring in public nested
"D106",
# Missing docstring in __init__
"D107",
# Manually surrounded by quotes, consider using the `!r` conversion flag
"B028",
# https://docs.astral.sh/ruff/rules/ANN101
"ANN101",
# https://docs.astral.sh/ruff/rules/ANN102
"ANN102",
# https://docs.astral.sh/ruff/rules/ANN002
"ANN002",
# https://docs.astral.sh/ruff/rules/ANN003
"ANN003",
# https://docs.astral.sh/ruff/rules/ANN401
"ANN401",
# https://docs.astral.sh/ruff/rules/ANN204
"ANN204",
# https://docs.astral.sh/ruff/rules/D100
NikAzanov marked this conversation as resolved.
Show resolved Hide resolved
"D100",
# https://docs.astral.sh/ruff/rules/D107
"D107",
# https://docs.astral.sh/ruff/rules/D104
"D104",
# https://docs.astral.sh/ruff/rules/D105
"D105",
# https://docs.astral.sh/ruff/rules/D106
"D106",
# https://docs.astral.sh/ruff/rules/D203
"D203",
# https://docs.astral.sh/ruff/rules/D213
"D213",
# https://docs.astral.sh/ruff/rules/D407
"D407",
# https://docs.astral.sh/ruff/rules/N818
"N818",
# https://docs.astral.sh/ruff/rules/N999
"N999",
# https://docs.astral.sh/ruff/rules/C408
"C408",
# https://docs.astral.sh/ruff/rules/RUF012
"RUF012",
# https://docs.astral.sh/ruff/rules/D100
"D100",
# https://docs.astral.sh/ruff/rules/D102
"D102",
# https://docs.astral.sh/ruff/rules/D103
"D103",
# https://docs.astral.sh/ruff/rules/D105
"D105",
# https://docs.astral.sh/ruff/rules/D106
"D106",
# https://docs.astral.sh/ruff/rules/D107
"D107",
# https://docs.astral.sh/ruff/rules/F403
"F403",
# https://docs.astral.sh/ruff/rules/D405
"F405",
# https://docs.astral.sh/ruff/rules/PT004
"PT004",
# https://docs.astral.sh/ruff/rules/B008
"B008",
# https://docs.astral.sh/ruff/rules/UP040
"UP040",
# https://docs.astral.sh/ruff/rules/assert/
"S101",
# https://docs.astral.sh/ruff/rules/missing-todo-author/
"TD002",
# https://docs.astral.sh/ruff/rules/missing-todo-link/
"TD003",
]


[tool.ruff.lint.isort]
force-wrap-aliases = true
split-on-trailing-comma = true
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"pages",
"local-folder",
]
inline-quotes = "double"
statistics = true
count = true
max-complexity = 10
max-line-length = 100
pytest-fixture-no-parentheses = true
pytest-parametrize-names-type = "list"
pytest-parametrize-values-type = "list"
pytest-parametrize-values-row-type = "list"


[tool.ruff.lint.isort.sections]
pages = ["pages"]


[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
parametrize-names-type = "list"
parametrize-values-type = "list"
parametrize-values-row-type = "list"


[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
Loading
Loading