update examples to work with modified req client

examples now expect env variables
This commit is contained in:
2026-03-27 16:29:16 +00:00
parent 7126a2efe0
commit fe9f305afe
7 changed files with 62 additions and 33 deletions

View File

@@ -24,25 +24,30 @@ include = ["/obsws_python"]
[tool.hatch.env]
requires = ["hatch-dotenv"]
[tool.hatch.env.collectors.dotenv.e]
env-files = [".env"]
fail-on-missing = true
[tool.hatch.env.collectors.dotenv.hatch-test]
env-files = [".env"]
fail-on-missing = true
[tool.hatch.envs.default]
dependencies = ["pre-commit"]
[tool.hatch.envs.e]
dependencies = ["keyboard"]
env-include = ["OBSWS_*"]
[tool.hatch.envs.e.scripts]
events = "python {root}\\examples\\events\\."
hotkeys = "python {root}\\examples\\hotkeys\\."
levels = "python {root}\\examples\\levels\\."
scene_rotate = "python {root}\\examples\\scene_rotate\\."
events = "python -m examples.events"
hotkeys = "python -m examples.hotkeys"
levels = "python -m examples.levels"
scene-rotate = "python -m examples.scene_rotate"
[tool.hatch.envs.hatch-test]
randomize = true
env-include = ["OBSWS_TEST_*"]
[tool.hatch.env.collectors.dotenv.hatch-test]
env-files = [".env"]
fail-on-missing = true
env-include = ["OBSWS_*"]
[tool.hatch.envs.hatch-test.scripts]
run = "pytest{env:HATCH_TEST_ARGS:} {args}"