Skip to content

Commit beb3d40

Browse files
Merge pull request #1 from dmberezovskyii/PPA-0001
init project structure
2 parents 907d240 + c98b22a commit beb3d40

18 files changed

+139
-0
lines changed

.github/workflows/lint.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Linting
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
lint:
13+
runs-on: macos-latest
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v3
18+
19+
- name: Setup Python
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: "3.10"
23+
24+
- name: Install Poetry
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install poetry
28+
29+
- name: Install dependencies with Poetry
30+
run: |
31+
poetry install
32+
33+
- name: Run Linting
34+
run: |
35+
poetry run ruff check .

.ruff.toml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Ruff Configuration
2+
line-length = 88
3+
indent-width = 4
4+
output-format = "grouped"
5+
respect-gitignore = true
6+
target-version = "py312"
7+
8+
[lint]
9+
select = [
10+
"E", # Error codes
11+
"F", # Pyflakes
12+
"W", # Warnings
13+
"C", # Complexity
14+
"N", # Naming conventions
15+
"I", # Ignored errors
16+
"E501", # Line too long
17+
"N805", # First argument should be 'self'
18+
]
19+
fixable = ["ALL"] # All fixable errors will be automatically corrected
20+
21+
# Ignored Errors
22+
ignore = [
23+
"E731", # Do not assign a lambda expression, use a def instead
24+
"N801", # Function name should be lowercase
25+
"I001", # Import convention violation
26+
"F631", # Assert should not be used with a literal
27+
]
28+
29+
# Regular expression for dummy variables
30+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
31+
32+
# Excluded Directories and Files
33+
exclude = [
34+
".pytest_cache",
35+
"poetry.lock",
36+
"__pypackages__",
37+
".git",
38+
".env",
39+
".ruff_cache"
40+
]
41+
42+
[format]
43+
exclude = ["__init__.py"] # Exclude __init__.py from formatting
44+
skip-magic-trailing-comma = true # Skip the trailing comma for magic trailing commas

config.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from dynaconf import Dynaconf
2+
3+
settings = Dynaconf(
4+
settings_files=[
5+
"settings/settings.yaml", # Default settings
6+
"settings/stage.yaml", # Development-specific settings
7+
"settings/prod.yaml", # Production-specific settings
8+
"settings/.secrets.yaml", # Sensitive data
9+
],
10+
environments=True,
11+
load_dotenv=True,
12+
envvar_prefix="PW",
13+
env_switcher="ENV_FOR_PW",
14+
dotenv_path="configs/.env",
15+
)

conftest.py

Whitespace-only changes.

pyproject.toml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
[tool.poetry]
2+
name = "appium-framework"
3+
version = "0.1.0"
4+
description = "A mobile automation framework using pytest and appium"
5+
authors = ["Dmytro Berezovskyi <[email protected]>"]
6+
7+
packages = [
8+
{ include = "src" },
9+
{ include = "settings" },
10+
{ include = "drivers", from = "src" },
11+
{ include = "screens", from = "src" },
12+
{ include = "utils", from = "src" }
13+
]
14+
15+
[tool.poetry.dependencies]
16+
python = "^3.12"
17+
pytest = "^8.3.4"
18+
dynaconf = "^3.2.10"
19+
requests = "^2.31"
20+
pytest-asyncio = "^0.24.0"
21+
pytest-html = "^4.1.1"
22+
23+
[tool.poetry.dev-dependencies]
24+
ruff = "^0.6.8"
25+
26+
[build-system]
27+
requires = ["poetry-core>=1.0.0"]
28+
build-backend = "poetry.core.masonry.api"
29+
30+
[tool.pytest.ini_options]
31+
addopts = "-rA -v --env=stage --device-type=android --listeners=events --capture=no -p no:cacheprovider --html=../reports/test_report.html --self-contained-html"
32+
#asyncio_mode = "auto"
33+
markers = [
34+
{ name = "smoke", description = "run smoke tests" },
35+
{ name = "regression", description = "run regression tests" }
36+
]
37+
testpaths = ["tests"]
38+
python_files = ["*.py"]
39+
python_classes = [
40+
"Test*",
41+
"*Test*",
42+
"*Test",
43+
"*Tests",
44+
]
45+
python_functions = ["test_*"]

settings/.secrets.yaml

Whitespace-only changes.

settings/__init__.py

Whitespace-only changes.

settings/settings.yaml

Whitespace-only changes.

src/__init__.py

Whitespace-only changes.

src/drivers/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)