Improve the State of octave-pythonic
Abstract
octave-pythonic is an octave package used to incorporate python libraries and features in octave using the cpython interpreter. Currently, octave-pythonic only supports python versions less than 3.10. But the latest python version is 3.11. The package has not been updated for a long time. I propose to improve the state of the package. Making sure that octave-pythonic support the latest versions of python. Adding the missing features to the project. Fixing bugs from the bug tracker at GitLab. Implementing a python wrapper around octave types to use in python, adding support for function callbacks and handles, and also adding support to use octave from python.
Main Deliverables
Move the octave-pythonic project which is currently owned by a single person to the GNU Octave group.
Support the latest version of Python. Current Pythonic only supports Python versions up to 3.9, but 3.11 is the latest version of Python.
Update CI/CD to test Pythonic with multiple versions of Octave and Python.
Provide a proof of concept of a
pyimport
command. To use Python functions, namespaces, and any other symbols in the Octave workspace.Implement complete destructor support of
pyobject
. This is required to free unused memory from a running process.Implement a new
pyenv
function to select the Python environment to be used with Pythonic at runtime.Windows Compatibility; Resolve open issues related to build failing on Windows and other bugs on Windows. Also, add CI/CD pipeline to test Pythonic on Windows.
Verify existing issues on the dev tip of the Octave interpreter which needs to be fixed to be used in Pythonic.
Provide a proof of concept of a wrapper around Octave objects. Passing Octave objects and operating on Octave objects should preferably create 0 copies.
Improve Documentation; Add a user manual with sections that might include installation, basic usage, advanced usage, and development. Hopefully, build and publish it under GitLab Pages.
Support performing arithmetic and bit-wise operations on
pyobject
s.Support slicing of Python sequences.
Improve/update automated CI releases and adjust for new packages.octave.org changes.
Extended Deliverables
Extended deliverables depend on bug fixes or new features being implemented in the core Octave interpreter. These deliverables will be achieved if the necessary fixes/features have been implemented or get implemented during the course of my GSoC.
Support assignment on a Python
dict
. Or any Pythonmapping
.Support
load
andsave
to store Python objects on the disk.Improve exception handling and exception message. The Python stack trace is not displaced when an exception occurs.
Important Links and References
- Initial discourse post: https://octave.discourse.group/t/gsoc-2023-proposal-to-improve-state-of-octave-pythonic/4032/1
- GSoC project page: https://summerofcode.withgoogle.com/programs/2023/projects/aeEAbtyR
- Merge Requests
- Support python 3.10 & 3.11 and drops support for less then 3.7
Status: Merged on 26th May 2023 - Updating gitlab CI/CD to use official gnu octave docker image
Status: Opened on 26th May 2023 - Support for destructor of pyobject
Status: Opened on 26th May 2023 - Add support to import modules using pyimport command
Status: Opened on 26th May 2023
- Support python 3.10 & 3.11 and drops support for less then 3.7
- Bug Reports
- octave crashing while saving class object to a file at discourse
Status: Fix at Octave version 8.3.0 - crash while using subsasgn with struct and multiple subs value at savannah.
- destructor is executed even if the constructor fails and throws an error at savannah.
- octave crashing while saving class object to a file at discourse
- Added new page at Pythonic Wiki, developer’s reference API
- Links to my work on supporting HDF5 file format in octave
- Project at https://github.com/pantxo/oct-hdf5
- Draft pull request on implementation of
h5disp
function - Merged pull request on implemented
H5A.get_num_attrs
- Merged pull request; setting up GitHub actions for automated testing
- Links to other blogs