Blog

Posts about technology.

Using Lumino with Vue

Lumino is the engine that powers the GUI of JupyterLab. It used to be called Phosphor JS, but some time ago there was a misunderstanding and the author gave up maintaining it. Then JupyterLab decided to fork it under this new name.

The documentation is still lacking, but it works as expected, and there is already a community supporting it. We decided to use it in Cylc UI to have tabbed panels like JupyterLab.

This project contains the part of the code of Cylc UI that integrated Lumino and Vue. It was a suggestion from one of the maintainers of JupyterLab, that got involved in an issue of Cylc UI. You can find this project linked too in the Lumino project README file.

Jenkins Active Choices with Jupyter Notebooks

Jenkins Active Choices provides interactive and reactive parameters for the Jenkins UI. It is used by DevOps but also by researchers in industry and academia. Some days ago I ran an experiment where I tried to reproduce similar behaviour of the plug-in with Jupyter Notebooks and ipywidgets.

The experiment was a success, and I am convinced one could achieve the same in Jupyter Notebooks. Jenkins could be used as workflow manager, or the parameters could be submitted to a different workflow manager or another system.

Tweet

You can see more in the following links:

Experimenting with Vuejs and Cytoscape

The project I work on at work had a GUI interface with Python and PyGTK, which is now being ported to the web. We have adopted Vuejs as the JS framework, and have been building the components required for our UI over the past months. The project is hosted on GitHub licensed under GPLv3.

In Cylc 7, an important visualization was the workflow graph. The screen shot below is from the design sketches done by another contributor from the UK, showing how it should look in Cylc 8.

The first library we decided to try is Cytoscape, a well-known graph library, with use cases in research, corporate, and other fields. One limitation of Cytoscape is that the way it renders the graph nodes is limited.

Limited, meaning that you won’t be able to easily add HTML, images, SVG, animation, etc. Though not impossible.

Dynamic breadcrumbs with Vue Router nested routes and Vuetify Breadcrumb component

Vue Router supports nested routes, which allow developers to create a hierarchical navigation structure. This is handy if you want to create breadcrumbs based on this hierarchy dynamically.

Here’s how you should create your nested routes:

const routes = [
  { path: '/', component: { template: `<h1>Home View</h1>` } },
  {
    path: '/users',
    component: {
      render (c) {
        return c('router-view')
      }
    },
    meta: { breadCrumb: 'Users' },
    children: [
      {
        path: '',
        component: {
          template: `
            <div>
              <h1>Users View</h1>
              <router-link to="/users/1">View User 1</router-link>
            </div>
          `
        }
      },
      {
        path: ':id',
        component: {
          render (c) {
            return c('router-view')
          }
        },
        meta: { breadCrumb: 'View User' },
        children: [
          {
            path: '',
            component: {
              template: `
                <div>
                  <h1>User View</h1>
                  <router-link to="/users/1/edit">Edit User</router-link>
                </div>
              `
            }
          },
          {
            path: 'edit',
            component: {
              template: `<h1>Edit User</h1>`
            },
            meta: { breadCrumb: 'Edit User' }
          }
        ]
      }
    ]
  }
]

Reddit r/functionalprogramming community

Alonzo Church caricature

r/functionalprogramming was created nearly seven years ago. It started when I was interested in contributing to Apache Commons Functor.

I created it to have a place to collect links about functional programming. To my surprise there was no subreddit for functional programming. So I created one. Fast forward a few years, the community is still active, with a healthy group of nearly 10.000 readers and contributors.

Nowadays I spend something like 5 to 20 minutes everyday moderating posts. And a little more than that whenever I find some interesting post to read. But if I could change one thing in the community, it would be to find more moderators.

It is a huge responsibility to be the sole moderator of content read by thousands of readers. Whilst I try to stay neutral, and keep it a healthy community, I feel like having other people with different background and opinions would be good for the future of the community.