Commit ded63b0
authored
✨ feat(cli): add --envfile option for runtime environment switching (#197)
Users needed a way to switch between different environment configurations
without modifying config files. This is particularly useful when testing
against different environments (dev, staging, prod) or when developers
need local overrides without changing version-controlled configuration.
Implemented a --envfile CLI argument with two modes. Override mode
(--envfile PATH) replaces all configured env_files, while extend mode
(--envfile +PATH) adds to them. The CLI file always loads last in extend
mode, ensuring its variables take precedence. Unlike config-based env_files
which silently skip missing files, CLI files must exist to fail fast on
typos or incorrect paths.
Restructured README following Diátaxis framework to separate tutorial
content (quick start), how-to guides (task-focused), reference (complete
API), and explanation (conceptual understanding). This makes the
documentation more navigable and helps users find what they need based
on their goal.
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>1 parent 973033e commit ded63b0
File tree
7 files changed
+406
-198
lines changed- src/pytest_env
- tests
7 files changed
+406
-198
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
0 commit comments