GSoC Log Entry No. 4

Midterm report

Midterm evaluation report

See bug #67048 for my first bug fixing a small issue related to graphics objects in Octave. See also bug #45833. I talk about this second patch more down below.

See thread.

See the fork.

Chebfun seems to already have CI/CD set up on GitHub Actions. Initially I thought this was broken, but now it runs the integrated test suite after every commit, so it seems to be working well.

See the blog post on classdef attributes and missing features.

I was going to write a part 2 that covers some of the bugs inherent in classdef.

Lastly, I would like to update the Octave Wiki with the information, but unfortunately, there seems to be some technical difficulties with validating email addresses that prevents me from making changes.

I’ll update this one shortly, before the midterm evaluation.

My thoughts on this have evolved a bit. Chebfun’s existing test suite seems to be extensive enough. I think that getting maximal test coverage with the existing suite is better than expending the time and effort to write new tests, and the new tests should only target certain large changes to the Chebfun codebase that will diverge from the MATLAB version. The reasoning is that writing new tests does not really seem to correspond to coverage in the test suite, and I do not have the time to write tests for every bit of functionality that Chebfun can do.

This was a rather unexpected issue for me to focus on, but I managed to get the ball rolling on implementing saving and loading of classdefs! See bug #45833, and this thread for discussion on the matter.

See bug #67197, bug #67248, and bug #67258.

To be honest, there were definitely more bugs than this that I’ve encountered. A large class of bugs I found were related to classdef issues; the blog post has a few examples where some of them deviate in functionality from their reported status. As I work my way through some of the classdef issues, I will report more of them, but I am particularly interested in the ones that are related to Chebfun.

I didn’t really get around to doing this. It’s mostly orthogonal to the actual project, so I’ve put it on the back burner.

All of the changes are on this branch, and you can see the large commit here, where most of the changes were made.

Unfortunately, 1-D Chebfun is still a ways away. The bugs that are plaguing Chebfun mostly have to do with object arrays and the myriad of ways that they subtly fail in Octave. There is also a problem with the method ‘domain’ conflicting with the property ‘domain’;a large part of the commit deals with this issue by changing the property name to ‘m_domain’ to avoid conflicts.

All in all, Chebfun seems to have very basic functionality working: constructing a Chebfun (piecewise smooth ones work as well), doing basic arithmetic with them, calling some fairly simple methods like ‘domain’ and ‘size’.

Thoughts and next steps

There’s definitely some wins, some things I feel good about, and some things I am disappointed by.

I am very happy overall with my understanding of Octave internals, and how classdef is implemented under the hood. Going in, I hadn’t really expected to work as deep as I did with Octave internals, but implemented the saving and loading mechanism really helped me understand almost every aspect of how classdef (and variables in general) are stored and manipulated under the hood. I had a pretty fantastic time working in this direction, and I’m excited to make more changes to the Octave codebase in the future. I will also say that the community of core developers have been very kind and helpful, and seem willing to talk about my code in detail.

Becaue I’ve had the opportunity to work in this direction, I feel ready to tackle some more classdef issues that I think can make a large difference when porting Chebfun. As for next, I particularly want to target fixing object arrays, since they are really one of the main barriers to getting Chebfun working in Octave.

Chebfun itself is a bit of a mixed bag. My optimism in the beginning slowed down significantly when I realized that many of the issues were more subtle than I thought, and debugging proved to be a pain. I’m afraid that I’ve spent such a long time working in Octave internals, hoping to understand classdef issues under the hood, that I’ve (1) neglected to really study Chebfun internals as well as I should have, and (2) to just complete the routine boring work of actually implementing workarounds. I think the next step is just to apply tons of workarounds, and worry less about actually understanding every bug in minute detail. My short term goal is to have 50% test coverage by July at the very least.

All in all, I think there’s a good deal of work left to do, and I’m excited to get much more productive in the second half of GSoC. Once again, I must thank my mentors Colin and Andreas for their patience and help so far, I’m thankful for them placing their trust in me, and I am looking forward to continuing to work on this project with them. I really am appreciating my time in GSoC, I think this has been a fantastic guided introduction to open source contributions, and everyone has been delightful.