FLOSS Project Planets

Qt for MCUs 2.1.1 Released

Planet KDE - Wed, 2022-05-04 05:07

Qt for MCUs 2.1.1 has been released and is available for download. As a patch release, Qt for MCUs 2.1.1 provides bug fixes and other improvements, and maintains source compatibility with Qt for MCUs 2.1.0. It does not add any new functionality.

Categories: FLOSS Project Planets

Luke Plant: REPL Python programming and debugging with IPython

Planet Python - Wed, 2022-05-04 02:26

When programming in Python, I spend a large amount of time using IPython and its powerful interactive prompt, not just for some one-off calculations, but for significant chunks of actual programming and debugging. I use it especially for exploratory programming where I’m unsure of the APIs available to me, or what the state of the system will be at a particular point in the code.

I’m not sure how widespread this method of working is, but I rarely hear other people talk about it, so I thought it would be worth sharing.

Setup

You normally need IPython installed into your current virtualenv for it to work properly:

pip install ipython Methods

There are basically two ways I open an IPython prompt. The first is by running it directly from a terminal:

$ ipython Python 3.9.5 (default, Jul 1 2021, 11:45:58) Type 'copyright', 'credits' or 'license' for more information IPython 8.3.0 -- An enhanced Interactive Python. Type '?' for help. In [1]:

In a Django project project, ./manage.py shell can also be used if you have IPython installed, with the advantage that it will properly initialise Django for you.

This works fine if you want to explore writing some “top level” code — for example, a new bit of functionality where the entry points have not been created yet. However, most code I write is not like that. Most of the time I find myself wanting to write code when I am already 10 levels of function calls down — for example:

  • I’m writing some view code in a Django application, which has a request object — an object you could not easily recreate if you started from scratch at an IPython prompt.

  • or, model layer code such as inside a save() method that is itself being called by some other code you have not written, like the Django admin or some signal.

  • or, inside a test, where the setup code has already created a whole bunch of things that are not available to you when you open IPython.

For these cases, I use the second method:

  • Find the bit of code I want to modify, explore or debug. This will often be my own code, but could equally be a 3rd party library. I’m always working in a virtualenv, so even with 3rd party libraries ,“go to definition” in my editor will take me straight to a writable copy of the code (apart from code not written in Python).

  • Insert the code for an IPython prompt and save the file:

    import IPython; IPython.embed()

    I have this bound to a function key in my editor.

    So the code might end up looking like this, if it was a Django view for example:

    def contact_us(request): if request.method == "POST": form = ContactUsForm_class(request.POST) if form.is_valid(): import IPython; IPython.embed() # …
  • Trigger the code in the appropriate way. For the above case, it would involve first running the Django development server in a terminal, then opening the web page, filling out the form and pressing submit. For a test, it would be running the specific test from a terminal. For command line apps it would be running the app directly.

  • In the terminal, I will now find myself in the IPython REPL, and I can go ahead and:

    • work out what code I need to write

    • or debug the code that I’m confused about.

Note that you can write and edit multiline code at this REPL — it’s not quite as comfortable as an editor, but it’s OK, and has good history support. There’s much more to say about IPython and its features that I won’t write here, you can learn about it in the docs.

For those with a background in other languages, it might also be worth pointing out that a Python REPL is not a different thing from normal Python. Everything you can do in normal Python, like defining functions and classes, is possible right there in the REPL.

Once I’ve done with my exploring, I can copy any useful snippets back from the REPL into my real code, using the history to scan back through what I typed.

Advantages

The advantages of this method are:

  1. You can explore APIs and objects much more easily when you actually have the object, rather than docs about the object, or what your editor’s auto-complete tools believe to be true about the object. For example, what attributes and methods are available on Django’s HttpRequest? You don’t have to ensure you’ve got correct type annotations, and hope they are complete, or make assumptions about what the values are - you’ve got the object right there, you can inspect it, with extensive and correct tab completion. You can actually call functions and see what they do.

    For example, Django’s request object typically has a user attribute which is not part of the HttpRequest definition, because of how it is added later. It’s visible in a REPL though.

  2. You can directly explore the state of the system. This can be a huge advantage for both exploratory programming and debugging.

    For debugging, pdb and similar debugging tools and environments will often provide you with “the state of the system”, and they are much better at being able to step through multiple layers of code. But I often find that the power and comfort of an IPython prompt is much nicer for exploring and finding solutions.

The feel of this kind of environment is not quite a smooth as REPL-driven programming in Lisp, but I still find it hugely enjoyable and productive. Compared to many other methods, like iterating on your code followed by manual or automated testing, it cuts the latency of the feedback loop from seconds or minutes to milliseconds, and that is huge.

Tips and gotchas
  • IPython has tons of cool features that will help you in a REPL environment, like %autoreload (thanks haki), and many other cool magics. You should spend the time getting to know them!

  • In a multi-threaded (or multi-process) environment, IPython prompts won’t play nice. Turn off multi-threading if possible, or otherwise ensure that you don’t hit that gotcha.

  • If you do get messed up in a terminal, you may need to manually find the processes to kill and do reset in your terminal.

  • With the Django development server:

    • It’s multi-threaded by default, so either ensure that you don’t hit the view code multiple times, or use --nothreading.

    • Beware of auto-reloading, which will mess you up if you are still in an IPython prompt when it kicks in. Either use --noreload or just ensure you exit IPython cleanly before doing anything that will trigger a reload.

  • Beware of environments that capture standard input/output, that will break this technique.

  • pytest captures standard input and breaks things by default. You can turn it off using -s. Also if you are using pytest-xdist you should remember to do -n0 to turn off multiple processes.

  • When using IPython.embed() there’s an annoying bug involving closures and undefined names due to Python limitations. It often shows itself when using generator expressions, but at other times too. It can often be worked around by doing:

    globals().update(locals())
End

That’s it, I hope you found it useful. Do you have any other tips for using this technique?

Links
Categories: FLOSS Project Planets

scikit-learn: Interview with Lucy Liu, scikit-learn Team Member

Planet Python - Tue, 2022-05-03 20:00
Author: Reshama Shaikh , Lucy Liu

Lucy Liu joined the scikit-learn Team in September 2020. In this interview, learn more about Lucy’s journey through open source, from rstats to scikit-learn.

  1. Tell us about yourself.

    My name is Lucy, I grew up in New Zealand and I am culturally Chinese. I currently live in Australia and work for Quansight labs.

  2. How did you first become involved in open source?

    I first discovered open source when I started a research Masters, after finding my clinical Optometry job unfulfilling. I loved learning to program but was initially not game enough to contribute as I was only a beginner. After my masters, while working as a bioinformatician, I wrote some R packages for analysis of niche biomedical data and put them on github. My first contribution to an existing open source project was later when I worked at INRIA (French National Institute for Research in Digital Science and Technology) alongside the INRIA scikit-learn core developers. They helped me put up my first pull request and I have been contributing ever since!

  3. How did you get involved in scikit-learn? Can you share a few of the pull requests to scikit-learn that resonate with you?

    I’m very interested in statistics and code so I was super keen to contribute to scikit-learn. Being relatively a beginner in both areas I started by contributing to documentation, then bug fixes and features. My first PR to scikit-learn was submitted in October 2019 to improve the multiclass classification documentation. I have contributed the most to the calibration module in scikit-learn (including refactoring CalibratedClassifierCV), which has been very interesting and useful for when I later worked on post-processing of weather forecasts at the Bureau of Meteorology in Australia.

    Reference: Lucy’s list of pull requests

  4. To which OSS projects and communities do you contribute?

    I contribute to Sphinx-Gallery and scikit-learn. Sphinx-Gallery was a great introduction to open source for me as it is a small package that does not get a large number of issues and pull requests (unlike scikit-learn!).

  5. What do you find alluring about OSS?

    I think the ability to see the source code and contribute back to the project are the best parts. If there is a feature you are interested in you can suggest and add it yourself, all the while learning from code reviews during the process!

  6. What pain points do you observe in community-led OSS?

    I think some of the positive aspects of the OSS community can also lead to pain. While it is great that you are able to get many different perspectives from people of various backgrounds, it also makes forming a consensus more difficult, slow progress. People from any geographical location can work together asynchronously but this can also mean people work in their own silos, making it difficult to have a cohesive direction for the project. Large projects also have a difficult learning curve, making it difficult for new contributors and contributors interested in becoming core-developers. The latter is the problem if the project lacks core-developer time for project maintenance and reviewing PRs.

  7. If we discuss how far OS has evolved in 10 years, what would you like to see happen?

    Some system that enables continuity of funding, which can combine funds from public and private sources. This would enable long term planning of OS projects and give developers more job stability. Better coordination between projects within the same area (e.g., scientific Python) would allow a better experience for users using Python for their projects.

  8. What are your favorite resources, books, courses, conferences, etc?

    Real Python have great tutorials and regex101 makes regular expressions so much easier to write and review!

    I also love the YouTube channel statquest, which explains statistical concepts in a very accessible manner and introduces videos with a jingle - what more could you want?

  9. What are your hobbies, outside of work and open source?

    I love cycling and feel strongly about designing cities for people instead of cars. I also enjoy rock climbing (indoors and outdoors), though sadly have not had much time for this recently.

