Google Summer of Code 2023 - My Project

GSoC
Code
Internship
GNU Octave
Author

Vipul Cariappa

Published

May 6, 2023

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

  1. Move the octave-pythonic project which is currently owned by a single person to the GNU Octave group.

  2. 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.

  3. Update CI/CD to test Pythonic with multiple versions of Octave and Python.

  4. Provide a proof of concept of a pyimport command. To use Python functions, namespaces, and any other symbols in the Octave workspace.

  5. Implement complete destructor support of pyobject. This is required to free unused memory from a running process.

  6. Implement a new pyenv function to select the Python environment to be used with Pythonic at runtime.

  7. 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.

  8. Verify existing issues on the dev tip of the Octave interpreter which needs to be fixed to be used in Pythonic.

  9. Provide a proof of concept of a wrapper around Octave objects. Passing Octave objects and operating on Octave objects should preferably create 0 copies.

  10. 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.

  11. Support performing arithmetic and bit-wise operations on pyobjects.

  12. Support slicing of Python sequences.

  13. 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.

  1. Support assignment on a Python dict. Or any Python mapping.

  2. Support load and save to store Python objects on the disk.

  3. Improve exception handling and exception message. The Python stack trace is not displaced when an exception occurs.