ScreenPyHQ / screenpy

Screenplay pattern base for Python automated UI test suites.
MIT License
28 stars 4 forks source link

Switch to using `pydantic` to handle settings? #51

Closed perrygoy closed 1 year ago

perrygoy commented 1 year ago

Currently our settings file is just ... well, it's just a settings file. To change settings, users need to do it directly in their code by importing the file and doing settings.thing_to_change = new_value. That's a little weird.

If we use pydantic's Settings Management, we could at least easily grab things from the environment, which would allow users to set things in a much more typical way. Users could set the variables as part of the call on the commandline, or use tools like python-dotenv to seed their environment with settings.

perrygoy commented 1 year ago

Long story short, #69 shows it's not only possible but also super cool and awesome!

perrygoy commented 1 year ago

Merged, and it's amazing!