Categories: FLOSS Project Planets

Calamares Future

Planet KDE - Tue, 2022-05-03 18:00
Current Stats

It is week 18 of 2022 when I write this. We’ve had 8 releases in 2022 (3.2.50 through 3.2.57), which is roughly every two weeks. This regular short-cycle pattern has been going for two or three years now. I’ve described the development workflow before. I still think it’s quite effective at getting things out to users, although I can also say that getting fixes for annoying, hard-to-reach bugs out is very slow going. Often branches get interrupted by small things that do fit in a short-cycle.

There are 165 open issues today, of about 1940 opened in total. That’s pretty good.

87 people have participated in Calamares development since it started. or 125, depending on how you count.

I have apparently committed over 1.2 million lines of code (and removed 933 thousand lines). This is a diffstat, and also includes things like “apply the code-formatter to the entire codebase” and “update the translations”, so it is definitely overblown – but it’s still a lot of code over the past 5 years.

Current Development

There are two primary branches for Calamares development:

  • calamares is the current production-ready, current-releases, short-cycle branch. It it currently version 3.2.57, and will continue to produce 3.2 versions for a little while more.
  • work-3.3 is the next production-ready branch. It drops a whole lot of backwards-compatibility, but makes somewhat different promises than 3.2 about stability and compatibility within the branch.

There is a gentle stream of new and returning contributors besides myself. I try to handle pull requests (PRs, basically code contributions with a request to look it over and push the button to merge) quickly and give some helpful advice while I’m at it. Having a bunch of formatting things automated means that we don’t need to quibble over that (and can quibble over how Pythonic something is, instead).

Future Development

The 3.2 series is slowing down, although it will probably continue to get short-cycle releases with small bugfixes (possibly large ones, but don’t count on it). At some point, a 3.2.x-stable will be created, and any future releases will come from that, while calamares then moves into the 3.3 era.

There is no fixed timeline for this. Whenever the feeling is right.

I continue to document what I can, writing down processes and creating guides – alongside writing code, doing PR, etc. – so that others can step in and participate. There are good-first-issue issues in the bug tracker, various small code-improvements listed, all kinds of things to introduce people to the codebase. Then there’s translation and documentation writing: the wiki is open, for instance.

There is an elephant in the room. Two, perhaps: hosting of the code and issues, and hosting of the translations. A question I get with some regularity is whether Calamares will move – to KDE infrastructure, or codeberg, or opencode. I am reluctant – and that shows exactly the problem with forges and how they lock-in users. Drew DeVault has some good words there, but it hasn’t pushed me over to other hosting yet.

Up Next

There are 21 “TODO:3.3” entries in the source code. Probably bopping each one of them on the head is a good plan. Outside of that, there’s a few big-ticket internal consistency plans – consistent Config classes, view-step naming and labeled translations, presets handling everywhere – that might land for 3.3 or might be deferred to later (for instance, deferred because they’re too much to do right now, and interfere with stability promises).

These plans aren’t particularly visible: they’re “just” maintainence, and anyone with a slab of time and some persistence could pick them up. I started in 2017 with small experiments and merging stale pull-requests, and here we are, 6288 commits later.

When I say “anyone” I mean that it is possible, while I’m keenly aware of the privileges I have that made it possible for me: stability, networking, and Blue Systems sponsoring me for my time so that I can feed my familty and work on Free Software.

Categories: FLOSS Project Planets

education @ Savannah: Along: an app to collect students' data for marketing purposes

GNU Planet! - Tue, 2022-05-03 16:08

The nonfree app Along, developed by a company controlled by Zuckerberg, leads students to reveal to their teacher personal information about themselves and their families. Conversations are recorded and the collected data sent to the company, which grants itself the right to sell it.

Categories: FLOSS Project Planets

PyCoder’s Weekly: Issue #523 (May 3, 2022)

Planet Python - Tue, 2022-05-03 15:30

#523 – MAY 3, 2022
View in Browser »

Dunder Methods in Python: The Ugliest Awesome Sauce

Double-underscore methods, also known as “dunder methods” or “magic methods” are an ugly way of bringing beauty to your code. Learn about constructors, __repr__, __str__, operator overloading, and getting your classes working with Python functions like len().
JOHN LOCKWOOD

Why Is It Important to Close Files in Python?

Model citizens use context managers to open and close file resources in Python, but have you ever wondered why it’s important to close files? In this tutorial, you’ll take a deep dive into the reasons why it’s important to close files and what can happen if you dont.
REAL PYTHON

Try atoti, A Free Collaborative Python BI Analytics Platform

atoti is a BI analytics platform combining a python library and a web application helping Quants, Data Analyst, Data Scientist and Business Users to collaborate, analyze and translate their data into business KPIs →
ACTIVEVIAM sponsor

When Python Can’t Thread: A Deep-Dive Into the GIL’s Impact

Python’s Global Interpreter Lock (GIL) stops threads from running in parallel or concurrently. Learn how to determine the impact of the GIL on your code.
ITAMAR TURNER-TRAURING

micro:bit Python Editor Beta 3 Released

MICROBIT.ORG

2022 “Call for Code” Global Challenge Accepting Entries

CALLFORCODE.ORG

Jupyter Community Workshops: Call for Proposals

JUPYTER.ORG

Discussions Python Shouldn’t Be the Top Programming Language

Discussion of the controversial article Python Is Now Top Programming Language — But Shouldn’t Be
HACKER NEWS

When Would You Use the Lambda Function?

REDDIT

Python Jobs Senior Software Engineer - Python Full Stack (USA)

Blenderbox

Gameful Learning Developer (Ann Arbor, MI, USA)

University of Michigan

Data & Operations Engineer (Ann Arbor, MI, USA)

University of Michigan

Python Technical Architect (USA)

Blenderbox

Academic Innovation Software Developer (Ann Arbor, MI, USA)

University of Michigan

Software Development Lead (Ann Arbor, MI, USA)

University of Michigan

Lead Software Engineer (Anywhere)

Right Side Up

Data Engineer (Chicago, IL, USA)

Aquatic Capital Managment

More Python Jobs >>>

Articles & Tutorials Python Testing With doctest

Python’s doctest module allows you to write unit tests through REPL-like sessions in your doc-strings. Learn how to write and execute doctest code. Also available in video.
MIKE DRISCOLL

Handling Retries in Python Requests

When coding with requests and urllib3 you can automatically retry failed connections through the use of requests.adapters.HTTPAdapter and urllib3.Retry. Don’t code retry loops manually, learn how to take advantage of the features of the libraries.
MARKKU LEINIÖ • Shared by Markku Leiniö

Merge Faster with WorkerB for PRs Chrome Extension

The average pull request sits idle for two days! Add context to your PR & merge faster with WorkerB magic links. Get estimated review time, number of changes, & related issues in one click! Install it today →
LINEARB sponsor

Understanding Train Test Split

The Train-Test-Split methodology is useful for supervised machine learning with a given data set. It helps ensure that new data is more likely to be categorized correctly. Learn how to use it with Python and scikit-learn.
MICHAEL GALARNY • Shared by Michael Galarnyk

Pagination for a User-Friendly Django App

In this tutorial, you’ll learn how to serve paginated content in your Django apps. Using Django pagination can significantly improve your website’s performance and give your visitors a better user experience.
REAL PYTHON

Code Quality Tools in Python

The article describes what code quality means and introduces some cool tools to improve your Python, including a variety of linters, formatters, and IDE tools.
DOLLAR DHINGRA • Shared by Dollar Dhingra

Notes on Debugging

All programmers have to learn how to do it, and like all skills it takes practice. Learn some hints and approaches to the bane of us all: debugging.
IONEL CRISTIAN MĂRIEȘ

CData Software — The Easiest Way to Connect Python With Data

Connect, Integrate, & Automate your data from any other application or tool in real-time, on-premise or cloud, with simple data access to more than 250 cloud applications and data sources. Learn more at cdata.com
CDATA SOFTWARE sponsor

