Skip to content
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

First Python-Wrapper Documentation #103

Open
wants to merge 1 commit into
base: python-wrapper
Choose a base branch
from

Conversation

KeVteL
Copy link

@KeVteL KeVteL commented Mar 13, 2025

Changes that could and may should be made:

Integration of a Lab, if not multiple (one without and one with openDSS once it is ready) as a showcase.
Migrate some of the code examples to a Lab or remove them, if they become necessary due to the Labs.

Expand the collection of improvements/suggestions and bugs, if any more are found.

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

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.

2 participants