Feeds

Andy Wingo: family bike transportation

GNU Planet! - Wed, 2024-02-14 16:49

Good evening! Tonight I have a brief and unusual post, which is a product review of an electric cargo bike and its accessories for transporting kids. Let’s see if I can get this finished while I wait for my new laptop to finish installing.

So, I have three young kids (5yo, 3yo, 1yo), and I need to get them places. Before the 3rd was born I would use a bike trailer (Thule Chariot Lite single, bought when there was just one kid) and a bike seat (Thule RideAlong Lite, attached on seat-post). That was fine, though sometimes the thought of lugging their ever-increasing kilograms somewhere would give me pause. Then when the third kid arrived, hoo boy; I got a front-mount Thule Yepp Nexxt 2 Mini, to see if I could do three kids on one me-powered bike, but that was too tight to manage; not enough space to kick my leg over when getting on.

In the end we finally broke down and looked at electric cargo bikes. Of course I had looked at these over the years and always bounced off the price. Initially I had thought a front box-bike would be the thing, but then as kids grew up I realized they wouldn’t be comfortable there, and that a long-tail was probably better for the long term. But holy Christ, they are expensive. Happily, Decathlon came out with an electric longtail which is quite acceptable, and for about half the price of something equivalent from elsewhere.

Funny story: a friend got her bike stolen in the center of Geneva one day; thieves came and took all the bikes on a rack. I guess it was a battery-operated angle grinder; apparently that is the modus operandi these days. She moped a bit but then decided to buy the same bike again, from Decathlon as it happens. While she was at the store she entered a raffle. Then the cops called to say they found her bike – I know right?! Turns out some other bike that was stolen had an Apple AirTag on it, and its owner called the cops to tell them where the bike was, and all of the bikes were recovered. In the meantime my friend’s insurance had paid out for her stolen bike, so she had an extra bike. Then the local Decathlon called to tell her she won the raffle, for some kind of electric bike. When she went to pick it up, it was the electric longtail, for free. Anyway, we got to try hers before deciding to get one too.

One of my questions was, can you jam 3 kids on this thing? In terms of weight, yes: it will take 80 kilos on the back, and our kids total 45 kilos. In terms of space it’s OK, but really for the 1yo you need a bike seat, and even for the 3yo she should really be in a seat unless she’s very awake. The back rack has a frame around it, which does help keep kids on, but it’s not sufficient for a sleepy 3yo.

I was hoping to find a quite narrow kid bike seat so I could put on two seats for the young ones and then jam the oldest in somehow. I started with the Thule Yepp Nexxt 2 Maxi, but the release clamp kinda wants to be where the frame around the back rack is, so it’s not so efficient, and not easy to remove. Also the plastic guards so that kids don’t catch their legs in the back wheel aren’t needed on this particular bike, but they do prevent me from effectively accessing the otherwise well-designed panniers (c’est drôle mais ce ne sont pas des panniers, mais des saccoches).

So, with the Thule rear-mount seat I could get one bike seat for the 1yo and then jam in the 3yo and 5yo. It worked fine.

Then, annoyingly, thieves stole our electric longtail. Apparently insurance will pay out for us too—this is a relatively standard feature in France for the kind of insurance you have to have already for your place of residence—but for the last few weeks we have been without our longtail, and it is terrible. In the end we decided just to buy the same bike again: proof that it is good enough.

There are other electric longtails out there. If you can afford it, a pedal motor will be better than the hub motor on the Decathlon model. But if you are willing to accept less than the best, I think the Decathlon bike is quite good for what it is and I am looking forward to picking up the new bike tomorrow. It fits the kids, easily adjusts between different rider heights, and is a real joy to be on as a family. It lets me go places I wouldn’t think of going without the ability to just chuck everybody on the bike and zip away.

As far as bike seats go, I am going to try a new seat, to see if I can avoid the leg covers and to see if it’s more narrow. Ping me on the Mastodon if you want a follow-up. Thoughts welcome below for things that have worked for you. Until next time, happy cycling!

Categories: FLOSS Project Planets

Robin Wilson: How to get segment-geospatial working on Microsoft Planetary Computer

Planet Python - Wed, 2024-02-14 15:22

Just a quick one today to document the solution to a problem I ran into earlier today.

I was using Microsoft Planetary Computer to access some Landsat satellite data, and I wanted to run it through the Segment Anything model from Meta, to segment out agricultural fields from the image. I tried to do this using the segment-geospatial Python package.

Unfortunately I got an error that libgl1.so could not be found. Luckily this is documented on the segment-geospatial installation page and you just need to run:

apt update; apt install -y libgl1

But, there’s a problem: Microsoft Planetary Computer does not allow apt access from their container images. I tried every way I could think of to install this, and did a lot of googling, but couldn’t find anything.

Eventually I found the answer in this issue which somehow didn’t appear in my earlier Google searches. It seems that the libgl1 library is a dependency of OpenCV, which segment-geospatial uses interally, and you can get around this dependency by installing the opencv-python-headless package. And it was just that simple – running

pip install opencv-python-headless

completely solved the problem and let me get going running segment-geospatial.

I hope this post helps someone else with the same problem as me – and hopefully turns up better in relevant Google searches.

Categories: FLOSS Project Planets

TechBeamers Python: Selenium 4 With Python Guide

Planet Python - Wed, 2024-02-14 15:14

Selenium 4 has been around now for quite a bit of time. It came out with many new features, some you can directly use while some will benefit you in the background. Despite it is not new anymore but still, not a lot of stuff you can find to learn about it practically. That’s where […]

