Loading...
Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Plone Conference 2018 at Tokyo -report, part 1: Battle-hardened, future-proof, driven by extraordinary people!


My first ever trip to Tokyo couldn't have been better: fast trains coming and going as scheduled, tasty fresh delicacies available in every corner, helpful Japanese people welcoming the visitors. And most importantly, Plone Conference 2018 was as exciting, interesting and inspirational as ever - enjoyed together with possibly the most friendly open source community in the world!

Here is a short summary of some of the things that caught my divided attention. Lots of interesting tracks at the same time, but luckily all conferenece presentations and lightning talks will be published later in YouTube and Slideshare (and another blog post).

During the conference I attended the trainings, held an impromptu demonstration of a new tool we created at University of Jyväskylä, gave my conference presentation and even gave a lightning talk, in addition to attending the talks.

Oh, and Plone is an enterprise level open source content management system, widely used e.g. at JYU for websites, intranet portals, workflow solutions and customized web applications.

A view from the hotel room.


Trainings 5.-6.11.2018

Monday 5.11.2018

My trip to Tokyo from Jyväskylä took about 24 hours, so after leaving on sunday morning 10 am and arriving at the conference venue at 1 pm next day, I was pretty exhausted :) I decided to try to attend the trainings, staying shortly at Mastering Plone -course and ending up to Hacking Plone course for the rest of the afternoon.

The discussion in the hacking class turned to mastering various Plone features, like building custom Dexterity content types and enhancing those with different workflows. As it happens, my presentation was about workflows, Dexterity types and a new tool called collective.flow, so I was encouraged to give an impromptu demonstration of the tool in hand. Thanks to my colleague Asko Soukka (https://twitter.com/datakurre), I had a working demo environment to play with.

Collective.flow is a Plone add-on, that enables content editors to easily create customizable, form based content types and attach different workflows to them. For example you can create a form that saves information as a new document, that can be handled by a review workflow. In addition, that form can be easily modified to have slightly different schema for different needs, for example in two departments at a university.

It might not have been the most coherent demonstration ever, considering the traveling and jetlag, but I had fun, and people seemed to get what I was telling to them :)



After the training day I retreated to my hotel room to get some sleep and to make final preparations for my presentation. The conference venue was near Keikyu Kamata station at Ota financial district. The area was not so densely populated, and had couple of nice shopping streets with lots of small restaurants. 

Tuesday 6.11.2018

On tuesday, refreshed after a good night's sleep, I attended Plone React (Volto) training.

Volto is React-based front-end for the Plone and Guillotina Content Management Systems.

https://github.com/plone/volto

Though I'm not much of a developer, or hardly touched terminal window or code editors, I managed to get a Plone 5 -site running on the backend and Volto on the frontend, thanks to pretty detailed documentation: https://training.plone.org/5/volto/index.html. Nice!

Everything you need

Maybe the main point with React and Plone is that you can use a robust, secure, full-featured cms with granular permission management and loads of other features as a backend, but still build the frontend using some fancy JavaScript library like React. The communication is done via plone.restapi, a RESTful hypermedia API for Plone: https://github.com/plone/plone.restapi.

Compared to building an application from the scratch, using CMS backend is a huge bonus.

Volto looks really slick, the UI (pastanaga.ui) is clear and super fast - its having the Plone features but the UX is totally new.



Some examples of a real world Volto use cases include a flexible learning management system in Germany: https://vhs-ehrenamtsportal.de/ and beautiful and fast bakery site https://www.zeelandia.com/. Other use cases might be modern progressive web apps (PWA) in addition to any web-based service. 


Conference 7.-9.11.2018

Plone conference main event days usually consist of presentations, open spaces and 5 minute lightning talks from 9.30 to 18.30. https://2018.ploneconf.org/.

In addition to Plone stuff, the conference had 3 additional tracks: Python Web Day track, DB Day track and Frontend Day track - all nicely contributing to one another.


Wednesday 7.11.2018

The conference talks were opened once again by a "State of Plone" presentation by Plone release manager Eric Steele. The main points from his presentation (in addition to being funny and inspiring):
  • Zope (the system behind Plone) has been successfully ported to Python 3 https://zope.readthedocs.io/en/latest/WHATSNEW.html 
  • Python 3 support is done for Plone
  • Plone 5.2 alpha to be released during conference
  • Plone.restapi and all the possibilities with combining Plone as backend and JS as frontend
  • Guillotina and Volto 
  • Community



Then came my turn. 

Workflows and Plone
 - Case supervisiondoc 


 


I told the audience how we searched for a multi-functional workflow solution and ended up using Plone as a workflow engine and form builder in different cases, like the Supervisiondoc for all the postgraduate students and their supervisors. For this, we have developed Plone add on called collective.flow, which enables us to flexibly create form based workflow solutions.