MicroPython in Docker Containers

Want to play with MicroPython without a board? Learn how to use the Unix port of MicroPython in a Docker container to test out your code.
BHAVESH KAKWANI

Incorporating Julia Into Python Programs

Learn what you need to get Julia running inside your Python programs, using PyJulia, PyCall, and how to set up your environments.
PETER BAUMGARTNER

Projects & Code pet-python-startrek: 1977 Commodore PET Star Trek Remake

GITHUB.COM/BLOGMYWIKI

MNE: Explore and Visualize Neurophysiological Data

MNE.TOOLS

slipcover: Near Zero-Overhead Python Code Coverage Tracking

GITHUB.COM/PLASMA-UMASS

exceptionite: Make Prettier Exceptions a Cinch

GITHUB.COM/MASONITEFRAMEWORK

Real Time Multiplayer Bingo Game Using Django Channels

GITHUB.COM/LEARNINGNOOBI

Events PyCon US 2022

April 27 to May 6, 2022
PYCON.ORG

STL Python

May 4, 2022
MEETUP.COM

Weekly Real Python Office Hours Q&A (Virtual)

May 4, 2022
REALPYTHON.COM

Heidelberg Python Meetup

May 4, 2022
MEETUP.COM

Canberra Python Meetup

May 5, 2022
MEETUP.COM

PyCon Kenya Conference 2022

May 6 to May 8, 2022
PYCONKE.ORG

Happy Pythoning!
This was PyCoder’s Weekly Issue #523.
View in Browser »

[ Subscribe to 🐍 PyCoder’s Weekly 💌 – Get the best Python news, articles, and tutorials delivered to your inbox once a week >> Click here to learn more ]

Categories: FLOSS Project Planets

Drupal blog: State of Drupal presentation (April 2022)

Planet Drupal - Tue, 2022-05-03 14:55

This blog has been re-posted and edited with permission from Dries Buytaert's blog.

DrupalCon North America 2022 Driesnote presentation

Last week, 1,300 Drupalists gathered in Portland, Oregon for DrupalCon North America. It was the first in-person DrupalCon in more than two years. I can't tell you how amazing it was to see everyone face-to-face.

In good tradition, I delivered my State of Drupal keynote. You can watch the video of my keynote or download my slides (262 MB).

I covered a lot of ground in this presentation, so I broke my written summary into a three-part blog series. Part 1 below is focuses on Drupal 10 updates. I'll be publishing Part 2 and Part 3 later this week, which will focus on Drupal's evolved purpose/vision and Drupal 11 proposed initiatives.

Drupal stands with Ukraine

I couldn't begin my presentation without acknowledging the loss of life and destruction in Ukraine. It's impacting many in the Drupal community, which is heartbreaking.

You may not be aware, but Ukraine is the sixth most active country in the world in terms of Drupal contributions. If you were to look at these contributions per capita, Ukraine's contributions are even more significant.

Both myself and the Drupal Association strongly condemn the Russian attacks on Ukraine. Many of us might want to know how to help. The Drupal Association has compiled a list of organizations that are accepting charitable donations.

Updates on Drupal 10

From there, I gave an update on Drupal 10. We had targeted a Drupal 10 release date of June 2022, but we made the decision to postpone until December 2022.

We had to move the date back because we have more work to do on the CKEditor 5 migration path. We're upgrading from CKEditor 4 to CKEditor 5. CKEditor 5 is a complete rewrite, with no upgrade path or backwards compatibility.

The Drupal community (and Acquia in particular) has spent thousands of hours working on an upgrade path for CKEditor to make the upgrade easy for all Drupal users. While that has gone well, we need some additional time to work through the remaining upgrade challenges. Fortunately, we are getting great support from CKSource, the company behind CKEditor.

Next, I walked through three important facts about Drupal 10.

  1. Symfony 6.2 Drupal 10 will upgrade Symfony – a PHP framework that Drupal relies on heavily – from Symfony 4 to Symfony 6.2. At the time of the Drupal 10 release, Symfony 6.2 will be the latest and greatest release. For planning purposes, if you use Symfony components in your custom Drupal modules, you will have to upgrade those to Symfony 6.x.
  2. PHP 8.1 We have changed the minimum PHP requirement from PHP 7.4 for Drupal 9 to PHP 8.1 for Drupal 10. This is in large part because Symfony 6.2 will require PHP 8.1. Drupal users will benefit from various improvements in the new version of PHP. It also means you might have to upgrade any custom code. Because Drupal 9.3 works with PHP 8.1, you could start that work now with Drupal 9.3. It's a good way to prepare for Drupal 10.
  3. Drupal 9 end-of-life Drupal 9 end-of-life will happen in November 2023. Once Drupal 10 is released, you will have 11 months to upgrade your Drupal 9 sites to Drupal 10. The good news is, this should be the easiest upgrade in the history of Drupal. On Drupal 9's release date, 71% of deprecated API uses in contributed projects had automated conversions. Today, 93% of deprecated API uses for Drupal 10 across all contributed projects have automated conversions. And we're working on getting that even higher by the time that Drupal 10 is released.

With that, I provided some exciting updates on the five major Drupal 10 initiatives.

Olivero

Drupal's new frontend theme, named Olivero, is now stable. It's the most accessible theme we've ever shipped. During DrupalCon, Olivero also became the default theme for Drupal 10. Everyone who installs Drupal 10 will be greeted by a new frontend theme. That is significant because we used the current default theme, Bartik, for 11 years.

Claro

Drupal's new backend theme, called Claro, also became the new default administration theme at DrupalCon. Another major milestone and reason to celebrate!

Starterkit

Starterkit, a new way of creating themes in Drupal, is on track to be stable by Drupal 10's new release date. Releasing Starterkit means that we can move faster with theming improvements in Drupal Core. It also means that end users won't need to worry about whether upgrading Drupal breaks any of their sites' themes.

Instead of sub-theming a core base theme, Starterkit generates a starter theme for you from its latest defaults. This new theme will be more of a clone or fork, and will not have a runtime dependency on a core base theme.

CKEditor 5

We have made great progress on our content authoring experience. Check out this video for the latest update:

Automated updates

Automated updates, the Drupal community's number one feature request, is progressing well.

The plan is to have Automatic Updates in one of the first minor versions of Drupal 10, or even in 10.0 in December if the community can help us test and finalize it in time. Check out this video to learn more:

In Parts 2 and 3 of this blog series later this week, I'll focus on our strategy and proposed initiatives for Drupal 11.

I'd like to thank everyone who made our first in-person DrupalCon in two years a reality. It was amazing to see everyone's faces again and collaborate in person. Your contributions and hard work, as always, are inspiring to me!

I would also like to thank all the people that helped with my keynote. In no particular order, they are: Ash SullivanAlex BronsteinMatthew GrasmickGábor HojtsyJess (xjm)Ted BowmanBaddý Sonja BreidertLeslie GlynnTim LehnenAdam BergsteinAdam GoodmanThéodore Biadala, and Alex Pott.

Categories: FLOSS Project Planets

Steve Kemp: A plea for books ..

Planet Debian - Tue, 2022-05-03 13:15

Recently I've been getting much more interested in the "retro" computers of my youth, partly because I've been writing crazy code in Z80 assembly-language, and partly because I've been preparing to introduce our child to his first computer:

  • An actual 1982 ZX Spectrum, cassette deck and all.
    • No internet
    • No hi-rez graphics
    • Easily available BASIC
    • And as a nice bonus the keyboard is wipe-clean!

I've got a few books, books I've hoarded for 30+ years, but I'd love to collect some more. So here's my request:

  • If you have any books covering either the Z80 processor, or the ZX Spectrum, please consider dropping me an email.

I'd be happy to pay €5-10 each for any book I don't yet own, and I'd also be more than happy to cover the cost of postage to Finland.

I'd be particularly pleased to see anything from Melbourne House, and while low-level is best, the coding-books from Usbourne (The Mystery Of Silver Mountain, etc, etc) wouldn't go amiss either.

I suspect most people who have collected and kept these wouldn't want to part with them, but just in case ..

Categories: FLOSS Project Planets

Gunnar Wolf: Using a RPi as a display adapter

Planet Debian - Tue, 2022-05-03 12:16

Almost ten months ago, I mentioned on this blog I bought an ARM laptop, which is now my main machine while away from home — a Lenovo Yoga C630 13Q50. Yes, yes, I am still not as much away from home as I used to before, as this pandemic is still somewhat of a thing, but I do move more.

My main activity in the outside world with my laptop is teaching. I teach twice a week, and… well, having a display for my slides and for showing examples in the terminal and such is a must. However, as I said back in August, one of the hardware support issues for this machine is:

No HDMI support via the USB-C displayport. While I don’t expect to go to conferences or even classes in the next several months, I hope this can be fixed before I do. It’s a potential important issue for me.

It has sadly… not yet been solved ☹ While many things have improved since kernel 5.12 (the first I used), the Device Tree does not yet hint at where external video might sit.

So, I went to the obvious: Many people carry different kinds of video adaptors… I carry a slightly bulky one: A RPi3 😐

For two months already (time flies!), I had an ugly contraption where the RPi3 connected via Ethernet and displayed a VNC client, and my laptop had a VNC server. Oh, but did I mention — My laptop works so much better with Wayland than with Xorg that I switched, and am now a happy user of the Sway compositor (a drop-in replacement for the i3 window manager). It is built over WLRoots, which is a great and (relatively) simple project, but will thankfully not carry some of Gnome or KDE’s ideas — not even those I’d rather have. So it took a bit of searching; I was very happy to find WayVNC, a VNC server for wlroot-sbased Wayland compositors. I launched a second Wayland, to be able to have my main session undisturbed and present only a window from it.

Only that… VNC is slow and laggy, and sometimes awkward. So I kept searching for something better. And something better is, happily, what I was finally able to do!

In the laptop, I am using wf-recorder to grab an area of the screen and funnel it into a V4L2 loopback device (which allows it to be used as a camera, solving the main issue with grabbing parts of a Wayland screen):

/usr/bin/wf-recorder -g '0,32 960x540' -t --muxer=v4l2 --codec=rawvideo --pixelformat=yuv420p --file=/dev/video10

(yes, my V4L2Loopback device is set to /dev/video10). You will note I’m grabbing a 960×540 rectangle, which is the top ¼ of my screen (1920x1080) minus the Waybar. I think I’ll increase it to 960×720, as the projector to which I connect the Raspberry has a 4×3 output.

After this is sent to /dev/video10, I tell ffmpeg to send it via RTP to the fixed address of the Raspberry:

/usr/bin/ffmpeg -i /dev/video10 -an -f rtp -sdp_file /tmp/video.sdp rtp://10.0.0.100:7000/

Yes, some uglier things happen here. You will note /tmp/video.sdp is created in the laptop itself; this file describes the stream’s metadata so it can be used from the client side. I cheated and copied it over to the Raspberry, doing an ugly hardcode along the way:

user@raspi:~ $ cat video.sdp v=0 o=- 0 0 IN IP4 127.0.0.1 s=No Name c=IN IP4 10.0.0.100 t=0 0 a=tool:libavformat 58.76.100 m=video 7000 RTP/AVP 96 b=AS:200 a=rtpmap:96 MP4V-ES/90000 a=fmtp:96 profile-level-id=1

People familiar with RTP will scold me: How come I’m streaming to the unicast client address? I should do it to an address in the 224.0.0.0–239.0.0.0 range. And it worked, sometimes. I switched over to 10.0.0.100 because it works, basically always ☺

Finally, upon bootup, I have configured NoDM to start a session with the user user, and dropped the following in my user’s .xsession:

setterm -blank 0 -powersave off -powerdown 0 xset s off xset -dpms xset s noblank mplayer -msglevel all=1 -fs /home/usuario/video.sdp

Anyway, as a result, my students are able to much better follow the pace of my presentation, and I’m able to do some tricks better (particularly when it requires quick reaction times, as often happens when dealing with concurrency and such issues).

Oh, and of course — in case it’s of interest to anybody, knowing that SD cards are all but reliable in the long run, I wrote a vmdb2 recipe to build the images. You can grab it here; it requires some local files to be present to be built — some are the ones I copied over above, and the other ones are surely of no interest to you (such as my public ssh key or such :-] )

What am I still missing? (read: Can you help me with some ideas? 😉)

  • I’d prefer having Ethernet-over-USB. I have the USB-C Ethernet adapter, which powers the RPi and provides a physical link, but I’m sure I could do away with the fugly cable wrapped around the machine…
  • Of course, if that happens, I would switch to a much sexier Zero RPi. I have to check whether the video codec is light enough for a plain ol’ Zero (armel) or I have to use the much more powerful Zero 2… I prefer sticking to the lowest possible hardware!
  • Naturally… The best would be to just be able to connect my USB-C-to-{HDMI,VGA} adapter, that has been sitting idly… 😕 One day, I guess…

Of course, this is a blog post published to brag about my stuff, but also to serve me as persistent memory in case I need to recreate this…

Categories: FLOSS Project Planets

Dries Buytaert: State of Drupal presentation (April 2022)

Planet Drupal - Tue, 2022-05-03 11:15

Last week, 1,300 Drupalists gathered in Portland, Oregon for DrupalCon North America. It was the first in-person DrupalCon in more than two years. I can't tell you how amazing it was to see everyone face-to-face.

In good tradition, I delivered my State of Drupal keynote. You can watch the video of my keynote or download my slides (262 MB).

I covered a lot of ground in this presentation, so I broke down my written summary into a three-part blog series. Part 1 below focuses on Drupal 10 updates. I'll be publishing Part 2 and Part 3 later this week, which will focus on Drupal's evolved purpose/vision and Drupal 11 proposed initiatives.

Drupal stands with Ukraine

I couldn't begin my presentation without acknowledging the loss of life and destruction in Ukraine. It's impacting many in the Drupal community, which is heartbreaking.

You may not be aware, but Ukraine is the sixth most active country in the world in terms of Drupal contributions. If you were to look at these contributions per capita, Ukraine's contributions are even more significant.

Both myself and the Drupal Association strongly condemn the Russian attacks on Ukraine. Many of us might want to know how to help. The Drupal Association has compiled a list of organizations that are accepting charitable donations.

Updates on Drupal 10

From there, I gave an update on Drupal 10. We had targeted a Drupal 10 release date of June 2022, but we made the decision to postpone until December 2022.

We had to move the date back because we have more work to do on the CKEditor 5 migration path. We're upgrading from CKEditor 4 to CKEditor 5. CKEditor 5 is a complete rewrite, with no upgrade path or backwards compatibility.

The Drupal community (and Acquia in particular) has spent thousands of hours working on an upgrade path for CKEditor to make the upgrade easy for all Drupal users. While that has gone well, we need some additional time to work through the remaining upgrade challenges. Fortunately, we are getting great support from CKSource, the company behind CKEditor.

Next, I walked through three important facts about Drupal 10.

  1. Symfony 6.2 Drupal 10 will upgrade Symfony – a PHP framework that Drupal relies on heavily – from Symfony 4 to Symfony 6.2. At the time of the Drupal 10 release, Symfony 6.2 will be the latest and greatest release. For planning purposes, if you use Symfony components in your custom Drupal modules, you will have to upgrade those to Symfony 6.x.
  2. PHP 8.1 We have changed the minimum PHP requirement from PHP 7.4 for Drupal 9 to PHP 8.1 for Drupal 10. This is in large part because Symfony 6.2 will require PHP 8.1. Drupal users will benefit from various improvements in the new version of PHP. It also means you might have to upgrade any custom code. Because Drupal 9.3 works with PHP 8.1, you could start that work now with Drupal 9.3. It's a good way to prepare for Drupal 10.
  3. Drupal 9 end-of-life Drupal 9 end-of-life will happen in November 2023. Once Drupal 10 is released, you will have 11 months to upgrade your Drupal 9 sites to Drupal 10. The good news is, this should be the easiest upgrade in the history of Drupal. On Drupal 9's release date, 71% of deprecated API uses in contributed projects had automated conversions. Today, 93% of deprecated API uses for Drupal 10 across all contributed projects have automated conversions. And we're working on getting that even higher by the time that Drupal 10 is released.

With that, I provided some exciting updates on the five major Drupal 10 initiatives.

Olivero

Drupal's new frontend theme, named Olivero, is now stable. It's the most accessible theme we've ever shipped. During DrupalCon, Olivero also became the default theme for Drupal 10. Everyone who installs Drupal 10 will be greeted by a new frontend theme. That is significant because we used the current default theme, Bartik, for 11 years.

Claro

Drupal's new backend theme, called Claro, also became the new default administration theme at DrupalCon. Another major milestone and reason to celebrate!

Starterkit

Starterkit, a new way of creating themes in Drupal, is on track to be stable by Drupal 10's new release date. Releasing Starterkit means that we can move faster with theming improvements in Drupal Core. It also means that end users won't need to worry about whether upgrading Drupal breaks any of their sites' themes.