The post Selenium 4 With Python Guide appeared first on TechBeamers.

Categories: FLOSS Project Planets

ThinkDrop Consulting: New Composer plugin "Remote Bin Scripts" makes it easy to install 3rd party tools.

Planet Drupal - Wed, 2024-02-14 13:27
New Composer plugin "Remote Bin Scripts" makes it easy to install 3rd party tools. admin Wed, 02/14/2024 - 13:27

Recently we finished a project that was being moved to Pantheon.

We created a couple custom scripts for pushing data into the pantheon environment, and for pulling data down for continuous integration runs.

The scripts require the Terminus CLI tool created by Pantheon to interact with it's service.

Terminus is a composer project, but it's dependencies don't align with the latest Drupal sites. It's best to install it as a phar file and run it that way.

Categories: FLOSS Project Planets

Qt for MCUs 2.6.1 Released

Planet KDE - Wed, 2024-02-14 10:20

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

Categories: FLOSS Project Planets

Tag1 Consulting: Shifting from FID to INP: Google’s New Metric for Improving Web Performance

Planet Drupal - Wed, 2024-02-14 10:00

Hosted by Mariano Crivello, join us as Adam Silverstein, from Google and Janez Urevc of Tag1 discuss Google's new metric, Interaction to Next Paint(INP), which is part of the Core Web Vitals being introduced in March 2024 to foster user experience on the web. Adam gives a comprehensive overview. INP focuses on measuring the responsiveness of web pages to user inputs, aiming to capture the quality of interactions beyond just load times. A good INP score is defined as 200 milliseconds or less, with a particular emphasis on mobile performance due to the variability in device capabilities and network conditions. Adam highlighted the shift from First Input Delay (FID) to INP, noting that INP offers a more comprehensive measure of interactivity throughout the entire lifecycle of a page. He also presents data showing the current performance of Drupal sites in relation to Core Web Vitals, emphasizing the importance of focusing on mobile optimization and the impact of INP on future web performance metrics. Don’t miss expert insights for navigating this significant web development shift. --- For a transcript of this video, see :[Shifting from FID to INP: Google's New Metric for Improving...

Read more Mariano Wed, 02/14/2024 - 07:00
Categories: FLOSS Project Planets

Real Python: BNF Notation: Dive Deeper Into Python's Grammar

Planet Python - Wed, 2024-02-14 09:00

While reading the Python documentation, you may have found fragments of BNF notation (Backus–Naur form) that look something like the following:

BNF Grammar name ::= lc_letter (lc_letter | "_")* lc_letter ::= "a"..."z" Copied!

What’s the meaning of all this strange code? How can this help you in understanding Python concepts? How can you read and interpret this notation?

In this tutorial, you’ll get to know the basics of Python’s BNF notation and learn how to take advantage of it to get a deep understanding of the language’s syntax and grammar.

In this tutorial, you’ll:

  • Learn what BNF notation is and what it’s used for
  • Explore the characteristics of Python’s BNF variation
  • Learn how to read the BNF notation in the Python documentation
  • Explore some best practices for reading Python’s BNF notation

To get the most out of this tutorial, you should be familiar with Python syntax, including keywords, operators, and some common constructs like expressions, conditional statements, and loops.

Get Your Code: Click here to download the free sample code that shows you how to read Python’s BNF notation.

Getting to Know Backus-Naur Form Notation (BNF)

The Backus–Naur form or Backus normal form (BNF) is a metasyntax notation for context-free grammars. Computer scientists often use this notation to describe the syntax of programming languages because it allows them to write a detailed description of a language’s grammar.

The BNF notation consists of three core pieces:

Component Description Examples Terminals Strings that must exactly match specific items in the input. "def", "return", ":" Nonterminals Symbols that will be replaced by a concrete value. They may also be called simply syntactic variables. <letter>, <digit> Rules Conventions of terminals and nonterminals that define how these elements relate. <letter> ::= "a"

By combining terminals and nonterminals, you can create BNF rules, which can get as detailed as you need. Nonterminals must have their own defining rules. In a piece of grammar, you’ll have a root rule and potentially many secondary rules that define the required nonterminals. This way, you may end up with a hierarchy of rules.

BNF rules are the core components of a BNF grammar. So, a grammar is a set of BNF rules that are also called production rules.

In practice, you can build a set of BNF rules to specify the grammar of a language. Here, language refers to a set of strings that are valid according to the rules defined in the corresponding grammar. BNF is mainly used for programming languages.

For example, the Python syntax has a grammar that’s defined as a set of BNF rules, and these rules are used to validate the syntax of any piece of Python code. If the code doesn’t fulfill the rules, then you’ll get a SyntaxError.

You’ll find many variations of the original BNF notation out there. Some of the most relevant include the extended Backus–Naur form (EBNF) and augmented Backus–Naur form (ABNF).

In the following sections, you’ll learn the basics of creating BNF rules. Note that you’ll use a variation of BNF that matches the requirements of the BNF Playground site, which you’ll use for testing your rules.

BNF Rules and Their Components

As you already learned, by combining terminals and nonterminals, you can create BNF rules. These rules typically follow the syntax below:

BNF Grammar <symbol> ::= expression Copied!

In the BNF rule syntax, you have the following parts:

  • <symbol> is a nonterminal variable, which is often enclosed in angle brackets (<>).
  • ::= means that the nonterminal on the left will be replaced with the expression on the right.
  • expression consists of a series of terminals, nonterminals, and other symbols that define a specific piece of grammar.

When building BNF rules, you can use a variety of symbols with specific meanings. For example, if you’re going to use the BNF Playground site to compile and test your rules, then you’ll find yourself using some of the following symbols:

Symbol Meaning "" Encloses a terminal symbol <> Indicates a nonterminal symbol () Indicates a group of valid options + Specifies one or more of the previous element * Specifies zero or more of the previous element ? Specifies zero or one occurrence of the previous element | Indicates that you can select one of the options [x-z] Indicates letter or digit intervals Read the full article at https://realpython.com/python-bnf-notation/ »

[ 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

LN Webworks: Supercharge Your Drupal Experience with Third-Party Integrations for CRM, Marketing & More!

Planet Drupal - Wed, 2024-02-14 02:38

Are you interested in boosting the performance and functionality of your Drupal website to new heights? If so, considering the integration of your site with various third-party systems and applications can open up a whole new range of advantages. 

The potential benefits span a wide spectrum, ranging from the efficient organization of customer data to the implementation of highly targeted and personalized marketing campaigns. Let’s get into an in-depth exploration of some of the most sought-after and impactful third-party integrations tailored for Drupal.

Categories: FLOSS Project Planets

Python GUIs: Q&amp;A: How Do I Display Images in PyQt6? — Using QLabel to easily add images to your applications

Planet Python - Wed, 2024-02-14 01:00

Adding images to your application is a common requirement, whether you're building an image/photo viewer, or just want to add some decoration to your GUI. Unfortunately, because of how this is done in Qt, it can be a little bit tricky to work out at first.

In this short tutorial, we will look at how you can insert an external image into your PyQt6 application layout, using both code and Qt Designer.

Table of Contents Which widget to use?

Since you're wanting to insert an image you might be expecting to use a widget named QImage or similar, but that would make a bit too much sense! QImage is actually Qt's image object type, which is used to store the actual image data for use within your application. The widget you use to display an image is QLabel.

The primary use of QLabel is of course to add labels to a UI, but it also has the ability to display an image — or pixmap — instead, covering the entire area of the widget. Below we'll look at how to use QLabel to display a widget in your applications.

Using Qt Designer

First, create a MainWindow object in Qt Designer and add a "Label" to it. You can find Label at in Display Widgets in the bottom of the left hand panel. Drag this onto the QMainWindow to add it.

MainWindow with a single QLabel added

Next, with the Label selected, look in the right hand QLabel properties panel for the pixmap property (scroll down to the blue region). From the property editor dropdown select "Choose File…" and select an image file to insert.

As you can see, the image is inserted, but the image is kept at its original size, cropped to the boundaries of theQLabel box. You need to resize the QLabel to be able to see the entire image.

In the same controls panel, click to enable scaledContents.

When scaledContents is enabled the image is resized to the fit the bounding box of the QLabel widget. This shows the entire image at all times, although it does not respect the aspect ratio of the image if you resize the widget.

You can now save your UI to file (e.g. as mainwindow.ui).

To view the resulting UI, we can use the standard application template below. This loads the .ui file we've created (mainwindow.ui) creates the window and starts up the application.

PyQt6 import sys from PyQt6 import QtWidgets, uic app = QtWidgets.QApplication(sys.argv) window = uic.loadUi("mainwindow.ui") window.show() app.exec()

Running the above code will create a window, with the image displayed in the middle.

QtDesigner application showing a Cat

Using Code

Instead of using Qt Designer, you might also want to show an image in your application through code. As before we use a QLabel widget and add a pixmap image to it. This is done using the QLabel method .setPixmap(). The full code is shown below.

python import sys from PyQt6.QtGui import QPixmap from PyQt6.QtWidgets import QMainWindow, QApplication, QLabel class MainWindow(QMainWindow): def __init__(self): super(MainWindow, self).__init__() self.title = "Image Viewer" self.setWindowTitle(self.title) label = QLabel(self) pixmap = QPixmap('cat.jpg') label.setPixmap(pixmap) self.setCentralWidget(label) self.resize(pixmap.width(), pixmap.height()) app = QApplication(sys.argv) w = MainWindow() w.show() sys.exit(app.exec()) python import sys from PySide6.QtGui import QPixmap from PySide6.QtWidgets import QMainWindow, QApplication, QLabel class MainWindow(QMainWindow): def __init__(self): super(MainWindow, self).__init__() self.title = "Image Viewer" self.setWindowTitle(self.title) label = QLabel(self) pixmap = QPixmap('cat.jpg') label.setPixmap(pixmap) self.setCentralWidget(label) self.resize(pixmap.width(), pixmap.height()) app = QApplication(sys.argv) w = MainWindow() w.show() sys.exit(app.exec()) python import sys from PyQt5.QtGui import QPixmap from PyQt5.QtWidgets import QMainWindow, QApplication, QLabel class MainWindow(QMainWindow): def __init__(self): super(MainWindow, self).__init__() self.title = "Image Viewer" self.setWindowTitle(self.title) label = QLabel(self) pixmap = QPixmap('cat.jpg') label.setPixmap(pixmap) self.setCentralWidget(label) self.resize(pixmap.width(), pixmap.height()) app = QApplication(sys.argv) w = MainWindow() w.show() sys.exit(app.exec_()) python import sys from PySide2.QtGui import QPixmap from PySide2.QtWidgets import QMainWindow, QApplication, QLabel class MainWindow(QMainWindow): def __init__(self): super(MainWindow, self).__init__() self.title = "Image Viewer" self.setWindowTitle(self.title) label = QLabel(self) pixmap = QPixmap('cat.jpg') label.setPixmap(pixmap) self.setCentralWidget(label) self.resize(pixmap.width(), pixmap.height()) app = QApplication(sys.argv) w = MainWindow() w.show() sys.exit(app.exec_())

The block of code below shows the process of creating the QLabel, creating a QPixmap object from our file cat.jpg (passed as a file path), setting this QPixmap onto the QLabel with .setPixmap() and then finally resizing the window to fit the image.

python label = QLabel(self) pixmap = QPixmap('cat.jpg') label.setPixmap(pixmap) self.setCentralWidget(label) self.resize(pixmap.width(), pixmap.height())

Launching this code will show a window with the cat photo displayed and the window sized to the size of the image.

QMainWindow with Cat image displayed

Just as in Qt designer, you can call .setScaledContents(True) on your QLabel image to enable scaled mode, which resizes the image to fit the available space.

python label = QLabel(self) pixmap = QPixmap('cat.jpg') label.setPixmap(pixmap) label.setScaledContents(True) self.setCentralWidget(label) self.resize(pixmap.width(), pixmap.height())

Notice that you set the scaled state on the QLabel widget and not the image pixmap itself.

Conclusion

In this quick tutorial we've covered how to insert images into your Qt UIs using QLabel both from Qt Designer and directly from PyQt5/PySide2 code.

Categories: FLOSS Project Planets

Cameron Eagans: Update on dependency patch resolution

Planet Drupal - Tue, 2024-02-13 23:26
I've found a new path forward with dependency patch resolution. A new beta release of Composer Patches is available with the functionality re-added.
Categories: FLOSS Project Planets

The Drop Times: Contribution Health Dashboards: A Conversation with Alex Moreno

Planet Drupal - Tue, 2024-02-13 22:39
Gain an in-depth understanding of the newly developed Contribution Health Dashboards as Alex Moreno,
The program Manager and Drupal Innovation Coordinator at the Drupal Association discuss CHD development, technological underpinnings, and potential impact on the global diversity of the Drupal community. Discover the challenges faced, future steps, and how the Drupal community can contribute to the dashboards' enhancement.
Categories: FLOSS Project Planets

Peter Bengtsson: How to avoid a count query in Django if you can

Planet Python - Tue, 2024-02-13 22:09

Suppose you have a complex Django QuerySet query that is somewhat costly (in other words slow). And suppose you want to return:

  1. The first N results
  2. A count of the total possible results

So your implementation might be something like this:

def get_results(queryset, fields, size): count = queryset.count() results = [] for record in queryset.values(*fields)[:size] results.append(record) return {"count": count, "results": results}

That'll work. If there are 1,234 rows in your database table that match those specific filters, what you might get back from this is:

>>> results = get_results(my_queryset, ("name", "age"), 5) >>> results["count"] 1234 >>> len(results["results"]) 5

Or, if the filters would only match 3 rows in your database table:

>>> results = get_results(my_queryset, ("name", "age"), 5) >>> results["count"] 3 >>> len(results["results"]) 3

Between your Python application and your database you'll see:

query 1: SELECT COUNT(*) FROM my_database WHERE ... query 2: SELECT name, age FROM my_database WHERE ... LIMIT 5

The problem with this is that, in the latter case, you had to send two database queries when all you needed was one.
If you knew it would only match a tiny amount of records, you could do this:

def get_results(queryset, fields, size): - count = queryset.count() results = [] for record in queryset.values(*fields)[:size]: results.append(record) + count = len(results) return {"count": count, "results": results}

But that is wrong. The count would max out at whatever the size is.

The solution is to try to avoid the potentially unnecessary .count() query.

def get_results(queryset, fields, size): count = 0 results = [] for i, record in enumerate(queryset.values(*fields)[: size + 1]): if i == size: # Alas, there are more records than the pagination count = queryset.count() break found = i + 1 results.append(record) return {"count": count, "results": results}

This way, you only incur one database query when there wasn't that much to find, but if there was more than what the pagination called for, you have to incur that extra database query.

Categories: FLOSS Project Planets

Seth Michael Larson: Challenges while building SBOM infrastructure for CPython

Planet Python - Tue, 2024-02-13 19:00
Challenges while building SBOM infrastructure for CPython AboutBlogNewsletterLinks Challenges while building SBOM infrastructure for CPython

Published 2024-02-14 by Seth Larson
Reading time: minutes

This critical role would not be possible without funding from the OpenSSF Alpha-Omega project. Massive thank-you to Alpha-Omega for investing in the security of the Python ecosystem!

In case you missed it, recently I announced support for Software Bill-of-Materials for the CPython project on the Python Software Foundation blog.

Part of the project is intended to document the challenges that the project faced to start publishing first-party SBOM documents alongside release artifacts. Yesterday I gave a presentation to the OpenSSF SBOM Everywhere SIG, the slides are available in Google Drive, but I'll be summarizing the discussion here:

List of challenges so far for CPython SBOMs

Building for sustainability. There are no guarantees that my role will be around forever. There's a non-zero chance that CPython core developers will need to maintain SBOM infrastructure at some point in the future. This means it needs to have buy-in, be as low-effort to maintain as possible, fit into existing workflows, and be well documented.

This challenge sparked a bunch of conversation in the group about getting buy-in from technical leadership of open source projects. My thoughts being the following:

  • There isn't a one-size-fits-all approach for projects. Every proposal needs to be fit for that project.
  • Having engagements be driven by community members. There's already a relationship of trust that the work will be done right by the community and that the individual won't leave as soon as the project is complete. I applaud Alpha-Omega's approach here of supporting communities to do security work for the ecosystems they care about.
  • Being public and honest about all aspects of the work, especially the not-so-fun truths (like additional maintenance, complexity, etc). I created a public discussion of the SBOM project for CPython and enumerate its impact specifically on developers updating dependencies and how having accurate SBOMs may increase the amount of reports from users we get to patch dependencies.
  • Show value for the maintainers of the project. SBOM itself may not have tons of value specifically for maintainers, but as an avenue for scanners to discover VEX statements and thus reduce the amount of reports we receive to pointlessly patch dependencies is a valuable capability.

Recursive dependency bundling: CPython bundles pip in the ensurepip module. pip bundles 18 dependencies. There are even more projects bundled in older CPython versions which was the primary reason I stopped backporting beyond 3.12. This requires a customized tool to handle the job. pip and its dependencies being a part of the Python package ecosystem helps a lot, this means we can automatically do lookups for metadata on PyPI, drastically reducing maintainer effort to keep the SBOM updated.

Software IDs and metadata of C projects: Many of CPython dependencies are C projects (libexpat, mpdecimal, HACL*, etc) and those projects aren't a part of a packaging ecosystem, they're tarballs you download and install by pasting into a directory. This means there aren't any standards for what a version number or name should be. The unfortunate part of this is it means the SBOM has to be updated manually when these projects are updated by core developers.

CPEs also don't exist universally for the projects, CPEs being the primary software vulnerability identifier used for C projects. OSV and PURL don't work for projects outside of packaging ecosystems.

Other items

That's all for this week! 👋 If you're interested in more you can read last week's report.

Thanks for reading! ♡ Did you find this article helpful and want more content like it? Get notified of new posts by subscribing to the RSS feed or the email newsletter.

This work is licensed under CC BY-SA 4.0

Categories: FLOSS Project Planets

Steinar H. Gunderson: Random Postgres wishlist

Planet Debian - Tue, 2024-02-13 17:16

In no particular order, things it would be neat if Postgres had (some of these I've implemented myself earlier, though not in Postgres):

  • A JIT that is not based on LLVM (using an AOT compiler framework for JIT is just not a salvagable choice; witness the absolute dearth of really successful LLVM-based JITs out there).
  • Interesting orders that understand functional dependencies.
  • Cross-join correlation statistics.
  • Better combination of multi-column statistics (the standard way in academia seems to be maximum entropy).
  • Longer-term, some built-in really solid column store or at least multi-row handling, for larger OLAP jobs.
  • Ability to hold an in-memory sample, also for OLAP stuff.
  • Ditching GEQO for something more modern (there are tons of choices depending on how you want the optimizer to evolve, pick your poison).

I'm sure everyone would want something like multimaster clustering, but I honestly don't care for myself. :-) I only have one server anyway.

Categories: FLOSS Project Planets

PreviousNext: The Future of Symfony Messenger in Drupal

Planet Drupal - Tue, 2024-02-13 15:05

The thrilling conclusion to this eight-part miniseries includes the next steps for the SM project and the Symfony Messenger ecosystem.

by daniel.phin / 14 February 2024

Symfony Messenger and the SM integration permits time savings and improved DX for developers, making the pipeline and workers more flexible.

Real business value is added when messages can be processed in real-time, providing potential infrastructure efficiencies by permitting rescaling resources from web to CLI. End user performance is improved by offloading processing out of web threads.

Further integrations provide feedback to end users such as editors, informing them in real-time when relevant tasks have been processed.

Messenger messages are an opportunity to offload expensive business logic, particularly those which would be found in hooks. Instead of using the batch API, consider creating messages and deferring UI feedback to Toasty rather than blocking a user’s browser.

Given these points, integration with Drupal core could prove quite valuable.

The design of the SM project focuses on core integration from the beginning. The highest priority has been to maintain the original Symfony Messenger services and configuration, while minimising the introduction of new concepts.

In the context of core integration, niceties like SM’s queue interception feature may initially be left on the factory floor, but could prove useful when deprecating @QueueWorker plugins.

Concepts like the consume command may be a tricky requirement for some, but there are always workarounds that can be built, in the same vein as request-termination cron. Workarounds wouldn’t allow for the main advantage of Messenger, which is its real-time processing capabilities.

Next steps for the SM project and the Messenger ecosystem include

Read the other posts in this series:

  1. Introducing Symfony Messenger integrations with Drupal 
  2. Symfony Messenger’ message and message handlers, and comparison with @QueueWorker
  3. Real-time: Symfony Messenger’ Consume command and prioritised messages
  4. Automatic message scheduling and replacing hook_cron
  5. Adding real-time processing to QueueWorker plugins
  6. Handling emails asynchronously: integrating Symfony Mailer and Messenger
  7. Displaying notifications when Symfony Messenger messages are processed
  8. Future of Symfony Messenger in Drupal
Tagged Symfony, Symfony Messenger
Categories: FLOSS Project Planets

PyCoder’s Weekly: Issue #616 (Feb. 13, 2024)

Planet Python - Tue, 2024-02-13 14:30

#616 – FEBRUARY 13, 2024
View in Browser »

Using Python for Data Analysis

In this tutorial, you’ll learn the importance of having a structured data analysis workflow, and you’ll get the opportunity to practice using Python for data analysis while following a common workflow process.
REAL PYTHON

Python Formatters With Lukasz Langa

Episode 27 of The Python Show Podcast welcomes Lukasz Langa, the CPython Developer in Residence, he is also the creator of the Black formatter. They talk about Python, Black, Ruff, and more.
MIKE DRISCOLL podcast

Upcoming Workshop: Taming the Kraken, Managing a Python Monolith w/ Sentry

Join David Winterbottom, principal software engineer at Kraken Technologies, as he shares how he and his team develop, deploy, and maintain a rapidly evolving Python monorepo with over 4 million lines of code with Sentry. RSVP to get a recording and get your questions answered during the session →
SENTRY sponsor

A Bird’s Eye View of Polars

This post on the Polars blog introduces you to how Polars works, showing the steps from queries, plans, optimizations, and then the final execution.
POLARS

Django Security Releases Issued: 5.0.2, 4.2.10, and 3.2.24

DJANGO SOFTWARE FOUNDATION

Python 3.12.2 and 3.11.8 Released

CPYTHON DEV BLOG

PSF: Introducing PSF Grants Program Office Hours

PYTHON SOFTWARE FOUNDATION

Discussions Why Not Real Anonymous Functions?

PYTHON

When Should You Give Up on a Project That Doesn’t Work?

HACKER NEWS

Articles & Tutorials Abandoned Code: Hidden Risks of Unmaintained Software

Software engineers use a lot of third party software. Often people rely on GitHub stars, downloads or articles to choose what to use. Yet, a lot of times that third party software is not maintained anymore. This post talks about some of the problems with using that kind of software.
PORIN CUSTIC • Shared by Porin Custic

Build a Django AI Colorization App

This guide shows you how to build a simple Django app that uses AI to colorize black and white photos. It includes a way to hook your local server when working with APIs that need a network exposed call-back.
PHOTONDESIGNER.COM • Shared by Tom Dekan

Add Versatility To AI Apps, Build With Popular Model Choices Like YOLOv8

Future-proof your AI apps with constantly expanding model compatibility, including YOLOv8, Padim, and more. Speed up development and deploy seamlessly with Intel’s OpenVINO toolkit.
INTEL CORPORATION sponsor

Specialized Python Libraries for Unique Tasks

Python gets used for all sorts of stuff. This list of libraries highlights just how much is out there. Ranging from quick UI tools to text search, to movie editing.
MARINE GOSSELIN

Implement Parsers With Pylasu

In this article, you learn how to implement parsers in Python using Pylasu and ANTLR. It includes working code for parsing a toy language called “slang”.
LORENZO ADDAZI

Inside .git

Julia is at it again, doing a deep dive on how things work. This post shows you everything inside your .git directory and what its all there for.
JULIA EVANS

Safely Rewriting Complex Code

Sometimes you just have to give in and re-write some of your code. This post talks about useful steps to consider when going down this path.
TIMO ZIMMERMANN

Everything You Can Do With Python’s textwrap Module

Learn about all the things you can do with Python’s textwrap module, including formatting, text wrapping, trimming and more
MARTIN HEINZ • Shared by Martin Heinz

Understanding Open Source Licensing

This article discusses the importance of open-source licensing in software development and its implications for stakeholders.
UMA VICTOR

Implementing a Lasting Service Pattern for Your Business Logic

Best practices for building an understandable, maintainable and scalable mechanism for your custom logic via Python classes.
MEDIUM.COM/AMBIENT-INNOVATION • Shared by Ronny Vedrilla

Profiling Your Numba Code

Learn how to use the Profila profiler to find performance bottlenecks in your Numba code.
ITAMAR TURNER-TRAURING

Projects & Code toolong: A TUI to View, Tail, Merge, and Search Log Files

GITHUB.COM/TEXTUALIZE

finagg: Aggregate Historical Data From Free Financial APIs

GITHUB.COM/THEOGOGNF

fasthx: FastAPI and HTMX, the Right Way

GITHUB.COM/VOLFPETER

instld: CLI Package Management

GITHUB.COM/POMPONCHIK • Shared by Evgeniy Blinov

Adopt-Ruff: Find Unconfigured ruff Rules

GITHUB.COM/SCDOR • Shared by Dor Schwartz

Inspira: A Lightweight Framework for Web Applications

GITHUB.COM/CICEKHAYRI • Shared by Hayri Cicek

Events Weekly Real Python Office Hours Q&A (Virtual)

February 14, 2024
REALPYTHON.COM

PyData Bristol Meetup

February 15, 2024
MEETUP.COM

PyLadies Dublin

February 15, 2024
PYLADIES.COM

Inland Empire Python Users Group Monthly Meeting

February 21, 2024
MEETUP.COM

NZPUG-Auckland: The Python Community in 2024

February 21, 2024
MEETUP.COM

Happy Pythoning!
This was PyCoder’s Weekly Issue #616.
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 Association blog: Piyush Poddar Joins the Drupal Association Board: A Journey of Growth, Open Source Advocacy, and Global Collaboration

Planet Drupal - Tue, 2024-02-13 13:53

We're excited to welcome Piyush Poddar, the latest addition to the Drupal Association Board. Piyush, Head of Sales and Partnerships at Axelerant, co-founded the Jaipur Drupal User Group and serves on the Board of the Drupal Association of India. Known for his active involvement in writing and speaking at events, Piyush covers a range of topics, including the growth of Open Source and Contribution culture in India. His expertise extends to assisting global Drupal agencies in business expansion through strategic account management, transformed outsourcing practices, and success-driven partnership frameworks. 

As a recent board member, Piyush shares insights on this thrilling journey:

What are you most excited about when it comes to joining the Drupal Association board?
I’m excited to join the Drupal Association Board after having known Drupal for over 16 years. As a long-time advocate and active non-code contributor, I look forward to influencing key decisions and giving back to the community.

This is a pivotal time for Drupal's growth, and my position on the Board allows me to contribute significantly to its expansion, relevance, and commitment to openness and inclusion.

And I’m very excited that with my position on the Board, I will be able to contribute significantly to some of these motions.

What do you hope to accomplish during your time on the board?
From a humble dorm room project to a platform globally embraced by businesses and organizations, Drupal has come a long way. As a board member, I aim to actively push to advance Drupal's business dimension, ensuring its continued relevance in the dynamic Martech space. The Drupal Association's recent efforts at the Web Summit were good, but we need to do more.

I also want to connect the global and Indian Drupal communities, bringing back the energy that faded during the pandemic. Developers are vital for Drupal, and we need to support and empower them for the community to keep growing. Coming up with plans for this is a top priority.

Personally, I look forward to learning a lot, improving my skills, and having valuable experiences in this role.

What specific skill or perspective do you contribute to the board?
My background in Sales, Customer Success Management, and Community Engagement offers a unique viewpoint. 

Digital agencies, being prominent advocates and practitioners of Drupal, have significantly driven its growth and commercial adoption. With over a decade of experience partnering with digital agencies for their growth, I have consistently interacted with their leadership. I aim to bring their challenges and needs to the forefront. 

How has Drupal impacted your life or career?
Drupal has hugely impacted both my professional journey and personal growth. Professionally, it has been instrumental in molding my understanding of complex business challenges related to content, marketing, and publishing. Working on Drupal projects introduced me to the agile methodology, revolutionizing how I approach work. The global adoption of Drupal has broadened my perspective, allowing me to gain a comprehensive understanding of the digital and creative industries on an international scale.

On a personal level, my experience with Drupal has profoundly transformed my views on openness and inclusion. The thriving Drupal community, rooted in open-source ethos and built on selfless contributions, has been a powerful influence. Engaging with people from diverse backgrounds, cultures, ethnicities, and genders, all united by a common cause, has significantly broadened how I engage with people. This exposure has made me more open-minded, vulnerable, and accommodating, deeply enriching my personal values and perspectives.

In essence, Drupal has not just been a part of my career; it has been a journey of learning, growth, and personal evolution.

Tell us something that the Drupal community might not know about you.
I really enjoy traveling. I've explored over 65 cities in 14 countries and have taken approximately 15 flights around the earth.

Share a favorite quote or piece of advice that has inspired you.
I'd like to share a quote that has inspired me: “Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it.” - Steve Jobs

We can't wait to experience the incredible contributions Piyush will make during his time on the Drupal Association Board. Thank you, Piyush, for dedicating yourself to serving the Drupal community through your board work! Connect with Piyush on LinkedIn.

The Drupal Association Board of Directors comprises 12 members, with nine nominated for staggered 3-year terms, two elected by the Drupal Association members, and one reserved for the Drupal Project Founder, Dries Buyteart. The Board meets twice in person and four times virtually annually, overseeing policy establishment, executive director management, budget approval, financial reports, and participation in fundraising efforts.

Categories: FLOSS Project Planets

Drupal Association blog: Turning Takers into Makers: The enhanced Drupal Certified Partner Program

Planet Drupal - Tue, 2024-02-13 12:00

In a recent working paper published by the Harvard Business School entitled “The Value of Open Source Software,” the authors, Manual Hoffmann, Frank Nagle, and Yanuo Zhou, use a new methodology to determine that the value of open source software is in excess of $8.8 trillion. They further admit that this is likely an underestimate.

Clearly, open source software plays a foundational and often underappreciated role in the digital lives of people across the world. This fact will not be news to those immersed in the open source communities that were the subject of the study (though I think the economic impact is illuminating).

Among the contributions of the Working Paper to open source literature, the authors assert that:

...users of OSS should not just free ride but also contribute to the creation and maintenance of OSS(...). Such contributions are a fraction of the costs that firms would incur if OSS did not exist and the active participation of OSS users in helping maintain the OSS they use is critical to the health and future well-being of the OSS ecosystem”

They further add:

Our results further show that the majority of the value created by OSS is created by a small number of contributors.”

While Drupal was not specifically included in the Harvard study (though PHP was), these conclusions are not news to the Drupal Community. Dries Buytaert introduced these concepts to the Community in his 2019 blog post Balancing Makers and Takers to scale and sustain Open Source. In it, he cites the “free rider” problem long studied in traditional economics and applies it to Drupal. His message in short: if Drupal is to thrive, we need to convert Takers to Makers.

In 2023, Drupal was recognized as a Digital Public Good. The recognition highlighted both Drupal’s importance in advancing an open and inclusive web as well as its susceptibility to the Free Rider problem.

The Role of the Drupal Association

The Drupal Association plays a unique role in the Drupal ecosystem.  As the nonprofit formed to support the global, decentralized open source project, our mission is to drive innovation and adoption of Drupal as a high-impact digital public good, hand-in-hand with our open source community.

Our fundamental task, day in and day out, is to ensure that Drupal is secure and available to anyone, anywhere in the world to download and use for free. This takes resources beyond the contributions to code that the community makes. Thus, we leverage financial contributions to maintain and improve the infrastructure that keeps Drupal available.

We are in an environment in which, without an intentional focus on innovation and a commitment to getting the word out about the benefits of Drupal (i.e. marketing), open source projects risk withering, and organizations with far larger budgets and profit incentives will oversell proprietary solutions that unnecessarily trap users data and raise the cost basis of accessing the internet.  Both are contrary to an open and inclusive web.

Enhancements to the Drupal Certified Partner Program

To fulfill our mission and to better support the availability of Drupal, the Drupal Association is re-orienting the Drupal Certified Partner program to recognize and highlight those firms who represent the “small number of contributors” that “are critical to the health and future well-being” of Drupal. In other words, we’re focusing the Drupal Certified Partner program on “Makers.”

We launched the Drupal Certified Partner program in 2021. It was a good start and we have learned much over the past 3 years. We learned that we have room for improvement to amplify and highlight Makers.

The current Marketplace lists 2,283 companies, many of whom provide Drupal services. Of these companies, 591 made a contribution to Drupal in 2023. Of these 591 contributors, the top 14% made 88% of total contributions in 2023. Some of these are relatively small organizations, who aren't necessarily getting the recognition they deserve. In fact, five of the top ten contributors in 2023 were companies with fewer than 50 employees.

It would be fair to say that, in Drupal, the majority of the value is created by a small number of contributors. We hope to better recognize those organizations and grow their number.

Starting on April 1, 2024, the Drupal Certified Partner program will support those companies who are committed to supporting the Drupal Project and the Drupal Community with the following improvements:

  • The Drupal Marketplace on Drupal.org will be reserved solely for Makers, known as Drupal Certified Partners. The Marketplace will be branded as the global list of “Makers” and recommended by the Drupal Association and will only list Drupal Certified Partners in active status.
  • Becoming and maintaining certification as a Drupal Certified Partner will require at least 150 annual credits and complete a short annual business survey.
  • Companies will be awarded a tier badge (Bronze, Silver, Gold, Platinum, Diamond, Top Tier), based solely on their credits (see below).
  • Position on the Marketplace will be largely determined by credits (this is “largely” and not “solely” because we plan on providing Marketplace advantages to those companies that sponsor local camps).
  • An annual financial contribution will be required of all Drupal Certified Partners based on company size and measured by number of employees and full time contractors (see below). The intent is that this contribution be nominal to the size of the organization. These funds are used to maintain the Drupal infrastructure, a core responsibility of the Drupal Association, as well as supporting the Drupal Community.
  • Many benefits conferred by the Drupal Association will be limited to Drupal Certified Partners. These benefits are being updated and will be published before the end of the first quarter of 2024.
  • The Supporting Partner program will be re-oriented to recognize those companies who are not in the business of selling Drupal services, but want to contribute to the project and the community.
New Tiered Badge Levels

In developing the new tiers, we started with our highest performing contributor and then looked for natural cut points in the data to create subsequent tiers. With these changes, the annual contribution credit minimums for each Tier have increased.

Since 2021, when this program launched, code contribution within organizations has increased. What this tells us is the program is working. Organizations are motivated to increase contribution which, in turn, will increase innovation. It also proves we can incrementally increase the weighted contribution credit eligibility to continue to grow code contributions.

Weighted contributions over the previous twelve months will determine the Tier at an organization’s annual renewal date.

New Financial Sponsorship Levels

Maintaining Drupal and making it available worldwide free of charge to anyone to download and use takes resources beyond contributions by the community.  The nonprofit Drupal Association, in conjunction with the Drupal Project, does the bulk of this work.  Undertaking this work on a continual basis and with great quality requires a consistent source of funding.  The Association’s historic reliance on DrupalCon revenue is insufficient to undertake the goals of innovating Drupal faster and expanding its impact.

Drupal’s market impact is conservatively valued at $3 to $5 billion.  If only 1% of the value was invested back into Drupal, this would result in tens of millions of dollars annually.  This would more than address Drupal’s maintenance, innovation, and marketing needs.

In this vein, the enhanced Drupal Certified Partner program will require an annual financial sponsorship amount.  The amount will vary commensurate with the size of the organization.  The idea is that makers who use Drupal should contribute a nominal financial amount to help the Association maintain Drupal.  It is a cost of doing business, similar to any software tool an organization may use to build and maintain their digital presence.  The amount will generate far less than “tens of millions” of dollars, but will provide a sustainable source of revenue that will be invested in innovating and marketing Drupal.  Many companies already contribute at this level, we want to formalize the commitment for all Drupal Certified Partners.

The number of employees and full-time employees will be used as a proxy for company size.

The new Drupal Certified Partner requirements will go into effect starting 1 April 2024. All companies currently on the marketplace who are not yet Certified are invited to enroll. New organizations joining the Drupal Certified Partner program will enroll in this new program starting 1 April. Current Drupal Certified Partners will be invited to enroll on their annual renewal date after 1 April 2024. Current Drupal Certified Partners will not see a change in their financial contribution requirements until their next renewal date.

If your organization does not contribute code or your organization is an end-user, you will still be able to support Drupal the community. The current “Supporting Partner” program will now be called the “Supporting Member” program. The current financial levels will be available and some of the same benefits will be part of the program, such as 10% off DrupalCon registrations. For some, the Supporting Members program will be a starting point towards becoming a Drupal Certified Partner with the Drupal Association hosting webinars and training on how to get started contributing.

A webinar is planned for March to review the new Drupal Certified Partner program.

If you would like to learn more, please register for our upcoming webinar on 5 March 2024 hosted by myself and Kelly Delaney, our Director of Development.

Register for the webinar here. If you can’t make the live webinar, we’ll send the recording to everyone who registered after the event.

Tim Doyle
Chief Executive Officer
Drupal Association

Categories: FLOSS Project Planets

Pages