Skip to content

Commit 4738475

Browse files
Merge pull request #2 from dmberezovskyii/PPA-0002
add dynaconf configuration
2 parents beb3d40 + 8fde585 commit 4738475

File tree

9 files changed

+32
-8
lines changed

9 files changed

+32
-8
lines changed

config.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
settings = Dynaconf(
44
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
5+
"config/settings.yaml", # Default settings
6+
"config/.secrets.yaml", # Sensitive data
97
],
108
environments=True,
119
load_dotenv=True,
12-
envvar_prefix="PW",
13-
env_switcher="ENV_FOR_PW",
14-
dotenv_path="configs/.env",
10+
envvar_prefix="APPIUM",
11+
env_switcher="ENV_FOR_APPIUM",
12+
dotenv_path="configs/.env", # Enable env switcher
1513
)
14+
15+
16+
print(settings.APPIUM_SERVER)

config/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ENV_FOR_APPIUM=stage
File renamed without changes.

config/settings.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
default:
2+
APPIUM_SERVER: "http://localhost:4723/wd/hub"
3+
4+
stage:
5+
APPIUM_SERVER: "http://stage:4723/wd/hub"
6+
ANDROID_CAPS:
7+
platformName: "Android"
8+
deviceName: "emulator"
9+
app: "/path/to/app.apk"
10+
11+
prod:
12+
APPIUM_SERVER: "http://prod:4723/wd/hub"
13+
IOS_CAPS:
14+
platformName: "iOS"
15+
deviceName: "iPhone 14"
16+
bundleId: "com.example.app"

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ authors = ["Dmytro Berezovskyi <[email protected]>"]
66

77
packages = [
88
{ include = "src" },
9-
{ include = "settings" },
109
{ include = "drivers", from = "src" },
1110
{ include = "screens", from = "src" },
1211
{ include = "utils", from = "src" }

settings/__init__.py

Whitespace-only changes.

settings/settings.yaml

Whitespace-only changes.

src/drivers/driver_factory.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
class Driver:
2+
3+
@staticmethod
4+
def get_driver(platform: str):
5+
"""Get driver by platform"""

src/screens/base_screen.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
class Screen:
2+
pass

0 commit comments

Comments
 (0)