Coding Period – Report (7)

Hello there, this is my weekly report about my work. In this report, I will show what I did this past week. I will also show what I intend to do in the next week. let’s get started.

That’s what is done
  • Added the “ReplacementStyle” and “Prefix” options for jsondecode function.
  • Extended the test suite for jsondecode.
  • Added Doxygen comments to the internal functions of jsondecode.
  • Made some modifications in jsondecode functions after taking feedback from my mentors.
  • Made a new “standalone” repository to facilitate communication and moved my commits and the issues from the old repo to the new repo as I think it is better to preserve the history of the commits. This is how I moved the files with commits:
    • I made a clone of the json branch in my Octave’s repository.
    • I checked through the history and files and used an “index-filter” to remove everything except the files I want. What remained in my clone after that was just some directories that contain only my files. Here is the command I used:
git filter-branch --index-filter 'git rm --cached -qr --ignore-unmatch -- . && git reset -q $GIT_COMMIT -- test/json libinterp/corefcn/jsondecode.cc libinterp/corefcn/jsonencode.cc ' --prune-empty -- --all

After that, I just moved the files to the desired directories in the new repo and committed the changes.

How to compile and run tests on the code

Right now, the code is treated as an external *.oct file. The integration of the code into Octave’s build system will be done at the end of the project. To compile it:

  • cd into the repo’s directory.
  • run mkoctfile command using the file name (eg. jsondecode.cc) as an argument.

Octave test files are provided for each function. For example, you can run the one that tests jsondecode by running this command:

test('test/jsondecodetest.m','quiet','test/log-jsondecode.txt')

The log file “log-jsondecode.txt” in “test” in your repo’s directory will have the data of the failed tests.

What I intend to do

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website at WordPress.com
Get started
%d bloggers like this: