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

better python integration (pythonnet?) #133

Open
steinelg opened this issue Oct 3, 2024 · 1 comment
Open

better python integration (pythonnet?) #133

steinelg opened this issue Oct 3, 2024 · 1 comment
Assignees

Comments

@steinelg
Copy link
Collaborator

steinelg commented Oct 3, 2024

No description provided.

@sondreew
Copy link

sondreew commented Oct 3, 2024

Overview of current quirks in the python integration:

  • The "Getting started" instructions are slightly outdated and some of the examples do not work on the current TimeSeriesAnalysis release.
  • Importing the assembly as a python module gives a FileNotFoundException, but rerunning the import command then works. Potentially some dependency issue somewhere.
  • Docstrings from the xml before the C# functions are not fetched in pythonnet, so info about input parameters and return types is not currently visible as tooltips. pythonnet issue #374
  • Typing is somewhat non-pythonic. Common python types like generic-type lists do not necessarily work, and most numpy types do not work, requiring using system types as input to the TimeSeriesAnalysis functions, which most python users are likely unfamiliar with. pythonnet discussion #2226, pythonnet issue #2243
  • python-DotnetInteropt could potentially be used to create a python package that fetches the latest nuget and potentially include some auxiliary functionality (find a way to use the XML docstring, cast python and numpy types to system types, etc...)
  • Major issue: For some reason certain functions are not called properly via pythonnet. They are initiated using their parent object, or a generic C# object if there is no parent object explicitly defined. When this happens the constructors and methods do not work, though a parameterless constructor seems to always work for object initialization (even if the parent object is abstract and has no constructor defined). This issue seems to apply to certain TimeSeriesAnalysis functions only, though no clear pattern has been found yet. The issue itself might be related to a bug in pythonnet that is on the roadmap to fix for the next update, though there has been no news or pull requests for this issue. pythonnet issue #2197

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

No branches or pull requests

2 participants