1# Contributing
2
3Thank you for taking your time to contribute to this project.
4The project is not large enough to need a lot of rules, but here are some guidelines:
5
6
7## Pull requests
8
9In general pull requests are welcome. The smaller the better. Smaller pull requests are easier to review and easier to merge – especially in cases when not every part of a larger changeset should get merged.
10
11In case of doubt please start a discussion first about the idea – before putting too much work into a pull request that may not get merged at the end, for whatever reason. A discussion can help to clarify points of view and motivation, not obvious at first by just providing a pull request.
12
13
14## Status of core and lib
15
16fritzconnection is mainly the code in the core-directory. This code is pretty stable so far.
17
18Most changes are in the library (the lib-directory). The library started mainly as a collection of examples how to use the core. Because it's easier to use an existing function instead of reading the AVM TR-064 documentation, the library modules have grown over time.
19
20But every action supported by AVM can get executed without the library. So best enhancements are not too trivial tasks.
21
22
23## Style guide
24
25- In general the style guide is PEP 8.
26- Recommended maximum line length is 80 something.
27
28
29## Comments
30
31No new function, method or class should get undocumented. Write meaningful comments: what the code does, about the arguments and return values, and -important- the corresponding types.
32
33
34## Type hints
35
36This project started long ago without type hints. Keep it this way. The project is small enough, so there is no real benefit. The place for types are in the comments. Readability counts!
37
38
39## Tests
40
41This project comes with tests. The test framework is tox/pytest. For development run `pip install -r requirements_test.txt` to install both libraries. As far as possible, the code should get tests. Before committing run the tests with tox.
42
43