Instead of sub-theming a core base theme, Starterkit generates a starter theme for you from its latest defaults. This new theme will be more of a clone or fork, and will not have a runtime dependency on a core base theme.

CKEditor 5

We have made great progress on our content authoring experience. Check out this video for the latest update:

Automated updates

Automated updates, the Drupal community's number one feature request, is progressing well.

The plan is to have Automatic Updates in one of the first minor versions of Drupal 10, or even in 10.0 in December if the community can help us test and finalize it in time. Check out this video to learn more:

In Parts 2 and 3 of this blog series later this week, I'll focus on our strategy and proposed initiatives for Drupal 11.

I'd like to thank everyone who made our first in-person DrupalCon in two years a reality. It was amazing to see everyone's faces again and collaborate in person. Your contributions and hard work, as always, are inspiring to me!

I would also like to thank all the people that helped with my keynote. In no particular order, they are: Ash Sullivan, Alex Bronstein, Matthew Grasmick, Gábor Hojtsy, Jess (xjm), Ted Bowman, Baddý Sonja Breidert, Leslie Glynn, Tim Lehnen, Adam Bergstein, Adam Goodman, Théodore Biadala, and Alex Pott.

Categories: FLOSS Project Planets

Mike Driscoll: Announcing: The Python 101 Video Course

Planet Python - Tue, 2022-05-03 10:15

I am happy to announce that I am creating a Python 101 video course, which is based on Python 101: 2nd Edition.

The course will eventually include videos that cover the chapters in the books. It is launching with 13 videos that run 168+ minutes!

The following link will give you $10 off!

Purchase Now

What You Get
  • 13 videos (with lots more to come)
  • Companion Jupyter Notebook files
  • Python 101: 2nd Edition (PDF, epub, mobi)
Purchase Now

The post Announcing: The Python 101 Video Course appeared first on Mouse Vs Python.

Categories: FLOSS Project Planets

Real Python: Testing Your Code With pytest

Planet Python - Tue, 2022-05-03 10:00

Testing your code brings a wide variety of benefits. It increases your confidence that the code behaves as you expect and ensures that changes to your code won’t cause regressions. Writing and maintaining tests is hard work, so you should leverage all the tools at your disposal to make it as painless as possible. pytest is one of the best tools you can use to boost your testing productivity.

In this video course, you’ll learn:

  • What benefits pytest offers
  • How to ensure your tests are stateless
  • How to make repetitious tests more comprehensible
  • How to run subsets of tests by name or custom groups
  • How to create and maintain reusable testing utilities

