blob: 2bfaaa02d08b8867212b9706c238bdd13d2ed2eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
# Contributing to pyvyos
Thanks for considering a contribution. `pyvyos` is a small library with a
narrow scope, which makes review and maintenance easier when contributions
follow a few simple rules.
## Scope
`pyvyos` is a thin Python wrapper around the VyOS HTTPS API. Changes that
fit naturally into this scope are welcome. Anything that adds a new
dependency, introduces a parallel client (SSH, NETCONF, …), or expands
beyond the HTTPS API surface is best discussed in an issue first.
## Before opening a pull request
1. **Open an issue first** for anything beyond a small fix or a typo. It
saves everyone time if the direction is agreed before the patch lands.
2. **Keep the diff focused.** One topic per pull request. Refactors and
bug fixes are easier to review separately.
3. **Do not change HTTP payload generation in passing.** Payload changes
require a deliberate review pass; they should be their own pull
request and include tests.
4. **Run the test suite locally:** `uv run pytest`.
5. **Match the existing style.** No formatter is enforced yet; just keep
diffs minimal and readable.
## Development setup
```bash
git clone https://github.com/vyos-contrib/pyvyos.git
cd pyvyos
uv sync --extra dev
uv run pytest
```
Optional pre-commit hooks (whitespace, EOF, YAML/TOML syntax):
```bash
pip install pre-commit
pre-commit install
```
## Public API stability
The supported public API is:
```python
from pyvyos import VyDevice, ApiResponse
```
Compatibility shims at `pyvyos.device` and `pyvyos.rest` are kept while
the cost is trivial. Anything under `pyvyos.core.*` is internal and may
change between minor releases.
If your change touches the public API surface, please flag it explicitly
in the pull request description.
## Reporting bugs
When reporting a bug, please include:
- The `pyvyos` version (`pip show pyvyos`).
- The Python version.
- The VyOS version of the device.
- A minimal reproducer and the resulting error (or, for behaviour bugs,
the observed vs expected behaviour).
## License
By contributing you agree that your contribution will be licensed under
the [MIT License](LICENSE).
|