My colleague Asko Soukka (https://github.com/datakurre), in addition to creating the add on and building the system, provided me with detailed slides for this presentation about collective.flow. 




The actual service I was talking about was a success - it servers users well, has more features than originally intended and was released in time. After releasing it, more than 600 documents were created to the system in short time, with little to none technical problems or need to more documentation or support.

https://www.jyu.fi/supervisiondoc/

Currently we are using collective.flow in other cases too: different invoice forms, feedback system and many more in the future.

Conference days 7.-9.11.2018 - the rest

There were many interesting presentations, which I will go through on another post when the videos arrive!

Sprint 10.-11.11.2018

Sadly, I couldn't stay for one of the most important events from the perspective of the community: the sprint. During the last two days, people gather at the same location to develop things further, to create documentation, to test features, to contribute to the Plone community in anyway they can, together. 

Based on github activity, the sprint was yet again really active and successful one.

https://github.com/plone/

More sprints are coming, feel free to join for example the legendary Alpine City Sprint at Austria in February: https://plone.org/events/sprints/alpine-city-sprint-2019-in-innsbruck-austria!


Domo arigato!

The conference was professionally organized by our Japanese hosts. Everything worked as planned, yet the atmosphere was relaxed and easy-going. Thank you Manabu Terada and crew!

Battle hardened, future proof, driven by extraordinary people

Plone has been around for almost 18 years. That kind of life span is impressive for any software, especially for an open source one that is driven by dedicated people during their spare time. Not all conference goers or sprint attendees use Plone actively, but they keep contributing.

So what keeps people investing in Plone? The answer might be (in addition to solving interesting tech problems) in the community: professional, passionate, welcoming and friendly!

By the way, the next Plone Conference will be held in Ferrara Italy at October 2019 so save the date!
https://plone.org/news/2018/plone-conference-2019-will-be-in-ferrara-italy

The future of Plone looks lively: Plone and Zope has been ported to Python 3, there is robust and feature rich Plone 5.2 in the works and interestingly, using Plone as a backend for modern JavaScript based custom applications might be a big step towards something new. From enterprise-level custom workflow applications to fast PWA mobile apps, anything is possible!



Stay tuned for the second part of my Ploneconf 2018 blog post!

RoboCon 2018 and Robot Framework Jupyter support

It's already over a week since I got back home from the first Robot Framework conference ever – RoboCon 2018. It was a pleasure to be there, and I really feel privileged that I was accepted there as a speaker.

My RoboCon 2018

RoboCon 2018 was a single day conference about Robot Framework test automation ecosystem, held in the heart of Helsinki, Finland, on 18th of January 2018. The conference venue was quite if not completely full, so there must have been around 250 participants. The event was in English and had pretty good international participation. Yet, most of the participants came from Finland, where Robot Framework has become de-facto standard for test automation.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDC4g6fuHOPYBZK0P4PmO2K9RmGUqX6T74jU6XgEDdHvCwKiQp7hhh5HKi-_VqA4gTMBi-NbxOT1qd60v4prroe3IFMkmrY3wYkNRurGTVpsxdfuO7uCcnNgR5t3qtCKw-lMAm0dGuGBk/s1600/LND_8D2D2079-6B5F-4DC1-A14C-6D30182A63FB.JPG

Pekka Klärck presenting the history, present and future of Robot Framework

RoboCon 2018 had only a single track, so that had to be packed to include something for everyone in its diverse audience. In addition, there was plenty of time and a separate space for networking with the other participants and conference sponsors. There was also organized social program before and after the conference, but unfortunately, I was unable to attend those at this time.

In my opinion the program was well balanced: The conference started with introductory talks, continued with variety of differnet case studies (Kone, Plone and Texas Instruments), and ended with more technical talks about specific Robot Framework addons (SeleniumLibrary, the most awesome new REST library and pabot). And in the middle of everything, there was my personal favorite: Ed Manlove's talk about building successful open source communities. My presentation was called Robot Framework in Plone CMS Project: a case study, story and some technical details, how Robot Framework got successfully adopted in distributed open source community behind Plone.

The most important part of this conference, of course, was getting a lot of Robot Framework users and developers to meet in the same place at the same time. After all, RoboCon 2018 was the first Robot Framework conference ever. My personal absolute highlight during the conference was meeting a former Plonista, Ed Manlove. He was the one who first introduced me to Selenium testing in San Francisco Plone Conference in 2011, and whom I had not seen after that. Until now. I really hope takes less than seven yeras to see him again...

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDJXiqIc3-y9wyoNl4hZvalCUmdjKcDdEMlURQ8-AGP_ojTFi8NfpMo0gik4L7wWiK8FdgOsDMLypJ8_Zi43iOo0pEtbQsCe7FVaBxdhDMYTXt-6aJkDu9Bi95dVuj0xRUX_9nrd5xBuY/s1600/IMG_6460.JPG

Ed Manlove presenting his talk: The Importance of Open Source Communities

Jupyter kernel for Robot Framework

After the conference on Thursday came the single day conference sprint on Friday. And if the conference was a success, the sprint was even more so: the sprint venue, three large office rooms, was packed full of sprinters, many of them participating their first open source sprint (and got a good introduction to open source development from Ed).

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEheVLSrkg-lf8BnoxvSknOjBZzenIeo6uz7HtB0xsjFgrhe1et_YwcdrCQGp3d1tEo7we9og8sdRvvcaMFquxB4bjES_aFmZlp4u-5IJ991kuwPDTD5ImJ6bbZ68Heq2KxValYWGY3TICY/s1600/IMG_6482.JPG

The sprint facilities were provided by Eficode

Because I had to leave early in Friday, I had planned a very specific sprint goal for myself: a MVP Robot Framework kernel for Jupyter notebook.

Jupyter notebook (previously known as IPython notebook) is an open-source web application for creating and sharing documents that contain live code, equations, visualizations and narrative text. The architecture behind Jupyter notebook separates the notebook application from its language specific ”kernels” that are responsible for executing the code in notebooks. Syntax highlighting in notebooks, on the other hand, is provided by CodeMirror project for the interactive frontend, and Pygments for server side generated highlighting.

I'm happy to say that I made it. And the more I use it, the more confident I get on that Jupyter makes a great platform for learning also Robot Framework. And not only for learning by yourself, but also for sharing your notes with others.

Check my example notebooks to judge the kernel by yourself.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDgwICOoTvA0eq7TQdpP6XgZPXENNLBPqg1UlPjrOREdPWilHJs1AXcbIHKkIl2SGsY0okvD98RVx44w2Znh7qpq3bAuxyWxAbqpoyyXB_woRGd2Op0TBtHBTAUOgf9gcdCprqghr9RWs/s1600/Screenshot-2018-1-27+Notebook+on+nbviewer.png

Please, note that while these examples are static renderings at http://nbviewer.jupyter.org/, they can be opened and interacted live in any running Jupyter notebook with the new kernel and required Python packages. See the repository for more details.

The main Jupyter Robot Framework support features shown in those examples are:

  • Support for defining and executing Robot Framework test suite cumulatively step by step in successive notebook cells. The main limitation is that each cell should start with a test suite section header (settings, variables, keywords or test suites) even when the same header was already defined in some cell before.
  • HTML log and report files are linked below the executed cells containing the tests. Both files are actually bundled with the notebook in a way that sharing the notebook also shares the log and report files.
  • Images generated during test execution are shown below the executed cells generating the images. Similarly to HTML logs and reports also images are bundled with the notebook for sharing.
  • Support for %%python module LibaryName ”cell magic” to allow defining custom Robot Framework keyword libraries in Python in fly. Once thell cell with a Python library class definition is executed, it can be imported in a successive Robot Framework code cell.
  • Syntax highlighting. But, unfortunately, until the CodeMirror plugin derived from brackets-robotframework-project is accepted into upstream, it must be manually patched into CodeMirror version shipped with Jupyter notebook-distribution. (I have not yet submitted a pull for it.)
  • If the last keyword of the last test case in the executed cell returns JSON string, it is rendered as cell execution output. I added this quite specific feature to make it more fun to learn RESTinstance library with Jupyter (Output keyword of RESTinstance library returns JSON).

Obviously, while the current versions is already fully functional on Python 3, there's still a lot of work (QA, packaging and Python 2 support) left to polish the code for release. I'm looking forward to finish it during the spring.

Happy hacking! And hopefully see you in RoboCon next year – or whenever it is organized and I'll manage to participate it for the next time! :)

About XPath like tools for JSON

It bothers me that I have processed JSON manually and that there are standard tools like XPath and XSLT for XML. There must be better tools available for JSON also. Here are the ones I found for Python and some observations about them.

ObjectPath

  • Powerful query language
  • Reminds me of write once regexps
  • Focused more on command line usage than module in the tutorial
  • Doesn't support Python 3

DPath

  • Simple API. Maybe too simple.
  • Good examples in README
  • No other dependencies
  • Supports Python 3

Jsonpath-rw

  • Rewrite of older jsonpath library which is a port from Javascript version
  • Some minor dependencies
  • Supports Python 3

Jq


If my requirements are simple I would probably go for dpath or jsonpath-rw (in that order). If I need some heavy lifting I would go with jq. ObjectPath has the nicest web pages but the lack of Python 3 support is a show-stopper nowadays. There doesn't seem to be a clear winner at the moment (like Requests for http client or SQLAlchemy for ORM). Your mileage may vary.