Feeds
Django Weblog: DjangoCon US 2024 CFP Last Call
Hey Django enthusiasts!
Have you submitted your talk or tutorial for DjangoCon US 2024, in beautiful Durham, North Carolina, USA?
Time flies, and we're fast approaching the deadline (April 24, 2024 at 12 PM EDT) for DjangoCon US 2024 Call for Proposals (CFP). If you've been pondering sharing your Django journey, showcasing your innovative projects, or imparting your expertise to fellow developers, now is the perfect moment to seize the opportunity!
Here's why you should take action and submit your proposals before the clock runs out:
- Share Your Knowledge: DjangoCon US isn't just a conference; it's a platform for sharing insights, discoveries, and lessons learned. Your unique experiences could be just what someone else needs to overcome a hurdle or spark a new idea.
- Join the Community: DjangoCon US isn't just about talks; it's about building connections. By presenting at the conference, you become an integral part of the vibrant Django community, exchanging ideas, and forging new friendships with like-minded developers.
- Boost Your Profile: Whether you're a seasoned speaker or a first-time presenter, DjangoCon US offers a valuable opportunity to elevate your profile in the tech industry. Showcase your expertise, gain visibility, and enhance your professional credibility among peers and potential employers.
- Contribute to Diversity: DjangoCon US values diversity and inclusion. Your perspective matters, and by sharing your voice, you contribute to creating a more inclusive and representative tech community.
Submitting a proposal is easy! Just head over to the DjangoCon US website, fill out the submission form, and share your compelling idea with us. Whether it's a deep dive into a technical topic, a case study of your latest project, or a discussion on the future of Django, we want to hear from you.
Remember, the deadline for CFP submissions is fast approaching, so don't wait until the last minute. Take this opportunity to inspire, educate, and connect with your fellow Django enthusiasts at DjangoCon US 2024!
See you at the conference!
If you have questions feel free to contact us.
DrupalEasy: cspell and drupalorg CLI: two useful tools for Drupal contrib module maintainers
While preparing the recent Markdown Easy 1.0.1 release, I utilized a couple of tools that I hadn't used before in order to help improve code quality as well as the quality of the release notes.
cspellcspell is a Node.js spell-checker for code that was made available to the default Drupal GitLab templates in February, 2024. There is a new SKIP_CSPELL variable that can be set if you'd like your project to completely ignore cspell (it is enabled by default.) Documentation on using cspell in Drupal GitLab pipelines is available. I'd wager that most Drupal contrib maintainers will have the need for a custom word list (as I did,) so I took a few minutes to learn a bit more about it.
Cspell uses its default wordlist along with a few add-on dictionaries related to Drupal development (anecdotally, words like "mglaman," "gloop," "skynet," and "vampirize" are included) for checking the spelling of both variable names as well as code comments, but luckily, additional words (and patterns) can be added on a per-project basis in order to achieve a clean cspell report in GitLab pipelines. While there are several methods to add a list of custom words, the way I felt was most elegant (and easy for me to remember in the future!) was to add a .cspell-project-words.txt file on the project root (in this case, the contrib module is the project.) This file then includes a list of words that cspell should not flag as misspellings. For the Markdown Easy project, I went with "Anello," "~commonmark," and "~ultimike" (possibly for obvious reasons.) The ~ modifier indicates those words are case-insensitive (additional modifiers are available.) With that change, Markdown Easy now earns a passing score from the cspell pipeline.
drupalorg CLIdrupalorg is a command-line interface maintained by (who else?) Matt Glaman. I actually learned about this tool a few years ago after Matt blogged about it, but for whatever reason, I only thought about installing and (finally) using it recently. The general idea is to provide a command line tool for contributors to interact with drupal.org. It's available commands are:
help Displays help for a command list Lists commands cache cache:clear (cc) Clears caches ci drupalci drupalci:list (ci:l) Lists test results for an issue drupalci:watch (ci:w) Watches a Drupal CI job issue issue:apply Applies the latest patch from an issue. issue:branch Creates a branch for the issue. issue:interdiff Generate an interdiff for the issue from local changes. issue:link Opens an issue issue:patch Generate a patch for the issue from committed local changes. maintainer maintainer:issues (mi) Lists issues for a user, based on maintainer. maintainer:release-notes (rn, mrn) Generate release notes. project project:issues (pi) Lists issues for a project. project:kanban Opens project kanban project:link Opens project page project:release-notes (prn) View release notes for a release project:releases Lists available releases tci travisci travisci:list (tci:l) Lists Travis Ci builds for a Drupal project travisci:watch (tci:w) Watches a Travis CI jobThe maintainer:release-notes command is especially helpful to automatically generate release notes for a new version of a Drupal contrib project. Here's how I installed and used this tool to generate the release notes for Markdown Easy 1.0.1:
- I downloaded the drupalorg.phar to a new ~/sites/drupalorg/ directory on my local, and renamed the file to just drupalorg.
- I then gave execute permission to this file via chmod u+x ~/sites/drupalorg/drupalorg
I use zsh, so I added the following to my ~/.zshrc file and then restarted my terminal:
# drupalorg command line tool export PATH="/Users/michael/sites/drupalorg:$PATH"- Here's the important part - I then navigated to my local, working copy of the Markdown Easy module. In my case cd ~/sites/d10/web/modules/contrib/markdown_easy
- I then ran the following command to generate the release notes: drupalorg maintainer:release-notes 1.0.0
I assumed at first that I should use the current release (1.0.1) as the argument, but after reading the documentation, I discovered that the command will generate release notes from the tag provided in the argument.
I also originally assumed that the command would take a contrib module's machine name as an argument, but after a few minutes of poking around the documentation, I realized that the command must be run from the module's directory.
You can see the automatically generated release notes here.
SummaryBoth of these tools were rather easy to implement (once I read just a little bit of documentation) and seem like they'll be useful for just about any Drupal contrib maintainer.
PyPy: PyPy v7.3.16 release
The PyPy team is proud to release version 7.3.16 of PyPy.
This release includes security fixes from upstream CPython, and bugfixes to the garbage collector, described in a gc bug-hunt blog post.
The release includes three different interpreters:
PyPy2.7, which is an interpreter supporting the syntax and the features of Python 2.7 including the stdlib for CPython 2.7.18+ (the + is for backported security updates)
PyPy3.9, which is an interpreter supporting the syntax and the features of Python 3.9, including the stdlib for CPython 3.9.19.
PyPy3.10, which is an interpreter supporting the syntax and the features of Python 3.10, including the stdlib for CPython 3.10.14.
The interpreters are based on much the same codebase, thus the multiple release. This is a micro release, all APIs are compatible with the other 7.3 releases. It follows after 7.3.15 release on Jan 15, 2024
We recommend updating. You can find links to download the v7.3.16 releases here:
https://pypy.org/download.html
We would like to thank our donors for the continued support of the PyPy project. If PyPy is not quite good enough for your needs, we are available for direct consulting work. If PyPy is helping you out, we would love to hear about it and encourage submissions to our blog via a pull request to https://github.com/pypy/pypy.org
We would also like to thank our contributors and encourage new people to join the project. PyPy has many layers and we need help with all of them: bug fixes, PyPy and RPython documentation improvements, or general help with making RPython's JIT even better.
If you are a python library maintainer and use C-extensions, please consider making a HPy / CFFI / cppyy version of your library that would be performant on PyPy. In any case, both cibuildwheel and the multibuild system support building wheels for PyPy.
What is PyPy?PyPy is a Python interpreter, a drop-in replacement for CPython It's fast (PyPy and CPython 3.7.4 performance comparison) due to its integrated tracing JIT compiler.
We also welcome developers of other dynamic languages to see what RPython can do for them.
We provide binary builds for:
x86 machines on most common operating systems (Linux 32/64 bits, Mac OS 64 bits, Windows 64 bits)
64-bit ARM machines running Linux (aarch64).
Apple M1 arm64 machines (macos_arm64).
s390x running Linux
PyPy support Windows 32-bit, Linux PPC64 big- and little-endian, and Linux ARM 32 bit, but does not release binaries. Please reach out to us if you wish to sponsor binary releases for those platforms. Downstream packagers provide binary builds for debian, Fedora, conda, OpenBSD, FreeBSD, Gentoo, and more.
What else is new?For more information about the 7.3.16 release, see the full changelog.
Please update, and continue to help us make pypy better.
Cheers, The PyPy Team
Real Python: Python Sequences: A Comprehensive Guide
In this quiz, you’ll test your understanding of Python sequences.
By working through this quiz, you’ll revisit the basic characteristics of a sequence, operations common to most sequences, special methods associated with sequences, and how to create user-defined mutable and immutable sequences.
[ 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 ]
Programiz: Getting Started with Python
qtatech.com blog: Drupal 9 to 10 Transition Made Simple: Real Code Insights
Have you found yourself gearing up for the transition from Drupal 9 to Drupal 10, only to be met with complexities and uncertainties along the way? You're not alone in this journey. Making the switch between major versions of a CMS can feel like navigating through a maze of code and updates, leaving you puzzled and overwhelmed.
Python Bytes: #380 Debugging with your eyes
Specbee: Improving Drupal SEO: How to Fix Duplicate Content with the Global Redirect Module
The Drop Times: A Conversation with Dominique de Cooman on Drupal, Mautic, Open DXP and Dropsolid
PowerDevil in Plasma 6.0 and beyond
Django Weblog: An open letter regarding the DjangoCon Europe CfP
As many of you are not doubt aware there have recently been some community conversation regarding a license agreement that was published as part of the DjangoCon Europe Call for Proposals for organizers. I believe it is fair to characterize the reaction as negative, with expressions of anger, frustration, and confusion towards the DSF for placing burdensome and one sided requirements for hosting a DjangoCon Europe.
I want to state first and foremost that I added the licensing agreement to the CfP. My deepest apologies for everyone who felt betrayed by it. I hold our conference organizers in the highest regard, for the equity, effort, blood, sweat, and tears they put into creating amazing community events that bring us all together. I considered resigning from the board for the pain and confusion that I have caused. I have not because I want to be part of finding a way forward and keeping DjangoCon Europe the calendar event that so many of us eagerly await. It will be up to all of you if I can be part of that journey back.
The most difficulty accusation to face is that of a lack of transparency and surprising former and prospective organizers with the license. It is difficult for me because I honestly believed I was increasing the level of transparency to organizers. This licensing agreement is not a new document, though I now understand that it is new to, well, everyone. The license has existed in the DSF legal documents repository since at least 2016 and has been signed for at least one DjangoCon Europe. In my years on the board prior to my presidency on several occasions there were todos to have selected organizers "sign the organizer contract". In addition I know that DEFNA is party to an almost identical licensing contract with the DSF. It was my intention to provide to potential organizers with the contract prior to making a proposal so that when a proposal was selected the organizers would not be taken aback when being presented with the license.
I was mortified when I heard, first in private and then publicly, that no DjangoCon Europe organizers of current memory had ever signed the license. The group of some of our community's most dedicated volunteers felt like with the click of a keyboard had turned into an arms length transaction among lawyers. At the same time I was mortified at the potential legal jeopardy the DSF had unknowingly been in by not having license agreements in place for all DjangoCons.
I'd like to touch on several points brought up in the discussion that has come from this.
The first regards the time window of DjangoCon Europe as laid out in the CfP. The DSF has long standing agreements with the PSF, DEFNA, and EuroPython to not adversely impact each other's conferences by scheduling them too close together. The agreement specifies that no two conferences should be within a month of each other. The sentiment of the agreement is well placed, but I believe it is time to revisit it. With new conferences coming into the fold (it was rightly pointed out the DjangoCon Africa is not mentioned in the license), the ability for conferences to have meaningful remote participation, and a calendar that due to weather often has the four stated conferences vying for a 5-7 month slot the one month gap is difficult to plan around. I am publicly proposing here that the interested parties to this agreement modify it such that the one month window apply to either region or theme, but not both. That would have, for instance, DjangoCon US avoiding Pycon and DjangoCons Europe and Africa but not EuroPython and vice versa.
The second point is in regards to the requirement to not schedule against major religious and cultural holidays. While I did not write that, I embody it. My first DjangoCon was DjangoCon Europe. I was unable to attend DjangoCon US in Chicago while I was living in Chicago as it had been partly scheduled against Rosh Hashanah. So I convinced my boss to send me to France instead and fell in love with the Django community.
Finally to the comments that the DSF does not care about organizers and has no interest in helping them put on a conference. Unfortunately DSF does not have inherent knowledge of running conferences, no legal entity outside the US to bring to bear, or the finances to backstop a DjangoCon. We ask for your help every year to run DjangoCon Europe because, quite simply, we can't. There was a meeting in Edinburgh of former organizers to discuss how organizing a DjangoCon Europe coule be improved. That meeting was the start of the European Organizers Support working group. It did take time to get started. We have it now. It is the sincerest hope of all of us that it is the first step in improving the experience of European organizers, and hopefully others down the line. It is a slow process, but one I dearly hope bears fruit.
I sincerely hope that we can all together still work to make DjangoCon Europe 2025 a reality. I will do all that I can to make that happen, if you will continue to have me. I do not participate in social media, but have started a thread on the Django Forum to continue this discussion. For most of the next week I will be unavailable due to the Passover holiday but it was imperative to me that I get this message to you all as soon as I could.
Thank you for your time, and for letting me serve you, Chaim Kirby President, Django Software Foundation
parallel @ Savannah: GNU Parallel 20240422 ('Børsen') [stable]
GNU Parallel 20240422 ('Børsen') has been released. It is available for download at: lbry://@GnuParallel:4
Quote of the month:
I’m a big fan of GNU parallel!
-- Scott Cain @scottjcain@twitter
New in this release:
- Bug fixes and man page updates.
GNU Parallel - For people who live life in the parallel lane.
If you like GNU Parallel record a video testimonial: Say who you are, what you use GNU Parallel for, how it helps you, and what you like most about it. Include a command that uses GNU Parallel if you feel like it.
GNU Parallel is a shell tool for executing jobs in parallel using one or more computers. A job can be a single command or a small script that has to be run for each of the lines in the input. The typical input is a list of files, a list of hosts, a list of users, a list of URLs, or a list of tables. A job can also be a command that reads from a pipe. GNU Parallel can then split the input and pipe it into commands in parallel.
If you use xargs and tee today you will find GNU Parallel very easy to use as GNU Parallel is written to have the same options as xargs. If you write loops in shell, you will find GNU Parallel may be able to replace most of the loops and make them run faster by running several jobs in parallel. GNU Parallel can even replace nested loops.
GNU Parallel makes sure output from the commands is the same output as you would get had you run the commands sequentially. This makes it possible to use output from GNU Parallel as input for other programs.
For example you can run this to convert all jpeg files into png and gif files and have a progress bar:
parallel --bar convert {1} {1.}.{2} ::: *.jpg ::: png gif
Or you can generate big, medium, and small thumbnails of all jpeg files in sub dirs:
find . -name '*.jpg' |
parallel convert -geometry {2} {1} {1//}/thumb{2}_{1/} :::: - ::: 50 100 200
You can find more about GNU Parallel at: http://www.gnu.org/s/parallel/
You can install GNU Parallel in just 10 seconds with:
$ (wget -O - pi.dk/3 || lynx -source pi.dk/3 || curl pi.dk/3/ || \
fetch -o - http://pi.dk/3 ) > install.sh
$ sha1sum install.sh | grep 883c667e01eed62f975ad28b6d50e22a
12345678 883c667e 01eed62f 975ad28b 6d50e22a
$ md5sum install.sh | grep cc21b4c943fd03e93ae1ae49e28573c0
cc21b4c9 43fd03e9 3ae1ae49 e28573c0
$ sha512sum install.sh | grep ec113b49a54e705f86d51e784ebced224fdff3f52
79945d9d 250b42a4 2067bb00 99da012e c113b49a 54e705f8 6d51e784 ebced224
fdff3f52 ca588d64 e75f6033 61bd543f d631f592 2f87ceb2 ab034149 6df84a35
$ bash install.sh
Watch the intro video on http://www.youtube.com/playlist?list=PL284C9FF2488BC6D1
Walk through the tutorial (man parallel_tutorial). Your command line will love you for it.
When using programs that use GNU Parallel to process data for publication please cite:
O. Tange (2018): GNU Parallel 2018, March 2018, https://doi.org/10.5281/zenodo.1146014.
If you like GNU Parallel:
- Give a demo at your local user group/team/colleagues
- Post the intro videos on Reddit/Diaspora*/forums/blogs/ Identi.ca/Google+/Twitter/Facebook/Linkedin/mailing lists
- Get the merchandise https://gnuparallel.threadless.com/designs/gnu-parallel
- Request or write a review for your favourite blog or magazine
- Request or build a package for your favourite distribution (if it is not already there)
- Invite me for your next conference
If you use programs that use GNU Parallel for research:
- Please cite GNU Parallel in you publications (use --citation)
If GNU Parallel saves you money:
- (Have your company) donate to FSF https://my.fsf.org/donate/
GNU sql aims to give a simple, unified interface for accessing databases through all the different databases' command line clients. So far the focus has been on giving a common way to specify login information (protocol, username, password, hostname, and port number), size (database and table size), and running queries.
The database is addressed using a DBURL. If commands are left out you will get that database's interactive shell.
When using GNU SQL for a publication please cite:
O. Tange (2011): GNU SQL - A Command Line Tool for Accessing Different Databases Using DBURLs, ;login: The USENIX Magazine, April 2011:29-32.
GNU niceload slows down a program when the computer load average (or other system activity) is above a certain limit. When the limit is reached the program will be suspended for some time. If the limit is a soft limit the program will be allowed to run for short amounts of time before being suspended again. If the limit is a hard limit the program will only be allowed to run when the system is below the limit.
Talking Drupal: Talking Drupal #447 - Drupal Single Sign On
For show notes visit: www.talkingDrupal.com/447
Topics- What is Single Sign On (SSO)
- Does Drupal already support SSO
- Why is SSO on drupal.org important
- Camps using SSO
- Other possibilities
- Gitlab login
- Cloud IAM
- Why did the Drupal Association choose Cloud IAM
- How do you see the collaboration growing
- Where are we now
- What are the next steps
- How far are we from this becoming a reality
- What does onboarding look like
- Will third party sites be able to use D.O SSO
- Can the community help
- Fog & Fireflies
- First book
- Can you buy it now
- Single Sign On is coming to Drupal.org thanks to Cloud IAM
- A new book called Fog & Fireflies
- Open ID Connect module
- Keycloak
- Neil Drumm
- Lucas Heddn
- Marco Villegas
- Tim Lehnen
Tim Lehnen - aspenthornpress.com hestenet
HostsNic Laflin - nLighteneddevelopment.com nicxvan John Picozzi - epam.com johnpicozzi Matt Glaman - mglaman.dev mglaman
MOTW CorrespondentMartin Anderson-Clutz - mandclu
- Brief description:
- Have you ever wanted to have a field on user profiles specifically designed for drupal.org usernames? There’s a module for that
- Module name/project name:
- Brief history
- How old: created in August 2019 by hussainweb AKA Hussain Abbas of Axelerant
- Versions available: 2.0.0-beta4
- Maintainership
- Actively maintained, that release was made less than 6 months ago
- Test coverage
- Number of open issues: 8 open issues, none of which are bugs
- Usage stats:
- 1 site
- Module features and usage
- The module provides a new field type, along with its own widget and formatter
- With a simple checkbox, you can get the module to validate that the provided username is registered on drupal.org
- What’s really powerful about this module is that it can also pull other information from the drupal.org profile, such as first and last name, country, bio, and more
- It does this by leveraging a Guzzle-based API client for drupal.org that Hussain created as part of a DrupalCon Asia developer contest
- I believe the intended use of the modules is to use a provided drush command to copy the values from the drupal.org username field into other fields, where they would be displayed to site visitors
- Although this module isn’t something that a lot of sites will need, I could see it being really useful for Drupal camp websites, to automatically collect a lot of the information that many such sites ask users to populate manually
- I think it’s also an interesting use of the Drupal.org API, and could be a useful reference for anyone needing to implement a custom integration
Contributing is more than just code
When thinking about how to contribute to KDE, many people probably still think that you have to write actual code. While it’s true that C++ and QML is at the heart of our applications, it’s just one puzzle piece of many that make up a successful product. Besides donating money to KDE or developers like me individually, there’s much more you can do to support us: promo work, drawing icons, brainstorming ideas, writing documentation, triaging bug reports or writing new ones, or in this case sending the relevant piece of hardware to a developer. Every single contribution counts!
It’s been at least ten years since I last used an optical driveA key ingredient to KDE’s cross-platform story is Solid, our device integration framework. It lets applications enumerate devices, such as hard drive partitions, USB thumb drives, but also batteries and peripherals, in a platform-independent way. When it comes to hardware, sometimes emulating its behavior is tough and even a virtual machine might not behave exactly the same as the real thing. Here’s the story of how the donation of a portable DVD drive let me unlock a massive performance boost.
On Linux, to enumerate storage devices it talks to UDisks2 on DBus. You can actually view all the information yourself by using qdbusviewer or d-feet and navigate to the org.freedesktop.UDisks2 service on the System Bus. The Places panel found in applications like Dolphin but also the Device Notifier applet in System Tray query Solid for interesting storage devices to display to the user.
On a typical system, there’s plenty of mount points (particularly Snap is notorious for creating lots of loop devices) which we don’t want to show. Nevertheless, we have to fetch them all to decide whether they’re interesting to us. For example, usually only storage devices explicitly listed in fstab, mounted from /media (your typical USB stick drive), or originating in the user’s home directory (an ISO image in your Downloads folder) are displayed.
Currently, owing to Solid’s modular nature and the fact that a lot of its original code was written in KDE 4 times where many API conveniences in DBus and UDisks didn’t exist yet, Solid uses the DBus Introspectable interface to enumerate all devices. This gives us an XML description of the available interfaces and object paths on the service. As you can imagine, receiving and processing that data string can be quite expensive. Furthermore, for every device that was enumerated, a Solid Device instance is created which then fetches all properties from all interfaces on the relevant object, which again can be slow. The DBus interfaces an object implements in UDisks gives us a good idea of what type of storage we’re dealing with, for example org.freedesktop.UDisks.Loop contains properties regarding loop devices, such as the original path of the image file that has been mounted, which in turn is also a org.freedesktop.UDisks.Block device, and so on.
Retrieving a mount point via DBus, eventually you realize that “47” is forward slash.There must be a better way to do this, right? There is! It’s called org.freedesktop.DBus.ObjectManager. It lets you fetch all objects and their properties in a single call. This would allow Solid to query everything at once on startup and then only fetch individual properties when they get invalidated or a new device is plugged in at runtime.
Both encrypted drives and optical media are somewhat special in that they’re a drive (or container) containing the actual media or partition. While a USB stick just disappears entirely as you unplug it, a DVD drive will only have its media ejected. It means we need to monitor the drive and check its media availability and then announce the disc inside of it. However, when I asked fellow KDE developers to test my changes, the patch-set worked fine with the CD-ROM drive emulated in a virtual machine but failed miserably with a legit drive. The situation with Audio CDs was even worse since they don’t have a regular file system associated with. And guess what: there’s also CDs that contian both audio and data.
I asked around on KDE’s Matrix channels whether someone might have a spare USB CD-ROM drive and is willing to help. The other day MartinR approached me in the KDE neon channel and said he had a spare one he could mail somewhere. When it arrived a week later, I immediately tried it out (it’s been some time since I’ve seen a device with a USB Y cable) and it indeed let me iron out a bunch of remaining issues with the original patch-set. There’s other examples, too, where having the actual hardware is key. For instance, in order to properly develop HDR support in KWin, the developers need to have an actual screen capable of displaying it.
KWin Wayland running in HDR mode on a portable OLED screen, courtesy of Xaver (the picture of course doesn’t do it justice)The change isn’t actually merged yet as I am in the process of writing a fake UDisks2 service for Solid. This would let us run a bunch of automated tests, particularly for the weird cases, and ensure that my refactor doesn’t cause any regressions. Solid has unit tests for its general working but not specifically to the way it interacts with UDisks2. A bug in Solid that renders your data accessible (sorry about that encrypted drives bug the other week) or causes the shell or some KDE background service to crash upon plugging in a device would be a disaster.
Having said all of that, let me thank you again very much, without your generous donation I would not have been able to realize this project. On my laptop, the time it took to initialize a KFilePlacesModel went down from 55–60 ms to just under 20 ms. The number of DBus calls it places to the UDisks2 service went down from around 60 “get all properties”, 45 “introspect”, and 15 “get this particular property” calls to a single “get all managed objects” call, and one “introspect” call I have yet to hunt down. I’m sure our users will very much appreciate a faster starting Dolphin and snappier file dialog! Also many thanks to Fabian Vogt and notably Jan R. for continued advice and testing.
If you have a KDE development setup (and if you don’t, go set one up), please test this Solid patch, and let me know if it causes any trouble for you!
The Drop Times: Dialogues that Shape the Future.
Dear Readers,
At the core of any vibrant community lies the foundational practice of open and effective communication—where growth is nurtured, and innovation is sparked. For The DropTimes, our mission transcends beyond the basic dissemination of information; we actively facilitate a platform for dialogue, connecting the latest technological evolutions with an engaged readership. This integral role embodies our commitment to not only inform but also to catalyze conversation and change, ensuring that every voice can be heard and every insight can be shared, thereby driving Drupal's growth.
The vitality of these discussions within the Drupal community is observable. Whether debating the necessity of new modules for Drupal 10 or discussing the release dates for Drupal 11, each dialogue enriches our collective understanding and propels the platform forward. These conversations, highlighted in our articles and series, testify to the importance of discussing diverse perspectives and disseminating varied opinions.
By engaging in such dynamic exchanges, the community not only addresses immediate needs and challenges but also shapes the future of the technology. This ongoing dialogue ensures that Drupal remains at the cutting edge, constantly evolving in response to the contributions and concerns of its global user base. With that, let's move on to last week's highlights.
Kazima Abbas, a sub-editor with The DropTimes [TDT] in the second part of the "Drupal's Innovation & Future: 2024 and Beyond" series, takes a closer look at the thoughts and predictions of Drupal experts: Carlos Rincon Sanchez, Oscar Loria, Stella Power, Krishna R P, and Sinduri Guntupalli. The series aims to examine what might lie ahead for the Drupal platform with meticulous discussions.
In another interesting exchange, I had the opportunity to sit with Grzegorz Bartman, the CEO of Droptica, to discuss Droopler 4, the latest version of their Drupal distribution. Droopler is a Drupal distribution, a pre-built website that users can customize and manage to fit their requirements without having to start from scratch. Learn in-depth about Droopler 4 with this interview with Greg Bartman.
Last week's TDT Spotlight featured Gai Technologies, an organization rooted in the open-source ethos with more than 12 years of experience in web solutions. Elma John, our sub-editor, discussed the inception and journey of Gai Technologies, which is located in the serene setting of the Himalayas, with N. Krishnan, the CEO.
Pantheon, a leading SaaS-based WebOps platform, has entered into a strategic partnership with Lytics, a premier customer data platform (CDP) fully integrated with Google Cloud. Chris Yates, Pantheon’s vice president of products, and James McDermott elaborated on the technical synergies during a detailed discussion with The DropTimes. Read the detailed article to learn how this synergy will benefit Pantheon and Lytics' customers.
TDT is actively seeking volunteers to cover DrupalCon Portland 2024. Meanwhile, the insights from our DrupalCon Pittsburg 2023 volunteers can be read here. Aiden F Dean Dunn, a then-recent graduate from the University of Pittsburgh, provides a fresh perspective on the event in a conversation with Varun Baker, highlighting the welcoming and diverse nature of the Drupal community. Additionally, the regular registration window of DrupalCon Portland 2024 has ended; late registration is open today.
Drupalers can now win a free ticket to DrupalCon Barcelona 2024 with the promo video contest. All are encouraged to record a brief video—preferably in landscape mode—stating their name and country of origin and send it to the organizers. Participants are also urged to share their videos on social media to encourage others to join the campaign, which aims to highlight the Drupal community's global diversity. The deadline for submissions is April 24, 2024.
The Healthcare Summit at DrupalConPortland, scheduled for Thursday, May 9, is hailed as a must-attend event that will offer valuable insights for navigating the complexities of the healthcare industry in the digital age. Tickets are now available for Drupal Camping 2024 in Wolfsburg. Tickets, priced between 80 € and 100 €, offer access to four days of camping, chilling, swimming, barbecuing, and, of course, all things Drupal.
There are Drupal events around the globe each week to keep Drupal enthusiasts engaged. A complete list of events for the week is available here.
Jeff Greenberg, a seasoned Drupal Architect at iFACTORY, recently sparked a discussion on LinkedIn about the apparent lack of a Drupal 10 module that enables users to subscribe by email to be notified when new content is posted. This query led to a broad response from various Drupal community experts, each offering insights or potential solutions. Dive into the discussion here.
The organizers of Splash Awards, Deutschland & Österreich, have announced the date for this year's Splash Awards 2024 Germany & Austria, set to take place on November 7 in Berlin. The Singapore Government Digital Services team has recently introduced Purple A11y, a comprehensive open-source accessibility testing tool designed to enhance website usability for persons with disabilities.
The BAT API module, widely recognized for its robust booking and availability management capabilities, has officially launched support for Drupal 10. Baddy Sonja Breidert, CEO and Co-Founder of 1xINTERNET, recently discussed enhancements to the Frontend Editing module they designed to streamline the editor experience.
In other news, Smile launched a new no-code Drupal profile named Sobki at DrupalCamp Rennes 2024 on March 27.
We acknowledge that there are more stories to share. However, due to selection constraints, we must pause further exploration for now.
To get timely updates, follow us on LinkedIn, Twitter and Facebook. Also, join us on Drupal Slack at #thedroptimes.
Thank you,
Sincerely
Alka Elizabeth
Sub-editor, The DropTimes.
Open Source AI Definition – Weekly update April 22
- A user added in the forum that there is an issue as traditional copyright protection might not apply to weight models because they are essentially mathematical calculations. “ licensing them through any kind of copyright license will not be enforceable !! and this means that anybody can use them without any copyright restriction (assuming that they have been made public) and this means that you cannot enforce any kind of provisions such as attribution, no warranty or copyleft” They suggest using contractual terms instead of relying on copyright as a workaround, acknowledgement that this will trigger a larger conversation
- Clarification needed under “What is Open Source AI”
- Discussion on whether “made available” should be changed to “released” or “distributed”
- One user pointed out that “made available” is the most appropriate, as the suggested wordings would be antagonistic and limiting
- Continuation of last week’s issue regarding defining who these four freedoms are for, deployers, users or someone else.
- Added that a user understands it as “We need essential freedoms to enable users…”
- But, then who are we defining as “Users”? Is it the person deploying the AI or the calling prompt?
- Another wording is suggested: “Open Source AI is an AI system that is made available under terms that grant, without conditions or restrictions, the rights to…”
- Clarification is needed under “Preferred form to make modification to a machine learning system”,
- Specifically to the claim: (The following components are not required,) but their inclusion in releases is appreciated.
- Clarification regarding whether this means best practice or it’s a mere a suggestion.
- Suggestion to change the sentence to “The following components are not required to meet the Open Source AI definition and may be provided for convenience.” This will also “consider if those components are provided, can they be provided under different terms that don’t meet the Open Source AI definition, or do they fall under the same OSI compliant license automatically. “
- Question regarding the addition of “may” under data transparency in the 0.0.7 draft definition, which was not included in the 0.0.6 one, considering that the components are described as “required” in the checklist below
- (Context: “Sufficiently detailed information on how the system was trained. This may include the training methodologies and techniques, the training data sets used, information about the provenance of those data sets, their scope and characteristics; how the data was obtained and selected, the labelling procedures and data cleaning methodologies.”)
- Another user seconds this and further adds that it should be changed to “must”, or something else which is definitive.
In case you missed it, the with town hall was held last Friday. Access the recordings and slides used here
Real Python: Write Unit Tests for Your Python Code With ChatGPT
Having a good battery of tests for your code may be a requirement for many Python projects. In practice, writing unit tests is hard and can take a lot of time and effort. Therefore, some developers don’t like to write them. However, with large language models (LLMs) and tools like ChatGPT, you can quickly create robust and complete sets of tests for your Python code.
In Python, you can use multiple different tools for writing tests. The most commonly used tools include doctest, unittest, and pytest. ChatGPT can be of great help in writing tests with any of these tools.
In this tutorial, you’ll:
- Prompt ChatGPT to create tests using doctest
- Use ChatGPT to write unittest tests, fixtures, and suites
- Craft ChatGPT prompts to write pytest tests and fixtures
- Use alternative prompts for cases where the code isn’t available
To get the most out of this tutorial, you should set up a ChatGPT account and know the basics of interacting with this tool using prompt engineering. You should also know the basics of how to test code in Python.
Get Your Code: Click here to download the free sample code you’ll use to write unit tests for your Python code using ChatGPT.
Benefits of Using ChatGPT for Testing Python CodeHaving good and up-to-date unit tests for your code is a must for any Python project. Poorly tested code or code without tests may end up being unreliable and weak. With automated tests, you can ensure and show that your code works correctly in different scenarios. So, having tests is important from the technical and commercial point of view.
Writing good tests is hard and can take a lot of time. That’s why some developers don’t like to write them at all. Using large language models (LLM) like ChatGPT can be a viable alternative for providing your projects and code with proper tests.
Note: You can use ChatGPT and other LLMs in many useful ways in the context of Python development. Check out the following resources for other use cases and useful insights:
- ChatGPT: Your Personal Python Coding Mentor
- Episode 174: Considering ChatGPT’s Technical Review of a Programming Book
- Document Your Python Code and Projects With ChatGPT
- Prompt Engineering: A Practical Example
- Build an LLM RAG Chatbot With LangChain
Some of the benefits of using ChatGPT to write tests for your Python code include the following:
- Efficiency and speed: It can generate unit tests based on specifications or code snippets. This possibility significantly reduces the time that you need to spend writing tests. So you can focus on writing application logic.
- Coverage improvement: It can suggest tests for edge cases or scenarios that developers might not immediately consider. This way, you can improve your code’s test coverage.
- Error reduction: It can reduce human error in writing repetitive or boilerplate test code.
- Learning and onboarding: It can serve as an educational tool for developers who are new to testing frameworks or unfamiliar with best practices in unit testing. The generated tests can help developers learn about testing patterns, assertions, and ways to effectively write tests.
With ChatGPT, you can generate unit tests for your Python code in almost no time. However, you must note that even though the generated tests can look good, you should still review and possibly refine the generated tests.
Note: For this tutorial, you’ll use a free ChatGPT account that’s powered by the GPT-3.5 LLM. You can use this model for free with the default web interface by OpenAI. If you use a paid account with GPT-4, then your results might be more accurate and faster.
Additionally, you’ll use an individual chat thread for each major section in the tutorial. So you’ll use different threads for the doctest, unittest, and pytest sections.
Using a single chat thread to run all the examples in this tutorial may cause the chat to generate significantly different responses because of the past context, which includes previous prompts and responses.
In the following sections, you’ll learn the basics of using ChatGPT as an assistant for creating coherent unit tests for your Python projects using different test frameworks and libraries.
Writing doctest Tests With ChatGPTPython’s doctest module provides a lightweight testing framework that you can use for test automation. It can read the test cases from your project’s documentation and your code’s docstrings. This framework comes with the Python interpreter, so you’ll have it at your disposal with any Python installation, which is great.
Note: To dive deeper into how to use the doctest module for testing your code, check out Python’s doctest: Document and Test Your Code at Once.
With doctest, you can write code that provides examples of how your code works, simulating REPL sessions. These examples work as documentation and also as test cases or unit tests. Each doctest test needs a statement or expression and an expected result.
You can use ChatGPT to help you out with writing doctest tests. First, you need some code to test. The following function tries to tackle the FizzBuzz challenge, where you return "fizz" for numbers divisible by three, "buzz" for those divisible by five, and "fizz buzz" for those divisible by both three and five.
Go ahead and create a fizzbuzz.py file and add the following code to it:
Python fizzbuzz.py def fizzbuzz(number): if number % 3 == 0: return "fizz" elif number % 5 == 0: return "buzz" elif number % 15 == 0: return "fizz buzz" else: return number Copied!This function works okay for numbers divisible by 3 or 5. However, there is a slight issue with numbers that are divisible by both. Even though you know this, go ahead and start a new chat thread. Then, prompt ChatGPT to write doctest test for the function:
You: Write doctest tests for the following function:
Python def fizzbuzz(number): if number % 3 == 0: return "fizz" elif number % 5 == 0: return "buzz" elif number % 15 == 0: return "fizz buzz" else: return number Copied!ChatGPT:
Certainly! The function you’ve provided implements a basic FizzBuzz algorithm but with a slight logical error. The check for divisibility by 15 should come before checks for 3 and 5, as every number divisible by 15 is also divisible by both 3 and 5, but your current order will never reach the "fizz buzz" case. Here’s a corrected version of your function with the logical order fixed, followed by doctest tests for it:
Python def fizzbuzz(number): """ Returns 'fizz' if number is divisible by 3, 'buzz' if number is divisible by 5, 'fizz buzz' if number is divisible by 15, and the number itself otherwise. >>> fizzbuzz(3) 'fizz' >>> fizzbuzz(5) 'buzz' >>> fizzbuzz(15) 'fizz buzz' >>> fizzbuzz(4) 4 >>> fizzbuzz(30) 'fizz buzz' >>> fizzbuzz(9) 'fizz' >>> fizzbuzz(10) 'buzz' >>> fizzbuzz(2) 2 """ if number % 15 == 0: return "fizz buzz" elif number % 3 == 0: return "fizz" elif number % 5 == 0: return "buzz" else: return number Copied!To use these doctest tests, you’ll need to include them in the docstring of your function as shown above. Then, you can run the tests with the doctest module by adding the following to your script:
Python if __name__ == "__main__": import doctest doctest.testmod() Copied!This code will automatically run the tests defined in the docstrings when you execute the Python file. Remember, the corrected order of conditions in the function ensures that numbers divisible by both 3 and 5 return "fizz buzz", which is crucial for the FizzBuzz logic.
Wow! That great! The chat not only wrote the doctest tests for you. It also fixed the issue, explained important concepts around doctest, and provided instructions on how to run the tests. Note that the tests cover both regular and edge cases, which is pretty convenient.
Read the full article at https://realpython.com/chatgpt-unit-tests-python/ »[ 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 ]
Bits from Debian: Debian Project Leader Election 2024, Andreas Tille elected.
The voting period for the Debian Project Leader election has ended. Please join us in congratulating Andreas Tille as the new Debian Project Leader.
The new term for the project leader started on 2024-04-21.
369 of 1,010 Debian Developers voted using the Condorcet method.
More information about the results of the voting are available on the Debian Project Leader Elections 2024 page.
Many thanks all of our Developers for voting.
Vincent Fourmond: QSoas version 3.3 is out
QSoas is a powerful open source data analysis program that focuses on flexibility and powerful fitting capacities. It is released under the GNU General Public License. It is described in Fourmond, Anal. Chem., 2016, 88 (10), pp 5050–5052. Current version is 3.3. You can download for free its source code or precompiled versions for MacOS and Windows there. Alternatively, you can clone from the GitHub repository.