-
-
Notifications
You must be signed in to change notification settings - Fork 120
Closed
Description
The Python bindings, merged in #184, are non-functional. Some immediate issues:
get_energy_consumption_measures()does not actually return any consumption measures; it returns an empty list. This is because it just callsgenerate_topology()and iterates over the generated Topology'srecord_buffer, which is empty as the topology was just generated (Topology::new()doesrecord_buffer =vec![]).- The PR claimed to add Python documentation, but it merely added an empty Sphinx harness.
- The supplied Makefile does not work as intended:
make installfails due to$(eval TARGET_WHEEL := $(shell ls ../target/wheels/scaphandre-${PACKAGE_VERSION}-*.whl))looking for the wheel in the parent directory'starget/instead of its owntarget/, wherematurin buildwas just run. - Even the string representation of the class is broken:
from scaphandre import Scaphandre; s = Scaphandre(); print(s);results inAttributeError, because the dataclass (which includes all fields in the generated__repr__()unless one specifiesrepr=False) is defined withsensor_name: strwhilst the__init__()setsself.name. - Furthermore, the bindings deviate from Scaphandre itself: why is the sensor called
_scaphandreinstead ofsensor, for instance? Given that these are "official" bindings, I think they should have a structure similar to the Rust implementation, or at least be more clearly defined and documented.
I guess all of this ties in with #50; since it's not clear how to use Scaphandre as a Rust crate, making bindings to another language is potentially even less clear. Most of these issues are easily fixable, though, but I do question why these bindings were merged in the first place.
Anyway, I hope this is of help. :-)
TheElectronWill
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Previous releases