Skip to content

Commit 00f5916

Browse files
Merge pull request brainelectronics#39 from brainelectronics/feature/add-all-missing-docstrings-and-typing-hints
Add all missing docstrings and typing hints, improve docs, fix some but not all bugs
2 parents eee18c2 + b177204 commit 00f5916

File tree

13 files changed

+1306
-125
lines changed

13 files changed

+1306
-125
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ described in the [installation section](#install-package-on-board-with-pip)
8282
the following commands can be used to request a coil state of a target/client
8383
device. Further usage examples can be found in the
8484
[examples folder][ref-examples-folder] and in the
85-
[Micropython section of USAGE](USAGE.md#micropython)
85+
[Micropython section of USAGE](USAGE.md)
8686

8787
#### TCP
8888

@@ -175,7 +175,7 @@ of this library.
175175

176176
* **sfera-labs** - *Initial work* - [giampiero7][ref-sferalabs-exo-sense]
177177
* **pycom** - *Initial Modbus work* - [pycom-modbus][ref-pycom-modbus]
178-
* **pfalcon** - *Initial MicroPython unittest module* - [micropython-unittest][ref-pfalcon-unittest]:
178+
* **pfalcon** - *Initial MicroPython unittest module* - [micropython-unittest][ref-pfalcon-unittest]
179179

180180
<!-- Links -->
181181
[ref-sferalabs-exo-sense]: https://github.com/sfera-labs/exo-sense-py-modbus

changelog.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,32 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
<!-- ## [Unreleased] -->
1616

1717
## Released
18+
## [2.1.0] - 2022-12-27
19+
### Added
20+
- Typing hints available for all functions of [umodbus](umodbus), see #27
21+
- Docstrings available for all constants, functions and classes of [umodbus](umodbus/), see #27
22+
- Test for reading more than 8 coils in a row to verify fix of #36
23+
- Test for reading single negative holding register value
24+
- Test for writing multiple coils to verify fix of #22
25+
- Test for writing multiple registers to verify fix of #23
26+
- Usage documentation for coil, discrete inputs, holding register and input register usage
27+
- Modbus TCP IP and port binding can be checked with `is_bound` property in [tcp.py](umodbus/tcp.py)
28+
29+
### Changed
30+
- Reordered modules of API documentation
31+
- `data_as_registers` and `data_as_bits` of [common.py](umodbus/common.py) removed
32+
- Send illegal function code `0x01` if a register other than coil or holding register is requested to be set
33+
- Simplified `_process_write_access` logic of [tcp.py](umodbus/tcp.py)
34+
35+
### Fixed
36+
- Typing hints of function input parameters and return values
37+
- Response data of multiple changed registers (`write_multiple_registers`) is validated with respect to the provided `signed` flag in [serial.py](umodbus/serial.py) and [tcp.py](umodbus/tcp.py), see #23
38+
- Enable reading more than 8 coils in a row, see #36
39+
- Writing multiple coils in TCP, see #22
40+
- Writing multiple registers in TCP, see #23
41+
- Unit test `test_bytes_to_bool` uses MSB and LSB data correctly
42+
- Only requested amount of registers are returned by `_process_read_access` logic of [tcp.py](umodbus/tcp.py), see #35
43+
1844
## [2.0.0] - 2022-12-03
1945
### Added
2046
- Perform MicroPython based unittests on every `Test` workflow run
@@ -151,8 +177,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
151177
- PEP8 style issues on all files of [`lib/uModbus`](lib/uModbus)
152178

153179
<!-- Links -->
154-
[Unreleased]: https://github.com/brainelectronics/micropython-modbus/compare/2.0.0...develop
180+
[Unreleased]: https://github.com/brainelectronics/micropython-modbus/compare/2.1.0...develop
155181

182+
[2.1.0]: https://github.com/brainelectronics/micropython-modbus/tree/2.1.0
156183
[2.0.0]: https://github.com/brainelectronics/micropython-modbus/tree/2.0.0
157184
[1.2.0]: https://github.com/brainelectronics/micropython-modbus/tree/1.2.0
158185
[1.1.1]: https://github.com/brainelectronics/micropython-modbus/tree/1.1.1

0 commit comments

Comments
 (0)