Skip to content

Python-Wrapper Documentation #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 4, 2025

Conversation

KeVteL
Copy link

@KeVteL KeVteL commented Mar 13, 2025

Documentation is now user centric.

Changes that could and may should be made:

More detailed installation documentation.

Maybe provide Distro specific instructions (including package/dependency names) or installation scripts,
such as a PKGBUILD file for Arch Linux (as an example).

Signed-off-by: Kevin Vu te Laar <[email protected]>
@KeVteL KeVteL requested a review from stv0g as a code owner March 13, 2025 12:37
Copy link
Contributor

@stv0g stv0g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some initial comments, but overall I think the quality of the page is not yet up to par to be included in the VILLASnode documentation.

This needs to be improved. It also focuses far to much on development internals and should be written with users in mind.

@@ -0,0 +1,931 @@
# Python-Wrapper Documentation:

>Important Preface:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use a Docusaurus Admonitions.

6. [Installation](#6.-installation)

## 1. VILLASnode functions exposed by the C-API
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please at the proper language to all code-blocks:

Suggested change
```
```c

# Python-Wrapper Documentation:

>Important Preface:
All of the documentation and testing done regarding the VILLASnode Python-Wrapper
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
All of the documentation and testing done regarding the VILLASnode Python-Wrapper
All of the documentation and testing done regarding the VILLASnode Python-wrapper


>Important Preface:
All of the documentation and testing done regarding the VILLASnode Python-Wrapper
is based upon the signal_v2 node provided by VILLASnode.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
is based upon the signal_v2 node provided by VILLASnode.
is based upon the `signal_v2` node-type provided by VILLASnode.

const char *node_to_json_str(vnode *n);
unsigned sample_length(vsample *smp);

#Functions related to data transfer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#Functions related to data transfer
# Functions related to data transfer


## 1. VILLASnode functions exposed by the C-API
```
#Functions to set up up a node or modify its state
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#Functions to set up up a node or modify its state
# Functions to set up up a node or modify its state

5. [Contributing to the Python-Wrapper](#5.-contributing-to-the-python-wrapper)
6. [Installation](#6.-installation)

## 1. VILLASnode functions exposed by the C-API
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we link to the actual header from the VILLASnode repo here?

E.g: https://github.com/VILLASframework/node/blob/master/include/villas/node.h

2. Build VILLASnode from source [as is described here](../installation.md) and make sure to have all of the necessary
dependencies installed.

**The requirements for the Python-Wrapper differ from the Versions listed in 2.**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**The requirements for the Python-Wrapper differ from the Versions listed in 2.**
**The requirements for the Python-Wrapper differ from the versions listed in 2.**

This is where Pybind11 has the advantage of being a header only library, essentially being Macros that directly use the Python C API. This gives you more direct control as for how your code works and interacts with C/C++/Python.
Especially Pybind11 being the more lightweight solution, considering dependencies, installation and integration, makes it more favorable to use.

---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the horizontal lines necessary? Its breaking consistency with other pages.

...
}

#C-API of VILLASnode called by the node_start() binding
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#C-API of VILLASnode called by the node_start() binding
# C-API of VILLASnode called by the node_start() binding

@KeVteL KeVteL marked this pull request as draft March 24, 2025 10:09
Implemented suggested changes.
Removed dev related documentation/information.
Changed the documentation to be user centric.

Signed-off-by: Kevin Vu te Laar <[email protected]>
@KeVteL KeVteL changed the title First Python-Wrapper Documentation Python-Wrapper Documentation Mar 31, 2025
@KeVteL KeVteL marked this pull request as ready for review March 31, 2025 06:37
@al3xa23 al3xa23 merged commit 7d12934 into VILLASframework:python-wrapper Apr 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants