GNOME Code Assistance supports pylint syntax checker

GNOME Code Assistance (GCA) is a project which aims to provide common code assistance services for code editors (simple editors as well as IDEs). It is an effort to provide a centralized code-assistance as a service for the GNOME platform instead of having every editor implement their own solution.

Yesterday I got some feedback from Vadim Rutkovsky that GNOME Builder or Gedit is unusable for python because missing syntax checker (Coding Standard, Error Detection and etc.). He is using pyflakes, but in DNF project we’re using pylint and I like it more.

I wrote patch which implementing this functionality. Today discussed with Jesse van den Kieboom, fixed some things and patch was merged.

To use pylint with GCA you need to pass {“pylint”: True} as “options” parameter for DBus. You can replace “True” with any string if you want, just don’t use False 😉

Feel free to report bugs and send patches in BGO!

GNOME Builder snippets improvement

Did you know that GNOME Builder support snippets? I didn’t.

I made 4 snippets for RPM Spec files to get spec skeleton: minimal, library, python-arch, python-noarch. You can start typing one of this, press ENTER and see how this magic works. It’s very useful when you packaging something to avoid calling rpmdev-newspec with parameters, opening editor, manual walking by lines and etc.

Also I added some basic snippets for Python files: class/function definition, interpreter line, main function and import. This helps me to more faster write code.

P.S. there some cool C snippets like gobject and main

P.P.S. for switch to next field you want to press Tab

GNOME Builder and python: happy indents

Christian Hergert, author of GNOME Builder, in yesterday morning got some messages from me about auto-indent problems in Python.

According to PEP 8 we can use:

# Aligned with opening delimiter.
foo = long_function_name(var_one, var_two,
                         var_three, var_four)

# More indentation included to distinguish this from the rest.
def long_function_name(
        var_one, var_two, var_three,
        var_four):
    print(var_one)

# Hanging indents should add a level.
foo = long_function_name(
    var_one, var_two,
    var_three, var_four)

Christian added support for auto-indenting for all this cases. I can just write code and don’t care about indentation. You want to try GNOME Builder!

P.S. There are cool Shift-Tab keybinding to remove one tab (4 spaces or whatever)

Building GNOME Calendar on Fedora

If you tried to build GNOME Calendar on Fedora you’ve got error like this:

  CCLD     gnome-calendar
gcal-event-widget.o: In function `gcal_event_widget_is_multiday':
/home/brain/git/GNOME/gnome-calendar/src/gcal-event-widget.c:1033: undefined reference to `icaltime_days_in_year'

This is because bug in libical and fixed in 1.0.1 release (Fedora 20+ provides 1.0). What do you want? Update libical and libical-devel to new release. You can just enable my COPR repository (ignatenkobrain/gnome-calendar) and update/install that packages. Also you can install latest release version of gnome-calendar for repo, but it’s under heavy development and I’d recommend to try it using jhbuild.

P.S. We are going to have GNOME Calendar in Fedora 22+. You can track review request in RHBZ.

GNOME MultiWriter 3.15.1 released

Richard Hughes released first version of GNOME MultiWriter. He made post about project, but in release more cool features and changes.

GNOME MultiWriter can be used to write an ISO file to multiple USB devices at once. Once an .img or .iso file has been chosen it can be written to an unlimited number of USB devices simultaneously. Supported drive sizes are between 1Gb and 32Gb.

MultiWriter was originally written as part of the ColorHug project but was split off as an independent application in 2015.

People have used MultiWriter in a few different ways:

  • To copy a specific ISO for QA testing for a small number of users
  • To share a LiveUSB image of GNOME for a code sprint
  • To create hundreds of USB flash drives for the ColorHug project

Sure, package was added in Fedora 21+. You can install it from koji (f21, f22) right now and install just via yum/dnf in the near future.

Continue reading →

CI for mesa in Fedora Project

Today I played with jenkins for my primary work. I wanted to check sources periodically and if it has been changed – build new RPM package from new git version. I have started playing with mesa, because I maintain it in Fedora and has git version in Rawhide which I’m building from time to time from git.

Q: What it’s doing right now?
A: Checking if there new upstream commits, updating .spec file, commiting to fedorapeople git repository, copying .src.rpm to fedorapeople http site and submitting to build in COPR repo.

Q: How I can use this CI and what version of Fedora I need?
A: You can use this CI only on Fedora Rawhide. You can enable repo via # dnf copr enable ignatenkobrain/mesa and update packages.

How I built this in jenkins?
Continue reading →