GSoC 2021: How to setup a GNU Octave package using the new GitHub template

Hello there. In this blog post, I will describe how to setup a GNU Octave package using the new GitHub template. This is what I did to create the package that I will be working on during this GSoC. Let’s get started.

I followed those easy steps to setup my package:

1- Create a repo from the template:

As I am a part of the GNU Octave GitHub organization, I was able to do that easily. If you are not a member, Join the GNU Octave GitHub organization by asking for an invitation at our Discourse forum.

2- (Optional) Change the license:

the “COPYING” file contains the license text of the package. You may change the license if you want. For my package, I left it as it is.

3- Update DESCRIPTION:

Update the fields in this file to match your package. For my package, I used the following:

name: pkg-jupyter-notebook 
version: 1.0.0
date: 2021-05-30
author: Abdallah Elshamy <abdallah.k.elshamy@gmail.com>
maintainer: Kai T. Ohlhus <k.ohlhus@gmail.com>, 
 Abdallah Elshamy <abdallah.k.elshamy@gmail.com>
title: A package to run and fill Jupyter Notebooks within GNU Octave. 
description: A package to run and fill Jupyter Notebooks within GNU Octave. 
 This would enable Jupyter Notebook users to evaluate
 long-running Octave Notebooks on a computing server without 
 a permanent browser connection, which is still a pending issue.
categories: package
depends: pkg-json (>= 1.0.0)

4- Update your README:

Right now, your README is the same as the template. Change it to suit your package.

5- Change the package icon in docs and remove the other images from there:

Currently, your icon is the same as the template. Change it to suit your package. There are also some other images that were used in the README of the template that you need to remove.

6- Remove unnecessary files from src:

Initially, this directory contains examples for Octave/Matlab code, FORTRAN code, C++ code called by the oct-interface, and C code called by the mex-interface. Remove the files that you don’t need and rename the rest of the files to match your package.

7- (Optional) Amend the initial commit and force push your changes:

The setup is now complete but you may want to amend the initial commit using git commit --amend if you don’t want the files that you removed to appear in the initial commit. To push those changes to the remote repo, use the -f option as you overwrote the initial commit.

And that’s it! As you can see, setting up a package using the new GitHub template is very easy and simple.

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 with WordPress.com
Get started
%d bloggers like this: