Skip to content
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
6 changes: 3 additions & 3 deletions .cruft.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"template": "https://github.com/ScreenPyHQ/cookiecutter_screenpy",
"commit": "76810704d72f5bc55abceb1db8353070cd9ea500",
"commit": "6a7488b4183f615ff319dbfdac38a3a1354953c7",
"checkout": null,
"context": {
"cookiecutter": {
Expand All @@ -10,9 +10,9 @@
"is_sub_package": true,
"author": "Perry Goy",
"author_email": "perry.goy@gmail.com",
"license": "MIT",
"github_username": "ScreenPyHQ",
"_template": "https://github.com/ScreenPyHQ/cookiecutter_screenpy"
"_template": "https://github.com/ScreenPyHQ/cookiecutter_screenpy",
"_commit": "6a7488b4183f615ff319dbfdac38a3a1354953c7"
}
},
"directory": null
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/cruft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Cruft

on:
push:
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
lint:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.13"]
os: [ubuntu-latest]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
shell: bash
run: |
python -m pip install --upgrade pip
pip install -e .[dev]
- name: Run Cruft
run: |
cruft check
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-latest]

steps:
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/poetry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
max-parallel: 9
fail-fast: false
matrix:
python-version: ["3.12"]
python-version: ["3.13"]
os: [ubuntu-latest]
poetry-version: ["1.6.1"]
poetry-version: ["2.1.3"]

steps:
- uses: actions/checkout@v4
Expand All @@ -32,8 +32,5 @@ jobs:
with:
poetry-version: ${{ matrix.poetry-version }}

- name: Check toml structure
run: poetry check

- name: Check lock file
run: poetry lock --check
- name: Check lock file is consistent with pyproject
run: poetry check --lock
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
pip install
poetry
--user
- name: Build ScreenPy Playwright
- name: "Build ScreenPy Playwright"
run: >-
python -m
poetry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
max-parallel: 9
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-latest]

steps:
Expand Down
18 changes: 0 additions & 18 deletions .pre-commit-config.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022-2024 Perry Goy
Copyright (c) 2022-2025 Perry Goy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,23 @@ pre-check-in: black-check ruff-check mypy

pre-check-in-fix: black-fix ruff-fix mypy

.PHONY: pre-check-in pre-check-in-fix
lint: black-check ruff-check

lint-fix: black-fix ruff-fix

.PHONY: pre-check-in pre-check-in-fix lint lint-fix

# requires poetry-plugin-export
requirements:
poetry export --without-hashes --extras dev -f requirements.txt > requirements.txt

.PHONY: requirements

cruft-update:
cruft update --allow-untracked-files

.PHONY: cruft-update

################################################################################
# sub-package specific

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ You want to contribute? Great! Here are the things you should do before submitti
1. `pip install -e .[dev]`
1. Optional (poetry users):
1. `poetry install --extras dev`
1. Run `pre-commit install` once.
1. Run `tox` to perform tests frequently.
1. Create pull-request from your branch.

Expand Down
1,886 changes: 1,094 additions & 792 deletions poetry.lock

Large diffs are not rendered by default.

84 changes: 31 additions & 53 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ build-backend = "poetry.core.masonry.api"


[tool.black]
target-version = ['py312']
target-version = ['py313']
extend-exclude = '''
# A regex preceded with ^/ will apply only to files and directories
# in the root of the project.
Expand All @@ -36,68 +36,36 @@ extend-exclude = '''


[tool.ruff]
target-version = "py38" # minimum supported version
target-version = "py39" # minimum supported version
line-length = 88 # same as Black.
output-format = "concise"
extend-exclude = [
"docs",
]

[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ANN", # flake8-annotations
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle error
"EM", # flake8-errmsg
"ERA", # eradicate
"F", # Pyflakes
"FA", # flake8-future-annotations
"FBT", # flake8-boolean-trap
"FIX", # flake8-fixme
"FLY", # flynt
"I", # isort
"ICN", # flake8-import-conventions
"ISC", # flake8-implicit-str-concat
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # pylint
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RET", # flake8-return
"RSE", # flake8-raise
"RUF", # ruff specific
"SIM", # flake8-simplify
"T10", # flake8-debugger
"T20", # flake8-print
"TCH", # flake8-type-checking
"TRY", # tryceratops
"UP", # python upgrade
"W", # pycodestyle warning
"YTT", # flake8-2020

# we would like these someday, but not yet
# "FURB", # refurb
"ALL", # let's get all the new hotness and ignore as we need!
]
ignore = [
"D107", # missing __init__ docstring, we do that in the class docstring.
"D203", # one blank line before class docstring, no thanks!
"D212", # multi line summary first line, we want a one line summary.
"ANN101", # missing self annotation, we only annotate self when we return it.
"ANN102", # missing cls annotation, we only annotate cls when we return it.
"COM812", # we prefer black's logic for trailing commas
"D107", # missing __init__ docstring, we do that in the class docstring.
"D203", # one blank line before class docstring, no thanks!
"D212", # multi line summary first line, we want a one line summary.
"E501", # black handles our line limits.
"N818", # we like our conventions with readable error classes.
"S608", # we will not have SQL injection concerns. :P
]