[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

Categories: FLOSS Project Planets

LabPlot 2.9 released

Planet KDE - Tue, 2022-05-03 08:02
LabPlot 2.9 released

After a long development and additional testing and beta phases, we’re happy to announce the availability of the next release of LabPlot. In this release we’re bringing again a significant amount of new features and improvements in different areas of LabPlot. The major new features are introduced further below. For more detailed review of the changes in the new release we refer to our ChangeLog file.

In addition to the new functionality added in 2.9, the users will benefit from performance improvements when importing and plotting big amount of data. With this we want to address the needs of users who need to plot several millions of data points and more will come for this in future.

As usual, the source code of LabPlot, the Flatpak and Snap packages for Linux as well as the installer for Windows and the image for macOS are available on our download page.

We’re always interested in user’s feedback and invite everybody who wants to discuss the currently available features or features that should be added in the future releases to join our Matrix Room and to get in touch with us.

What’s new in 2.9? Color Maps and Conditional Formatting

A collection of multiple well-known color maps and conditional formatting of the data in the spreadsheet

Read More Box Plot

New visualization type – box plot – providing a quick summary of the basic statistical properties of the data set

Read More Multi-Axes

Plot the data against multiple and different axes

Read More Info and Image Elements

New worksheet elements to annotate curve data point and to show images on the worksheet.

Read More Column Statistics

Get insights into the structure of your data and its statistical properties directly in the spreadsheet. A new dialog to show the …

Read More Hilbert Transform

Added Hilbert transform to the set of analysis functions

Read More MATLAB, SAS, Stata and SPSS formats

Support for new data formats widely used in scientific communities

Read More
Categories: FLOSS Project Planets

EuroPython: EuroPython April 2022 Newsletter

Planet Python - Tue, 2022-05-03 07:40

Hello fellow Pythonistas,

We hope you all are enjoying the longer daylight and the warmer weather that April has brought to us (in the northern hemisphere anyway). April also brings a new newsletter packed with updates!
We are just over 70 days until the conference and our volunteers are working hard to put together the best EuroPython ever. Without further ado, here is our update.

📝EuroPython Society Update✈Visa

If you are planning to attend EuroPython in person, you might need a visa to enter Ireland. As a note, Ireland is part of the EU but it is outside of the Schengen zone. This means if you are from outside of the EU but you have a Schengen visa, you may still need a visa to get in.

Please, double check your case and make sure you have all the documentation in order before travelling to Ireland. If the visa process requires a support letter, we can do that too! Just head to https://ep2022.europython.eu/visa to request the support letter for your visa application!

🚸Childcare service

If you would like to attend EuroPython in person but worry about childcare, fear not, because we have the right solution for you!

We will be providing childcare service at the venue. The best part is that the service is free! Make sure to specify how many children will require childcare and we will take care of them, well, not we, but qualified professionals.

Also keep in mind that we are planning a family friendly mini Makers Fest. Now you have no excuses, you can bring your kids and hack a project together!

🍀EuroPython 2022 Conference Update📜Programme

The Call for Proposal closed on April 3rd and we are excited to announce that we received a record breaking 429 proposals! Thanks to all the submitters for their time and effort in giving us so much to look forward to.

After closing the CfP we kicked-off 2 parallel reviews of these proposals:

  • Community voting
  • Panel review

The community voting closed in the third week of April and we were amazed by the community response: there were a whopping 24000 votes!! This superseded all our expectations and we’d like to thank everyone for putting in the time to cast their votes!

Parallely, 35 experienced reviewers have put in ~700 reviews across all our proposals. The programme team will run another round of reviews once the first round acceptances are sent out.

The programme team is now consolidating communities&apos preference and panel feedback to curate talks fit for the first round of acceptances.

🔥Panel discussions @ EuroPython

The programme team is working double time to put together collaborations to engage with the broader community. One such collaboration is with the core developers to put together a panel discussion on all things CPython and beyond. They are working hard to iron out the details of the panel. More details soon.

P.S. All of our Early Bird tickets are now sold out. We’re only left with 7 education tickets!

🚨Feeling the FOMO? Grab your ticket to EuroPython now!! https://ep2022.europython.eu/tickets🚀Financial Aid

Towards our commitment to diversity & inclusion, we’re running a Financial Aid Programme to help individuals who would otherwise not be able to attend/speak at the conference. If you need help attending the conference, don’t hesitate to apply for help: https://europython.eu/finaid

👋The Finaid team will make every effort to send a decision on applicants who need to apply for a visa. Got any questions? Hit us up at finaid@europython.eu💶Call for Sponsors

Big shoutout to our first confirmed sponsors Sendcloud, Ebury and Channable! Thank you for your support and we cannot wait to see you at your booths!

We are privileged to have many other fantastic companies who are interested in sponsoring EuroPython this year.

🔍We are still looking for a Keystone sponsor. Could your company be the next Keystone sponsor and achieve the highest visibility at one of the largest and most diverse Python communities? 

Apart from the standard sponsor packages, there are so many other ways you can support the conference: be a childcare or Financial Aid sponsor, help us organise a Django Girls Workshop, or sponsor a gourmet coffee stall for a day! You can find out all the fantastic standalone options here.

If you are interested in sponsoring EuroPython 2022, head to https://ep2022.europython.eu/sponsor and dig into the details of every sponsorship level.

If you still have questions, write to us at sponsoring@europython.eu

❣Irish Community Mixer @ Dublin

Ireland thrives with communities and EuroPython wouldn’t be the same without the support of these Community Partners:

  • Coding Grace
  • Codú Community
  • Dublin Data Science
  • Dublin Linux Community
  • Dublin Linux Developers
  • Farset Labs (Hackerspace)
  • GDG Belfast
  • PyBelfast
  • PyLadies Dublin
  • Python Ireland
  • Tog Hackerspace
  • Women in AI Ireland
  • Women Who Code Belfast
  • Women Who Code Dublin

The ever-growing list of Community Partners can be found at https://ep2022.europython.eu/community-partners

🗣Events @ EuroPython

EuroPython is much more than *just* training, talks & keynotes. Every year we run multiple varied events for our community and this year is no exception. Read on below to get a glimpse of what’s waiting for you in Dublin!

🥙Community Mixer Lunch @ Dublin

Organisers of community conferences and events across Europe, we invite you to grab lunch with us in Dublin! Let’s all get together, share our joys and pains of running events. In our experience conversations flow better with a nice meal in front. Join us to share ideas and cultivate cross community relationships.

The lunch is planned for 14 or 15 July. Watch this space!

👧Django Girls Workshop

If you identify as a woman and want to learn how to make websites, we have good news for you! We are holding a one-day workshop for beginners!

It will take place on Monday 11th July at Convention Centre Dublin in the heart of Dublin city: https://djangogirls.org/en/dublin/  

Applications to attend are open until July 2nd. We&aposve only got 30 slots, don&apost waste for the last minute!!

If you are a Django expert, then consider joining us as a coach? Submit your interest via this form, and we will be in touch. Any other questions, contact us on dublin@djangogirls.org.

Please note that you do not need to have a EuroPython conference ticket to attend Django Girls workshop.

Makers Fest

Learning new libraries and new features of Python is great. But, what about showing off cool things you’ve been working on, running a demo or simply talking about a pet project you’re passionate about? If you’re a Maker, Educator, or just someone who is interested in breaking and building things, then this fest is for you!!

There are no limits to the shape of the project: this could be an automation put together with Raspberry Pi, or an AI powered music composer. Bottom-line, any and every project is encouraged.

Register your interest by filling out this form: https://forms.gle/xTdpFJ2rV8iqmMCb9

🤗Trans*Code

After nearly 3 years of virus hiatus, Trans*Code will be returning! We are delighted that EuroPython will be hosting a Trans*Code event in Dublin in July!

Trans*Code is an international hack event series focused solely on drawing attention to transgender issues and opportunities. Trans*Code events aim to help draw attention to transgender issues through informal, topic-focused hackdays. Coders, designers, activists, and community members not currently working in technology are also encouraged to participate.

It is a free full day workshop & hackday open to trans and non-binary folk, allies, coders, designers and visionaries of all sorts. Stay tuned for more details.

Beginners Day

If you are new to Python or you are not so familiar with it, don’t worry: we’ve got you covered. Join us at Beginner&aposs Day: a day to cover the basics of Python so you can fully enjoy the conference ahead.

Please bear with us while we define the bells and whistles of this workshop including how to join. Stay tuned!

💡Pew Pew Workshop

Following the huge fun and success of the PewPew workshop at EuroPython 2019, you have a chance again to join the PewPew game console creator, Radomir Dopieralski, who will be running a workshop on how to program PewPew with CircuitPython.

If you are an experienced developer, we are looking for 2 more coaches to run the workshop. Please drop us an email at programme@europython.eu

💖EuroPython @ PyCon US

PyCon US just wound up and some of our EuroPython team members (Cheuk Ting Ho, Naomi Ceder, Patrick Armino, Sangarshanan Veera, Sebastian Zeeff) attended & presented at the conference. Here are some captures from the conference (in no particular order):

Did you come across them during the hallway track or enjoyed their talks? Let them & us know on twitter or email!

🎗️Upcoming Events🗓️If you have a cool Python event and want to be featured, hit the reply button and write to us!Python Ireland Monthly Meetup

Next Python Ireland Monthly meetup will be held on Wed 11th May, 6:30PM to 8:30PM and it will be online.

The speaker is Jeremiah Paige and he will talk about “Invisible Walls: Isolating Your Python”: Stop building projects that only "work on my machine", Learn how to isolate your python application by executing in an isolated, reproducible environment that extends beyond the code you write.

More details of the event can be found here: https://www.meetup.com/pythonireland/events/kqwjvrydchbpb/

PyLadies Dublin May Meetup

The next PyLadies Dublin meetup will be on Tue 21st May, a collaboration with Women in AI Ireland showcasing projects from the recent WaiPRACTICE programme. This will be our first in-person event since Covid restrictions 2 years ago, and will be hosted by Dogpatch Labs. Food will be provided thanks to Inscribe AI.

More details: https://www.meetup.com/PyLadiesDublin/events/285567337/

TOG Hackerspace (Dublin)

It’s “Bring your laptop to TOG’s Open Coding Night” on Tue 3rd May.

More details: https://www.meetup.com/Tog-Dublin-Hackerspace/events/ggzmtsydchbfb/

Cambridge Python User Group

At this virtual event on Tue 3rd May, Alexandre Faget will be leading a session on testing with pytest.

More details: https://www.meetup.com/CamPUG/events/285277862/

PyLadies Berlin Meetup

The next PyLadies Berlin meetup will be on Tue May 17 with talks from “Exploring our community” by Jessica Greene, “Reproducible machine learning projects with DVC and Poetry” by Doreen and “Python’s tale of concurrency” by Pradhvan Bisht.

Details: https://www.meetup.com/PyLadies-Berlin/events/285313817/

🌍Special Past Event RecapPyCamp - to go camping in the pythonic way 🐍

Nature, OSS, and Python friends - this defines what PyCamp is.

After many years of PyCamping events in Argentina, the event had its first edition in Europe this year. The event counted with 25 people spending 4 days together doing what they love the most - collaborating with others through code. The location chosen was the beautiful region of Girona near Barcelona, Spain. Surrounded by nature, our pythonistas could choose any project or workshop to participate in.

From translating Japanese mangas to building bots and making music with Python, the projects were interesting and fun. If no project is of your taste, you can always propose one yourself. Not a Pythonista yourself? No problem at all. In this edition, we had people talking about DevOps tools and JavaScript frameworks, so feel free to bring different topics to the camp. The evenings were fulfilled with games, karaoke, and good chats. Living and collaborating with others makes without saying a true community event. So see you next PyCamp?

🐍Cool Python & Friends Projects📢Know a cool Python project? Hit the reply button and write to us!

Memray - Memray is a memory profiler for Python. It can track memory allocations in Python code, in native extension modules, and in the Python interpreter itself.

Goey - Turn (almost) any Python 3 Console Program into a GUI application with one line.

Polars - Polars is a blazingly fast DataFrames library implemented in Rust using Apache Arrow Columnar Format as a memory model.

DeepMind AUX - AUX, built on top of JAX, provides audio processing functions and tools to JAX. It is a sister library of PIX designed for image processing in JAX. Likewise, all operations in AUX can be optimised through jax.jit

PyScript - PyScript is a Pythonic alternative to Scratch, JSFiddle or other "easy to use" programming frameworks, making the web a friendly, hackable, place where anyone can author interesting and interactive applications.

Categories: FLOSS Project Planets

Season of KDE 2022 - Conclusion

Planet KDE - Tue, 2022-05-03 05:15

By Johnny Jazeix



Another year, another successful Season of KDE!

In Season of KDE 2022, seven candidates took on and completed projects that helped them learn about Open Source and also expanded their knowledge of how software is created, managed, packaged and distributed; how to create features to applications aimed at end users; about the ever-pressing need for more efficient and eco-friendly software; and much more.

The Projects

Ayush Singh worked on writing a Rust wrapper for the KConfig KDE Framework. KConfig simplifies the process of writing values to, and reading options from an app's configuration file. Ayush's project will allow developers to use KConfig in Rust projects without having to write C++ code. Ayush wrote several posts explaining which bindings and features are now complete and can be used directly in Rust.

Talking of writing apps, Samarth Raj added a new activity to GCompris. GCompris is a suite of educational activities for children from the ages of 2 to 10, and is used widely in schools and homes all over the world. Samarth's activity helps kids differentiate between the left and right mouse click. It does so by encouraging the child to click on 2 different animals (a horse and a monkey). By using either the left or right button on the mouse, the child can then make each of the animals go to their respective homes (a stable and a tree).


A new activity in GCompris helps toddlers learn to use the mouse.

Samarth relates his journey in his blog and says that, although he had previous experience with HTML, CSS, and Javascript, he thought SoK was a great opportunity to learn about open source, and gain some confidence using Qt/Qml.

Another new feature in an existing application is the Perspective Ellipse Assistant tool Srirupa Datta worked on for Krita. Krita is KDE's design and painting program and the ellipse assistant tool will help artists draw ellipses easier.

The tool is still a work in progress, and you can follow up on how it is going on Srirupa's blog.


The ellipse assistant tool will help artists draw ellipses easier.

KDE apps are not only available for Linux. In fact, many projects are making an effort to reach all users regardless of the platform they are on, and Stefan Kowalczyk worked on improving KDE Connect on iOS, Apple's mobile phone and tablet operating system.

iOS has the particularity that it can only display one alert at a time. This means that when KDE Connect raised multiple alerts at the same time, only one was being shown. Stefan's project aims to queue the alerts and avoid the user from losing information.

The code has been merged. If you are an iOS user and would like to use KDE Connect on your phone, you may want to read more about this SoK, and follow the progress of the project.

For Stefan "[...] it has been a great opportunity to learn more about iOS development and work with a community-driven open source project. [...] SoK was the thing I needed to finally contribute to the Open Source community".

Building new applications and new features into applications is fine, but then comes the problem of delivering them to the users. Flatpak is becoming an increasingly popular way of distributing software to users and Snehit Sah packaged several KDE applications for Flatpak and is implementing continuous integration for Flatpak packages.

Snehit says "I almost jumped to the ceiling when I saw the word "packaging". [...] I've never worked with Flatpak before, but I have a basic understanding of packaging, and it is in fact one of the things I take a lot of interest in". Snehit also remarks on how Season of KDE was a great booster to his experience.

To find out about all the applications that Snehit updated, check out his blog.

In similar news, Suhaas Joshi has been working on displaying the permissions for Flatpak applications in the Discover interface. This will tell users what they can expect the application to require, like read/write permissions to access the storage, or location data, and so on.


Flatpak package permissions in Discover.

Apart from guaranteeing users' freedom and privacy, KDE strives to reduce the carbon footprint of its apps by improving their energy efficiency. Karanjot Singh worked with the KDE Eco team to prepare Standard Usage Scenarios for measuring the energy consumption of various text editors and developed a script for Kate.

Karanjot Singh remarked on how he learned a lot about working with different automation tools, and creating standard usage scenarios for different applications and frameworks, a skill that will come in handy in the future.

About Season of KDE

Season of KDE allows everyone to participate in the KDE ecosystem, and helps newcomers from all backgrounds, students or not, to start contributing to the open source community. To encourage a wide range of skills, the tasks candidates carry out are not limited to coding, but can also cover graphic design, documentation, systems administration, workflow optimization, packaging and distribution, promotion, etc.

Starting to contribute to an open source project is not easy, and organizations like KDE, with its thousands of contributors and a long list of products, may seem intimidating. That is why Season of KDE exists: to make this step easy.

Through Season of KDE, we welcome newcomers and help them become part of the community, while providing them with a mentorship that will help them learn and improve new skills. SoK participants carry out meaningful tasks that elevate our software and services and have an impact on millions of users.

Categories: FLOSS Project Planets

Python Bytes: #282 Don't Embarrass Me in Front of The Wizards

Planet Python - Tue, 2022-05-03 04:00
<p><strong>Watch the live stream:</strong></p> <a href='https://www.youtube.com/watch?v=tOA5uJthE14' style='font-weight: bold;'>Watch on YouTube</a><br> <br> <p><strong>About the show</strong></p> <p>Sponsored by us! Support our work through:</p> <ul> <li>Our <a href="https://training.talkpython.fm/"><strong>courses at Talk Python Training</strong></a></li> <li><a href="https://testandcode.com/"><strong>Test &amp; Code</strong></a> Podcast</li> <li><a href="https://www.patreon.com/pythonbytes"><strong>Patreon Supporters</strong></a></li> </ul> <p><strong>Brian #1:</strong> <a href="https://www.pyscript.net/"><strong>pyscript</strong></a></p> <ul> <li>Python in the browser, from Anaconda. <a href="https://github.com/pyscript/pyscript">repo here</a></li> <li>Announced at PyConUS</li> <li>“During a keynote speech at PyCon US 2022, Anaconda’s CEO Peter Wang unveiled quite a surprising project — <a href="https://pyscript.net/">PyScript</a>. It is a JavaScript framework that allows users to create Python applications in the browser using a mix of Python and standard HTML. The project’s ultimate goal is to allow a much wider audience (for example, front-end developers) to benefit from the power of Python and its various libraries (statistical, ML/DL, etc.).” from a nice article on it, <a href="https://towardsdatascience.com/pyscript-unleash-the-power-of-python-in-your-browser-6e0123c6dc3f"><strong>PyScript — unleash the power of Python in your browser</strong></a></li> <li>PyScript is built on <a href="https://pyodide.org/en/stable/">Pyodide</a>, which is a port of CPython based on WebAssembly.</li> <li>Demos are cool. </li> <li>Note included in README: “This is an extremely experimental project, so expect things to break!”</li> </ul> <p><strong>Michael #2:</strong> <a href="https://github.com/bloomberg/memray"><strong>Memray from Bloomberg</strong></a></p> <ul> <li>Memray is a memory profiler for Python. </li> <li>It can track memory allocations in <ul> <li>Python code</li> <li>native extension modules</li> <li>the Python interpreter itself</li> </ul></li> <li>Works both via CLI and focused app calls</li> <li>Memray can help with the following problems: <ul> <li>Analyze allocations in applications to help discover the cause of high memory usage.</li> <li>Find memory leaks.</li> <li>Find hotspots in code which cause a lot of allocations.</li> </ul></li> <li>Notable features: <ul> <li>🕵️‍♀️ Traces every function call so it can accurately represent the call stack, unlike sampling profilers.</li> <li>ℭ Also handles native calls in C/C++ libraries so the entire call stack is present in the results.</li> <li>🏎 Blazing fast! Profiling causes minimal slowdown in the application. Tracking native code is somewhat slower, but this can be enabled or disabled on demand.</li> <li>📈 It can generate various reports about the collected memory usage data, like flame graphs.</li> <li>🧵 Works with Python threads.</li> <li>👽🧵 Works with native-threads (e.g. C++ threads in native extensions)</li> </ul></li> <li><a href="https://bloomberg.github.io/memray/run.html#id3"><strong>Has a live view in the terminal</strong></a>.</li> <li>Linux only</li> </ul> <p><strong>Brian #3:</strong> <a href="https://github.com/browsertron/pytest-parallel"><strong>pytest-parallel</strong></a></p> <ul> <li>I’ve often sped up tests that can be run in parallel by using -n from pytest-xdist.</li> <li>I was recommending this to someone on Twitter, and Bruno Oliviera suggested a couple of alternatives. One was pytest-parallel, so I gave it a try.</li> <li>pytest-xdist runs using multiprocessing</li> <li>pytest-parallel uses both multiprocessing and multithreading.</li> <li>This is especially useful for test suites containing threadsafe tests. That is, mostly, pure software tests.</li> <li>Lots of unit tests are like this. System tests are often not.</li> <li>Use <code>--workers</code> flag for multiple processors, <code>--workers auto</code> works great.</li> <li>Use <code>--tests-per-worker</code> for multi-threading. <code>--tesst-per-worker auto</code> let’s it pick.</li> <li>Very cool alternative to xdist.</li> - </ul> <p><strong>Michael #4:</strong> <a href="https://www.fatiando.org/pooch/v1.6.0/index.html"><strong>Pooch: A friend for data files</strong></a></p> <ul> <li>via via Matthew Fieckert</li> <li>Just want to download a file without messing with <code>requests</code> and <code>urllib</code>?</li> <li>Who is it for? Scientists/researchers/developers looking to simply download a file.</li> <li>Pooch makes it easy to download a file (one function call). On top of that, it also comes with some bonus features: <ul> <li>Download and cache your data files locally (so it’s only downloaded once).</li> <li>Make sure everyone running the code has the same version of the data files by verifying cryptographic hashes.</li> <li>Multiple download protocols HTTP/FTP/SFTP and basic authentication.</li> <li>Download from Digital Object Identifiers (DOIs) issued by repositories like figshare and Zenodo.</li> <li>Built-in utilities to unzip/decompress files upon download</li> </ul></li> <li><code>file_path = pooch.retrieve(url)</code></li> </ul> <p><strong>Extras</strong> </p> <p>Michael:</p> <ul> <li>New course! <a href="https://training.talkpython.fm/courses/up-and-running-with-git-a-pragmatic-ui-based-introduction"><strong>Up and Running with Git - A Pragmatic, UI-based Introduction</strong></a>.</li> </ul> <p><strong>Joke:</strong> </p> <ul> <li><a href="https://www.reddit.com/r/ProgrammerHumor/comments/uh8rsb/happens_to_the_best_of_us/"><strong>Don’t embarrass me in front of the wizards</strong></a></li> <li>Michael’s <a href="https://twitter.com/mkennedy/status/1520181145261928448"><strong>crashing github</strong></a> is embarrassing him in front of the wizards!</li> </ul>
Categories: FLOSS Project Planets

Tryton News: Tryton Release 6.4

Planet Python - Tue, 2022-05-03 02:00

We are proud to announce the 6.4 release of Tryton.
This release provides many bug fixes, performance improvements and some fine tuning. What is also remarkable is the addition of 9 new modules.
You can give it a try on the demo server, use the docker image or download it here.
As usual migration from previous series is fully supported. No manual operations are required.

Here is a list of the most noticeable changes:

Changes for the User

It is now possible for modules to display a notification message from the server while user is filling a form. This is already used by the sale_stock_quantity module to display a message when user select a product with not enough forecast quantity.

Users can now choose which optional columns are display on the list or tree views. All modules have been reviewed to make optional none essential columns and thus provide a lean interface by default.

Some views can now be used for edition but not creation of new record. This can be used for example to set an editable list for modification but creation must always go through the form.

The CSV import now skip empty rows inside One2Many. It is now possible to import many One2Many fields in the same file but with different length.

The CSV import error messages have been improved to include the model, field an column. This eases the task of solving problems.

More (click for more details) Web Client

The reference fields can now be opened from the list and tree views like the Many2One. They are rendered as a link which open a new tab with the form of the target.

Desktop Client

The CSV export encoded in UTF-8 include by default the Byte Order Mark to increase compatibility with other systems.

The multi-selection widget uses now the same default selection behavior as other list. This solves inconsistency in the behavior.

Accounting

The reconciliation wizard has now an option to automatically reconcile the default suggestions. This speed up the process for accounting with a lot of entries when the system is well configured.

Similar to the debit type, we now have also an optional credit type on account. Of course an accountant can only have one optional debit or credit type.

The general ledger displays now by default only the debit/credit columns only when there are actually lines in the account for the period. And it display the number of lines.

We now use the invoice date (instead of the accounting date) to enforce the sequence order of the customer invoice. This is more flexible and still valid with most country rules.

When validating interactively a supplier invoice with the same reference as an existing one, Tryton raises a warning because it could be that the user is entering the same invoice twice.

Now lines in a payable or receivable account can only be added to a payment if they have a maturity date. This avoid to create payment for pure accounting lines.

The receivable payments can now be processed without the need of being approved first but just being submitted. This simplify the workflow of receiving payments like checks where there is no need for a second approval.
It is also now possible to edit the amount of a processing payment. This is because sometimes we can read a different amount on a check than what the bank will read.

We do no more create dunning for lines with a pending payment.

It is no more possible to select reconciled payment or group when entering a statement. This simplify the selection task for the user and for the rare case where he needs to select such payment, he can still unreconcile before selection.

The clearing line of a payment is now automatically reconciled with all the statement lines linked to it.

The user can now choose the allocation method to apply to shipment cost.

More (click for more details) Banking

Tryton can now fill or create the related bank from an IBAN.

When searching for a bank name, Tryton is also searching on the BIC.

Party

The country name on a printed address is always in English following the international standard.

The SIREN and SIRET codes are now managed as identifiers on the party.

A party identifier can now be linked to an address of the party. The SIRET number uses this new feature.

The “autonomous city” are now allowed as subdivision for Spain.

All the lines of the street are used now for the record name of an address.

Product

It is now forbidden to decrease the number of digits of a unit of measure. This prevents to make invalid existing quantity linked to this unit.

We warn now user who try to deactivate a product that still has stock.

Production

The stock move form shows now also the optional linked production.

Purchase

It is now possible to define a default currency for each supplier.

Sale

It is now possible to define a default currency for each customer.

The origin name of invoice line for advance payment is now filled with the advance payment condition name.
The advance payments are now recalled with a negative quantity instead of a negative price.

The opportunities reports are now using a real date field to display the month instead of two field year and month. This improve the search possibilities.

The sales made by POS are now included in the general sale reports.

When registering a cash change with the POS, we use negative debit or credit in the accounting. This prevents to increase artificially the sum.

A notification is now display directly when the user enter in a sale a goods with not enough forecast quantity.

Stock

Tryton recomputes now also the cost price on the moves of drop shipments.

The assignation process is now using the lot number as criteria if it is filled.

The upward and downward traces have been added to the stock lot for traceability.

It is now possible to select the UPS notification service.

The forecasts are now applied for all the stock supplies instead of only the purchase requests.

More (click for more details) Web Shop

Tryton now support the edition of the orders from Shopify.

New Modules Account Spanish SII

The Account Spanish SII Module allow to send invoices to the SII portal. This is legal requirement for some Spanish Companies.

Account Invoice Watermark

The Account Invoice Watermark Module adds a draft or paid watermark to the printed invoice.

Account Receivable Rule

The Account Receivable Rule Module defines rules to reconcile receivable between accounts.

Account Stock Shipment Cost Weight

The Account Stock Shipment Cost Weight Module adds the “By Weight” as allocation method on shipment cost.

Account Tax Non-Deductible

The Account Tax Non-Deductible Module allows to define non-deductible taxes and reports them.

Purchase Product Quantity

The Purchase Product Quantity Module permits to enforce the minimal and the rounding of quantity purchased per supplier from purchase request.

Sale Invoice Date

The Sale Invoice Date Module fills the invoice date of invoices created by sales.

Sale Product Quantity

The Sale Product Quantity Module permits to enforce the minimal and the rounding of quantity sold per product.

Stock Shipment Cost Weight"

The Stock Shipment Cost Weight Module adds “By Weight” as allocation method of shipment cost on the carrier.

Changes for the System Administrator

The CORS configuration is now also applied to the root path.

Tryton retries now automatically to send email on temporary failure status.

We removed the password validation based on entropy. It was not a good measurement for robustness of password.

The login methods receive the options ip_address and device_cookie.

Country

The script to load postal codes is using the Tryton CDN for more reliability.

We support now pycountry 22.1.10.

Changes for the Developer

We use now the unittest discover method to replace the deprecated test command from setuptools.

The documentation contains now a tutorial to create a Tryton module.

The models have now a on_change_notify method to display on the client messages while user is filling the record.

The ModelStorage has now a validate_fields method which permit to apply some validation only if specific fields have been modified. This is useful if the validation is expensive. All the modules have been reviewed to take advantage of this new validation method.

The depends on Field are now python set. But also it is no more needed to define the depends for the states, domain and digits expression. Tryton computes them automatically. It is still needed for the context if you want to be sure that it will always be set.

We include in the view only the depend fields that are needed for the type of view (editable or not).

We prevent to create or delete singleton. The corresponding actions are disabled in the clients.

The Reference fields uses dictionary for domain and search_order. The keys are the name of the target model.

It is possible to define a field on a tree view as optional. The user will have the choice to display it or not.

The creatable attribute on the tree and form views allow to define if the view can be used to create new record. If not the client will switch to another view with the capability.

The local cache of instances created by Function fields are now filled with the already read values. This speed up the computation of the fields.

The value of Function fields are now cached for the transaction if it is readonly.

We use JSONB column type to store Dict fields on PostgreSQL backend.

More (click for more details) Web Client

We use now ECMAScript version to 6.

Desktop Client

We added an option to define logging output location.

Accounting

A date must always be set to compute taxes.

We enforce the same type for the children of an account with a type set.

A unique Reference field is now used to on the statement line instead of multiple Many2One.

More (click for more details) Banking

We enforce the uniqueness of IBAN and permit only one per bank account.

More (click for more details) Country

The script to load subdivision does not fail any more on unknown subdivision type.

Web Shop

A route has been added to support the Shopify webhook for orders. This allow to synchronize the orders quicker.

We removed the API backoff time and support the request retry using the Shopify Retry-After header.

We modify only the metafields managed by Tryton.

3 posts - 1 participant

Read full topic

Categories: FLOSS Project Planets

KDE Plasma 5.24.5, Bugfix Release for May

Planet KDE - Mon, 2022-05-02 20:00

Tuesday, 3 May 2022. Today KDE releases a bugfix update to KDE Plasma 5, versioned 5.24.5.

Plasma 5.24 was released in February 2022 with many feature refinements and new modules to complete the desktop experience.

This release adds a month's worth of new translations and fixes from KDE's contributors. The bugfixes are typically small but important and include:

  • Discover Flatpak backend: Improve stability of different sources integration. Commit.
  • Plasma Audio Volume Control: SpeakerTest: Fix subwoofer test. Commit. Fixes bug #445523
  • xdg-desktop-portal-kde: Fix saving file dialog view options. Commit.
View full changelog
Categories: FLOSS Project Planets

Pages