Skip to content

Commit 3cf94e5

Browse files
authored
V0.3 docs (#108)
* fix auto argument schema pydantic in actions * add pypi downloads once again * bug fix schema generation type_to_dataschema * remove td file as its generated by the protocol binding * bug fix argument schema and return value schema user input validation * add some additional interaction affordance from our known examples * fix return value schema * update README * update action doc * code style object proxy file * redo signature of subscribe_event and implement stop_polling for ZMQ event consumers (which is simpler) * fix ZMQ event tests based on new API * carry over some better interaction affordance examples from existing real scenario implementations * update REAME once again with re-read, client docs link still needs to be updated * add httpx * code style * move HTTP client to httpx * support some arguments for TD generation like using localhost, ignoring errors etc. * complete bug fixes with HTTP SSE with httpx * improve abstraction of client side events and test with HTTP * remove reuse connection feature * refactor ZMQ to be able to spawm multiple event streams for same object * apply the same changes to ZMQ SSE * fix test 11 & 12 with newer ZMQ events * reactivate run method on Thing * fix URL path for client factory * fix basic event broker tests * ruff baseline * add testing scripts in its own folder * add changelog * remove handler map file * change name from design scripts to helper scripts * tests folder ruff baseline * checkpoint for event based async iterator for HTTP SSE * param ruff * code style MD files * fix HTTP SSE client side stream to the extent possible * update doc to latest commit
1 parent 386d025 commit 3cf94e5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+11080
-7114
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ doc/source/generated
1212
extra-packages
1313
tests/test-rpc-results.txt
1414
tests/run-unittest.bat
15-
**/*.ipynb
1615
# comment tests until good organisation comes about
1716

1817
# vs-code

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
"editor.rulers": [
33
],
44
"editor.formatOnSave": true,
5+
"ruff.lineLength": 120
56
}

CHANGELOG.md

Lines changed: 34 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,52 +8,61 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
88

99
✓ means ready to try
1010

11+
## [v0.3.2] - 2025-09-21
12+
13+
- adds TD security definition for BCryptBasicSecurity and ArgsBasicSecurity
14+
- uses httpx for HTTP client instead of tonardo - async support, works better in a jupyter notebook
15+
- bug fixes
16+
1117
## [v0.3.1] - 17.08.2025
1218

19+
Unreleased to pip, only git tag available.
20+
1321
This release contains a lot of new features and improvements so that a version 1.0.0 may be published sooner:
1422

1523
- better conceptual alignment with WoT in code structure
1624
- more tests coverage in both breadth and depth
1725
- schedule async methods & threaded actions more easily
18-
- support pydantic models for action schema validation directly with python typing annotations - no need explicitly specify schema
26+
- support pydantic models for action schema validation directly with python typing annotations - no need explicitly specify schema
1927
- easier to add more protocols (like MQTT, CoAP, etc) - protocol bindings are more systematically supported as far as what goes for an WoT compatible RPC
20-
- scripting API (`ObjectProxy`) also support HTTP - client object abstracts operations irrespective of protocol
28+
- scripting API (`ObjectProxy`) also support HTTP - client object abstracts operations irrespective of protocol
2129
- `observe_property` op on client side (although we always supported on server side)
2230
- descriptors for all of properties, actions, events and state machine. previously only property was a descriptor
2331
- descriptor registries for idiomatic introspection of a Thing's capabilites
24-
- adding custom handlers for each property, action and event to override default behaviour for HTTP protocol
32+
- adding custom handlers for each property, action and event to override default behaviour for HTTP protocol
2533
- HTTP basic auth
2634
- docs recreated in mkdocs-material
2735

2836
## [v0.2.12] - 2025-05-18
37+
2938
- virtual environment with `uv` package manager:
30-
⚡ Faster onboarding: New contributors can setup environments in seconds
31-
📦 Consistent installations: Precise dependency resolution avoids "works on my machine" issues
32-
🧪 Efficient testing: uv run executes tests with minimal overhead
33-
please report bugs if any as this is the first iteration of this feature.
39+
⚡ Faster onboarding: New contributors can setup environments in seconds
40+
📦 Consistent installations: Precise dependency resolution avoids "works on my machine" issues
41+
🧪 Efficient testing: uv run executes tests with minimal overhead
42+
please report bugs if any as this is the first iteration of this feature.
3443

3544
## [v0.2.11] - 2025-04-25
3645

37-
- new feature - support for JSON files as backup for property values (use with `db_commit`, `db_persist` and `db_init`). Compatible only with JSON serializable properties.
46+
- new feature - support for JSON files as backup for property values (use with `db_commit`, `db_persist` and `db_init`). Compatible only with JSON serializable properties.
3847

3948
## [v0.2.10] - 2025-04-05
4049

4150
- bug fixes to support `class_member` properties to work with `fget`, `fset` and `fdel` methods. While using custom `fget`, `fset` and `fdel` methods for `class_member`s,
42-
the class will be passed as the first argument.
51+
the class will be passed as the first argument.
4352

4453
## [v0.2.9] - 2025-03-25
4554

46-
- bug fix to execute action when payload is explicitly null in a HTTP request. Whether action takes a payload or not, there was an error which caused the execution to be rejected.
55+
- bug fix to execute action when payload is explicitly null in a HTTP request. Whether action takes a payload or not, there was an error which caused the execution to be rejected.
4756

4857
## [v0.2.8] - 2024-12-07
4958

50-
- pydantic & JSON schema support for property models
51-
- composed sub`Thing`s exposed with correct URL path
59+
- pydantic & JSON schema support for property models
60+
- composed sub`Thing`s exposed with correct URL path
5261

5362
## [v0.2.7] - 2024-10-22
5463

5564
- HTTP SSE would previously remain unclosed when client abruptly disconnected (like closing a browser tab), but now it would close correctly
56-
- retrieve unserialized data from events with `ObjectProxy` (like JPEG images) by setting `deserialize=False` in `subscribe_event()`
65+
- retrieve unserialized data from events with `ObjectProxy` (like JPEG images) by setting `deserialize=False` in `subscribe_event()`
5766

5867
## [v0.2.6] - 2024-09-09
5968

@@ -63,7 +72,7 @@ the class will be passed as the first argument.
6372

6473
## [v0.2.5] - 2024-09-09
6574

66-
- released to anaconda, it can take a while to turn up. A badge will be added in README when successful.
75+
- released to anaconda, it can take a while to turn up. A badge will be added in README when successful.
6776

6877
## [v0.2.4] - 2024-09-09
6978

@@ -72,36 +81,37 @@ the class will be passed as the first argument.
7281

7382
## [v0.2.3] - 2024-08-11
7483

75-
- HTTP SSE minor bug-fix/optimization - no difference to the user
84+
- HTTP SSE minor bug-fix/optimization - no difference to the user
7685

7786
## [v0.2.2] - 2024-08-09
7887

7988
- thing control panel works better with the server side and support observable properties
80-
- `ObjectProxy` client API has been improved to resemble WoT operations better, for example `get_property` is now
81-
called `read_property`, `set_properties` is now called `write_multiple_properties`.
89+
- `ObjectProxy` client API has been improved to resemble WoT operations better, for example `get_property` is now
90+
called `read_property`, `set_properties` is now called `write_multiple_properties`.
8291
- `ObjectProxy` client reliability for poorly written server side actions improved
8392

8493
## [v0.2.1] - 2024-07-21
8594

8695
### Added
96+
8797
- properties are now "observable" and push change events when read or written & value has changed
8898
- input & output JSON schema can be specified for actions, where input schema is used for validation of arguments
8999
- TD has read/write properties' forms at thing level, event data schema
90100
- change log
91101
- some unit tests
92102

93103
### Changed
94-
- events are to specified as descriptors and are not allowed as instance attributes. Specify at class level to
95-
automatically obtain a instance specific event.
104+
105+
- events are to specified as descriptors and are not allowed as instance attributes. Specify at class level to
106+
automatically obtain a instance specific event.
96107

97108
### Fixed
98-
- ``class_member`` argument for properties respected more accurately
109+
110+
- `class_member` argument for properties respected more accurately
99111

100112
## [v0.1.2] - 2024-06-06
101113

102114
### Added
103-
- first public release to pip, docs are the best source to document this release. Checkout commit
104-
[04b75a73c28cab298eefa30746bbb0e06221b81c] and build docs if at all necessary.
105-
106-
107115

116+
- first public release to pip, docs are the best source to document this release. Checkout commit
117+
[04b75a73c28cab298eefa30746bbb0e06221b81c] and build docs if at all necessary.

CODE_OF_CONDUCT.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,31 @@ identity and orientation.
1212
We pledge to act and interact in ways that contribute to an open, welcoming,
1313
diverse, inclusive, and healthy community.
1414

15-
The document states the plural pronoun "We" or "Community Leaders" etc.,
16-
however, currently, I, Vignesh Vaidyanathan, enforce the code of conduct
15+
The document states the plural pronoun "We" or "Community Leaders" etc.,
16+
however, currently, I, Vignesh Vaidyanathan, enforce the code of conduct
1717

1818
## Our Standards
1919

2020
Examples of behavior that contributes to a positive environment for our
2121
community include:
2222

23-
* Demonstrating empathy and kindness toward other people
24-
* Being respectful of differing opinions, viewpoints, and experiences
25-
* Giving and gracefully accepting constructive feedback
26-
* Accepting responsibility and apologizing to those affected by our mistakes,
23+
- Demonstrating empathy and kindness toward other people
24+
- Being respectful of differing opinions, viewpoints, and experiences
25+
- Giving and gracefully accepting constructive feedback
26+
- Accepting responsibility and apologizing to those affected by our mistakes,
2727
and learning from the experience
28-
* Focusing on what is best not just for us as individuals, but for the overall
28+
- Focusing on what is best not just for us as individuals, but for the overall
2929
community
3030

3131
Examples of unacceptable behavior include:
3232

33-
* The use of sexualized language or imagery, and sexual attention or advances of
33+
- The use of sexualized language or imagery, and sexual attention or advances of
3434
any kind
35-
* Trolling, insulting or derogatory comments, and personal or political attacks
36-
* Public or private harassment
37-
* Publishing others' private information, such as a physical or email address,
35+
- Trolling, insulting or derogatory comments, and personal or political attacks
36+
- Public or private harassment
37+
- Publishing others' private information, such as a physical or email address,
3838
without their explicit permission
39-
* Other conduct which could reasonably be considered inappropriate in a
39+
- Other conduct which could reasonably be considered inappropriate in a
4040
professional setting
4141

4242
## Enforcement Responsibilities
@@ -47,15 +47,15 @@ response to any behavior that they deem inappropriate, threatening, offensive,
4747
or harmful.
4848

4949
Community leaders have the right and responsibility to remove, edit, or reject
50-
comments, commits, code, wiki edits, issues, discussions and other contributions
50+
comments, commits, code, wiki edits, issues, discussions and other contributions
5151
that are not aligned to this Code of Conduct, and will communicate reasons for moderation
5252
decisions when appropriate.
5353

5454
## Scope
5555

5656
This Code of Conduct currently applies within all contributions made to this repository in all sections
57-
of github (including discussions) & associated repositories like hololinked-examples & those hosted publicly under
58-
the Vignesh Vaidyanathan's space.
57+
of github (including discussions) & associated repositories like hololinked-examples & those hosted publicly under
58+
the Vignesh Vaidyanathan's space.
5959

6060
## Enforcement
6161

CONTRIBUTING.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
First off, thanks for taking the time to contribute!
44

5-
All types of contributions are encouraged and valued.
5+
All types of contributions are encouraged and valued.
66

77
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
8+
>
89
> - Star the project
910
> - Tweet about it or share in social media
1011
> - Create examples & refer this project in your project's readme. I can add your example in my [example repository](https://github.com/VigneshVSV/hololinked-examples) if its really helpful, including use cases in more sophisticated integrations
@@ -13,51 +14,55 @@ All types of contributions are encouraged and valued.
1314
1415
## I Have a Question
1516

16-
Do feel free to reach out to me at [email protected] or in discord. I will try my very best to respond.
17+
Do feel free to reach out to me at [email protected] or in discord. I will try my very best to respond.
1718

1819
Nevertheless, one may also refer the available how-to section of the [Documentation](https://hololinked.readthedocs.io/en/latest/index.html).
19-
If the documentation is insufficient for any reason including being poorly documented, one may open a new discussion in the [Q&A](https://github.com/VigneshVSV/hololinked/discussions/categories/q-a) section of GitHub discussions.
20+
If the documentation is insufficient for any reason including being poorly documented, one may open a new discussion in the [Q&A](https://github.com/VigneshVSV/hololinked/discussions/categories/q-a) section of GitHub discussions.
2021

2122
For questions related to workings of HTTP, JSON schema, basic concepts of python like descriptors, decorators etc., it is also advisable to search the internet for answers first.
2223
For generic questions related to web of things standards or its ideas, it is recommended to join web of things [discord](https://discord.com/invite/RJNYJsEgnb) group and [community](https://www.w3.org/community/wot/) group.
2324

24-
If you believe your question might also be a bug, you might want to search for existing [Issues](https://github.com/VigneshVSV/hololinked/issues) that might help you.
25+
If you believe your question might also be a bug, you might want to search for existing [Issues](https://github.com/VigneshVSV/hololinked/issues) that might help you.
2526
In case you have found a suitable issue and still need clarification, you can write your question in this issue. If an issue is not found:
27+
2628
- Open an [Issue](https://github.com/VigneshVSV/hololinked/issues/new).
2729
- Provide as much context as you can about what you're running into.
2830
- Stack trace (Traceback)
2931
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
3032
- Version of python
3133
- Possibly your input and the output
32-
- Can you reliably reproduce the issue?
33-
34-
One may submit a bug report at any level of information, especially if you reached out to me at my email upfront. If you also know how to fix it, lets discuss, once the idea is clear, you can fork and make a pull request.
34+
- Can you reliably reproduce the issue?
35+
36+
One may submit a bug report at any level of information, especially if you reached out to me at my email upfront. If you also know how to fix it, lets discuss, once the idea is clear, you can fork and make a pull request.
3537

3638
Otherwise, I will then take care of the issue as soon as possible.
3739

3840
> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to [email protected].
3941
40-
4142
## I Want To Contribute
4243

4344
> ### Legal Notice <!-- omit in toc -->
44-
> When contributing to this project, you must agree that you have authored 100% of the content or that you have the necessary rights to the content. For example, you copied code from projects with MIT/BSD License. Content from GPL-related licenses may be maintained in a separate repository as an add-on.
45+
>
46+
> When contributing to this project, you must agree that you have authored 100% of the content or that you have the necessary rights to the content. For example, you copied code from projects with MIT/BSD License. Content from GPL-related licenses may be maintained in a separate repository as an add-on.
4547
4648
Developers are always welcome to contribute to the code base. If you want to tackle any issues, un-existing features, let me know (at my email), I can create some open issues and features which I was never able to solve or did not have the time. You can also suggest what else can be contributed functionally, conceptually or also simply code-refactoring.
4749

4850
There are also other repositories which can use your skills:
51+
4952
- An [admin client](https://github.com/VigneshVSV/thing-control-panel) in react
50-
- [Documentation](https://github.com/VigneshVSV/hololinked-docs) in sphinx which needs significant improvement in How-To's, beginner level docs which may teach people concepts of data acquisition or IoT, Docstring or API documentation of this repository itself
51-
- [Examples](https://github.com/VigneshVSV/hololinked-examples) in nodeJS, Dashboard/PyQt GUIs or server implementations using this package. Hardware implementations of unexisting examples are also welcome, I can open a directory where people can search for code based on hardware and just download your code.
53+
- [Documentation](https://github.com/VigneshVSV/hololinked-docs) in sphinx which needs significant improvement in How-To's, beginner level docs which may teach people concepts of data acquisition or IoT, Docstring or API documentation of this repository itself
54+
- [Examples](https://github.com/VigneshVSV/hololinked-examples) in nodeJS, Dashboard/PyQt GUIs or server implementations using this package. Hardware implementations of unexisting examples are also welcome, I can open a directory where people can search for code based on hardware and just download your code.
5255

5356
## Git Branching
5457

55-
A simpler model is used roughly based on [this article](https://www.bitsnbites.eu/a-stable-mainline-branching-model-for-git/) -
56-
- main branch is where all stable developments are merged, all your branches must merge here
57-
- main branch is merged to release branch when it is decided to created a release.
58-
- A specific release is tagged and not created as its own branch. Instead release branch simply follows the main branch at the release time. People should clone the main branch for latest (mostly-) stable code base and release branch for released code base.
59-
- other branches are feature or bug fix branches. A develop branch may be used to make general improvements as the package is constantly evolving, but its not a specific philosophy to use a develop branch.
60-
- Bug fixes on releases must proceed from the tag of that release. Perhaps, even a new release can be made after fixing the bug by merging a bug fix branch to main branch.
58+
A simpler model is used roughly based on [this article](https://www.bitsnbites.eu/a-stable-mainline-branching-model-for-git/) -
59+
60+
- main branch is where all stable developments are merged, all your branches must merge here
61+
- main branch is merged to release branch when it is decided to created a release.
62+
- A specific release is tagged and not created as its own branch. Instead release branch simply follows the main branch at the release time. People should clone the main branch for latest (mostly-) stable code base and release branch for released code base.
63+
- other branches are feature or bug fix branches. A develop branch may be used to make general improvements as the package is constantly evolving, but its not a specific philosophy to use a develop branch.
64+
- Bug fixes on releases must proceed from the tag of that release. Perhaps, even a new release can be made after fixing the bug by merging a bug fix branch to main branch.
6165

6266
## Attribution
67+
6368
This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!

0 commit comments

Comments
 (0)