extend-safe-fixes = [
"EM101", "EM102",
"TCH001", "TCH002", "TCH003", "TCH004",
"C419",
"D200", "D205", "D415",
"EM101", "EM102",
"PT003", "PT006", "PT018",
"RET504",
"TCH001", "TCH002", "TCH003", "TCH004",
"UP006", "UP007",
"W291",
]

[tool.ruff.lint.flake8-pytest-style]
Expand All @@ -118,11 +86,20 @@ split-on-trailing-comma = false

[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"D", # we don't need public-API-polished docstrings in tests.
"FBT", # using a boolean as a test object is useful!
"PLR", # likewise using specific numbers and strings in tests.
"A", # import __doc__ is shadowing python builtin
"D", # we don't need public-API-polished docstrings in tests.
"FBT", # using a boolean as a test object is useful!
"N802", # we are intentional about our capitalization!
"N803", # we like our standards for variable names in tests.
"N806", # we are intentional about our capitalization!
"PLR", # using specific numbers and strings in tests is useful!
"PYI034", # our Fake-ables need to be... weird.
"S101", # we want to assert in tests!
"SLF001", # we need to access private methods in tests.
]
"__version__.py" = ["D"]
"__version__.py" = [
"D", # we don't need public-API-polished docstrings in version.
]
"*.pyi" = [
"PLR0913", # it's not our fault they have too many parameters!
]
Expand All @@ -132,6 +109,7 @@ split-on-trailing-comma = false
# END OF BOILERPLATE ScreenPyHQ CONFIGURATIONS #
################################################################################


[tool.poetry]
name = "screenpy_playwright"
version = "0.0.6"
Expand All @@ -145,11 +123,11 @@ readme = "README.md"
classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Quality Assurance",
Expand All @@ -168,11 +146,11 @@ classifiers = [
# so we dont have two different sets of package versions to update.

[tool.poetry.dependencies]
python = "^3.8"
python = "^3.9"

screenpy = ">=4.0.2"
playwright = ">=1.39.0"
importlib_metadata = {version = "*", python = "3.8.*"}
importlib_metadata = {version = "*", python = "3.9.*"}

# convenience packages for development
black = {version = "*", optional = true}
Expand Down
2 changes: 1 addition & 1 deletion screenpy_playwright/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
ScreenPy Playwright is an extension for ScreenPy which enables Actors to use
the Playwright browser automation tool.

:copyright: (c) 2019-2024 by Perry Goy.
:copyright: (c) 2019-2025 by Perry Goy.
:license: MIT, see LICENSE for more details.
"""

Expand Down
20 changes: 10 additions & 10 deletions screenpy_playwright/__version__.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
r"""
,-. ,-. ,-. ,--. ,--. . . ;-. . ,
( ` / | ) | | |\ | | ) \ /
`-. | |-< |- |- | \| |-' Y
. ) \ | \ | | | | | |
`-' `;-.' ,' `--,.`-.' ', , ' . ,-.' , ,-. . . ,---.
| ) | / \ \ / | . | | ) | / | | |
|-' | |--| Y | ) ) |-< | | -. |--| |
| | | | | |/|/ | \ | \ | | | |
' `--' ' ' ' ' ' ' ' ' `-' ' ' '
,-. ,-. ,-. ,--. ,--. . . ;-. . ,
( ` / | ) | | |\ | | ) \ /
`-. | |-< |- |- | \| |-' Y
. ) \ | \ | | | | | |
`-' `;-.' ,' `--,.`-.' ', , ' . ,-.' , ,-. . . ,---.
| ) | / \ \ / | . | | ) | / | | |
|-' | |--| Y | ) ) |-< | | -. |--| |
| | | | | |/|/ | \ | \ | | | |
' `--' ' ' ' ' ' ' ' ' `-' ' ' '
"""

import importlib.metadata
Expand All @@ -21,4 +21,4 @@
__author__ = metadata["Author"]
__author_email__ = metadata["Author-email"]
__license__ = metadata["License"]
__copyright__ = f"2019-2024 {__author__}"
__copyright__ = f"2019-2025 {__author__}"
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from playwright.sync_api import sync_playwright

from ..exceptions import NoPageError
from screenpy_playwright.exceptions import NoPageError

if TYPE_CHECKING:
from playwright.sync_api import (
Expand Down
6 changes: 3 additions & 3 deletions screenpy_playwright/actions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
"Clicks",
"Enter",
"Enters",
"GoesTo",
"GoTo",
"GoesTo",
"Open",
"Opens",
"RefreshesThePage",
"RefreshThePage",
"RefreshesThePage",
"SaveAScreenshot",
"SaveConsoleLog",
"SaveScreenshot",
"SavesAScreenshot",
"SavesConsoleLog",
"SaveScreenshot",
"SavesScreenshot",
"Scroll",
"Scrolls",
Expand Down
Loading