Feeds
Vincent Sanders: Bee to the blossom, moth to the flame; Each to his passion; what's in a name?
I like the sentiment of Helen Hunt Jackson in that quote and it generally applies double for computer system names. However I like to think when I named the first NetSurf VM host server phoenix fourteen years ago I captured the nature of its continuous cycle of replacement.
We have been very fortunate to receive a donated server to replace the previous every few years and the very generous folks at Collabora continue to provide hosting for it.Recently I replaced the server for the third time. We once again were given a replacement by Huw Jones in the form of a SuperServer 6017R-TDAF system with dual Intel Xeon Ivy Bridge E5-2680v2 processors. There were even rack rails!The project bought some NVMe drives and an adaptor cards and I attempted to arrange to swap out the server in January.
Here we come to the slight disadvantage of an informal arrangement where access to the system depends upon a busy third party. Unfortunately it took until May to arrange access (I must thank Vivek again for coming in on a Saturday to do this)
In the intervening time, once I realised access was going to become increasingly difficult, I decided to obtain as good a system as I could manage to reduce requirements for future access.
I turned to eBay and acquired a slightly more modern SuperServer with dual Intel Xeon Haswell E5-2680v3 processors which required purchase of 64G of new memory (Haswell is a DDR4 platform).
I had wanted to use Broadwell processors but this exceeded my budget and would only be a 10% performance uplift (The chassis, motherboard and memory cost £180 and another £50 for processors was just too much, maybe next time)
While making the decision on the processor selection I made a quick chart of previous processing capabilities (based on a passmark comparison) of phoenix servers and was startled to discover I needed a logarithmic vertical axis. Multi core performance of processors has improved at a startling rate in the last decade.
When the original replacement was donated I checked where the performance was limited and noticed it was mainly in disc access which is what prompted the upgrade to NVMe (2 gigabytes a second peek read throughput) which moved the bottleneck to the processors where, even with the upgrades, it remains.
I do not really know if there is a conclusion here beyond noting NetSurf is very fortunate as a project to have some generous benefactors both for donating hardware and hosting for which I know all the developers are grateful.
Now I just need to go and migrate a huge bunch of virtual machines and associated sysadmin to make use of these generous donations.
Kirigami Addons 1.2
Kirigami Addons 1.2 is out with some accessibility fixes and one new component: FloatingToolBar.
AccessibilityDuring the accessibility sprint, there was an effort to ensure the date and time pickers were actually accessible. Aside from improving the screen reader support, this also allow to write Selenium integration tests which uses these components in Itinerary. Thanks Volker, David Redundo and others for working on this!
FloatingToolBarMathis and I worked on a new addition to Kirigami Addons adding to the existing FloatingButton and DoubleFloatingButton components. This component is perfect to add tool to editing and drawing areas and can either contain a simple RowLayout/ColumnLayout containing ToolButtons or a Kirigami.ActionToolBar.
import org.kde.kirigamiaddons.components import org.kde.kirigami as Kirigami FloatingToolBar { contentItem: Kirigami.ActionToolBar { actions: [ Kirigami.Action { ... } ] } } DialogsWith the style used by FormCardDialog and MessageDialog merged in Kirigami and soon in qqc2-desktop-style too, I did some changes to the FormCardDialog and MessageDialog to use the same padding as Kirigami.Dialog.
MessageDialog now works better on mobile with the layout adapting itself to the dialog size.
messagedialog with a mobile layout
Aditionally similar to KMessageBox, MessageDialog has an optional “don’t show again” option which can be enabled by setting the dontShowAgainName property similar to the KMessageBox api.
I also prepared these two components to work as standalone windows which is likely to come with this Qt 6.8 change request.
CategorizedSettingsJonah fixed a bug where it would be impossible to escape the settings on mobile.
DocumentationI added more screenshot to the API documentation and updated the TableView example app to use a ‘frameless’ style.
Qt 6.7 supportThis release also brings support for Qt 6.7 on Android as this release introduced an API and ABI change to the Android code. Thanks Joshua for tackling this issue.
Python People: Shauna Gordon-McKeon - Open Source Governance, Women's Soccer, and Django
This is a really fun talk with Shauna.
We talk about:
- Going from academia to tech
- Django
- Open source project governance and Governing Open
- Womens Soccer and the NWSL
Shauna's technical consulting business is Galaxy Rise Consulting
The Complete pytest Course
- Level up your testing skills and save time during coding and maintenance.
- Check out courses.pythontest.com
Mike Driscoll: Episode 40 – Open Source Development with Antonio Cuni
In this episode, we discuss working on several different open-source Python packages. Antonio Cuni is our guest, and he chats about his work on PyScript, pdb++, pypy, HPy, and SPy.
Listen in as we chat about Python, packages, open source, and so much more!
Show LinksHere are some of the projects we talked about in the show:
- The Invent Framework
- PyScript
- pdb++ – A drop-in replacement for pdb
- pypy – The fast, compliant, alternative Python implementation
- HPy – A better C API for Python
- SPy – Static Python
The post Episode 40 – Open Source Development with Antonio Cuni appeared first on Mouse Vs Python.
KDE neon Rebasing on Ubuntu Noble
The new Ubuntu LTS was released in April, congratulations to all involved with that. I know Scarlett worked hard to get Kubuntu back into shape so do if that a try if you want a stable Plasma 5 desktop.
In the KDE neon project we don’t like to sit still for long so we are now building all our KDE packages on Ubuntu Noble, versioned 24.04. This always takes longer than it feels like it should, mostly because it’s a moving target to keep everything compiled as more KDE software gets released, so no promises on when it’ll be ready but we’ll try to be fast because the old Ubuntu base of jammy (22.04) is showing its age with projects like Krita no longer able to compile there.
So far the main issues are all the changes needed for 64-bit time_t to fix the y2k38 problem, we know you wouldn’t want your clocks to zero out in 2038.
Thorsten Alteholz: My Debian Activities in April 2024
This month I accepted 386 and rejected 39 packages. The overall number of packages that got accepted was 386.
I also added lots of +moreinfo tags to some RM bugs. Is it that hard to check the reverse dependencies on your own?
This was my hundred-eighteenth month that I did some work for the Debian LTS initiative, started by Raphael Hertzog at Freexian.
During my allocated time I uploaded:
- [DLA 3781-1] libgd2 security update for three CVEs to fix out-of-bounds reads or NULL pointer derefence
- [DLA 3784-1] libcaca security update for two CVEs to fix heap buffer overflows
- [DLA 3805-1] qtbase-opensource-src security update for seven CVEs to fix buffer overflows, infinite loops or application crashs due to processing of crafted input files. When trying to compile the fixed version, I got an error that there is no .compare() for QByteArray available. Yes, indeed, QByteArray::compare, which was used in a patch, was introduced only in Qt 6.0. So I had to backport that to Buster as well. It is astonishing that such a basic function was not needed before.
- [#1070153] bookworm-pu: qtbase-opensource-src/5.15.8+dfsg-11+deb12u2 to fix two CVEs
- [#1070154] bullseye-pu: qtbase-opensource-src/5.15.2+dfsg-9+deb11u1 to fix ten CVEs
- [#1064550] uploaded libjwt
- [#1067544] uploaded libmicrohttpd
- [ELA-1069-1]libgd2 security update for three CVEs to fix out-of-bounds reads or NULL pointer derefence in Jessie and Stretch
- [ELA-1070-1]libcaca security update for two CVEs to fix heap buffer overflows in Jessie and Stretch
- [ELA-1083-1]qtbase-opensource-src security update for five CVEs to fix buffer overflows, infinite loops or application crashs due to processing of crafted input files in Stretch
- … mailio a cross platform C++ library for email support
- … pksc11-proxy a proxy for the PKCS11-library
I also continued to work on tiff and last but not least did a week of FD and attended the monthly LTS/ELTS meeting.
Debian ELTSThis month was the sixty-ninth ELTS month. During my allocated time I uploaded:
I also continued to work on an update for tiff in Jessie and Stretch, did a week of FD and attended the LTS/ELTS meeting.
Debian PrintingThis month I uploaded new upstream or bugfix versions of:
In preparation for cups3 I introduced a new package:
This work is generously funded by Freexian!
Debian AstroThis month I uploaded a new upstream or bugfix version of:
Debian IoTThis month I uploaded new upstream or bugfix versions of:
Debian MobcomThis month I uploaded new upstream or bugfix versions of:
I have done these uploads in preparation for my GSoC student, who will be officially announced in May.
miscI am sorry for people still using 32bit computers, but from my point of view these are dying architectures. So if there are any problems with builds on those architectures, I no longer try to fix them but file RM bugs. Patches are welcome, but I am no longer willing to spend any time for this.
This month I uploaded new upstream or bugfix versions of:
This month I even found some time to introduce new packages:
Robin Wilson: New Projects page on my website
Just a quick post here to say that I’ve added a new Projects page to my freelance website. I realised I didn’t have anywhere online that I could point people to that had links to all of the ‘non-work’ (maybe that should be ‘non-paid’) projects I’ve made.
These projects include my Free GIS Data site, the British Placename Mapper, Py6S and more. I’ve also put together a separate page (linked from the projects page) with all my university theses (PhD, MSc and undergraduate) and other university work – which still get a remarkably high number of downloads.
Have a look here, or see a screenshot of the first few entries below:
Talk Python to Me: #461: Python in Neuroscience and Academic Labs
Gunnar Wolf: Hacks, leaks, and revelations • The art of analyzing hacked and leaked data
Imagine you’ve come across a trove of files documenting a serious deed and you feel the need to “blow the whistle.” Or maybe you are an investigative journalist and this whistleblower trusts you and wants to give you said data. Or maybe you are a technical person, trusted by said journalist to help them do things right–not only to help them avoid being exposed while leaking the information, but also to assist them in analyzing the contents of the dataset. This book will be a great aid for all of the above tasks.
The author, Micah Lee, is both a journalist and a computer security engineer. The book is written entirely from his experience handling important datasets, and is organized in a very logical and sound way. Lee organized the 14 chapters in five parts. The first part–the most vital to transmitting the book’s message, in my opinion–begins by talking about the care that must be taken when handling a sensitive dataset: how to store it, how to communicate it to others, sometimes even what to redact (exclude) so the information retains its strength but does not endanger others (or yourself). The first two chapters introduce several tools for encrypting information and keeping communication anonymous, not getting too deep into details and keeping it aimed at a mostly nontechnical audience.
Something that really sets this book apart from others like it is that Lee’s aim is not only to tell stories about the “hacks and leaks” he has worked with, or to present the technical details on how he analyzed them, but to teach readers how to do the work. From Part 2 onward the book adopts a tutorial style, teaching the reader numerous tools for obtaining and digging information out of huge and very timely datasets. Lee guides the reader through various data breaches, all of them leaked within the last five years: BlueLeaks, Oath Keepers email dumps, Heritage Foundation, Parler, Epik, and Cadence Health. He guides us through a tutorial on using the command line (mostly targeted at Linux, but considering MacOS and Windows as well), running Docker containers, learning the basics of Python, parsing and filtering structured data, writing small web applications for getting at the right bits of data, and working with structured query language (SQL) databases.
The book does an excellent job of fulfilling its very ambitious aims, and this is even more impressive given the wide range of professional profiles it is written for; that being said, I do have a couple critiques. First, the book is ideologically loaded: the datasets all exhibit the alt-right movement that has gained strength in the last decade. Lee takes the reader through many instances of COVID deniers, rioters for Donald Trump during the January 2021 attempted coup, attacks against Black Lives Matter activists, and other extremism research; thus this book could alienate right-wing researchers, who might also be involved in handling important whistleblowing cases.
Second, given the breadth of the topic and my 30-plus years of programming experience, I was very interested in the first part of each chapter but less so in the tutorial part. I suppose a journalist reading through the same text might find the sections about the importance of data handling and source protection to be similarly introductory. This is unavoidable, of course, given the nature of this work. However, while Micah Lee is an excellent example of a journalist with the appropriate technical know-how to process the types of material he presents as examples, expecting any one person to become a professional in both fields is asking too much.
All in all, this book is excellent. The writing style is informal and easy to read, the examples are engaging, and the analysis is very good. It will certainly teach you something, no matter your background, and it might very well complement your professional skills.
Dirk Eddelbuettel: RcppArmadillo 0.12.8.3.0 on CRAN: Upstream Bugfix
Armadillo is a powerful and expressive C++ template library for linear algebra and scientific computing. It aims towards a good balance between speed and ease of use, has a syntax deliberately close to Matlab, and is useful for algorithm development directly in C++, or quick conversion of research code into production environments. RcppArmadillo integrates this library with the R environment and language–and is widely used by (currently) 1144 other packages on CRAN, downloaded 34.2 million times (per the partial logs from the cloud mirrors of CRAN), and the CSDA paper (preprint / vignette) by Conrad and myself has been cited 583 times according to Google Scholar.
Conrad released a new upstream bugfix yesterday (for a corner case with fftw3). We uploaded it yesterday too but it took a day for the hard-working CRAN maintainers to concur that the one (!) NOTE from reverse-dependency checking over 1100 packages was in a fact a false positve. And so it appeared on CRAN (very) early this morning. We also made a change removing a long-redundant setter for C++11 mode via the plugin. No other changes were made.
The set of changes since the last CRAN release follows.
Changes in RcppArmadillo version 0.12.8.3.0 (2024-05-07)Upgraded to Armadillo release 12.8.3 (Cortisol Injector)
- Fix issue in fft() and fft2() in multi-threaded contexts with FFTW3 enabled
No longer set C++11 for the Rcpp plugin as this standard has been the default by R for very long time now.
Courtesy of my CRANberries, there is a diffstat report relative to previous release. More detailed information is on the RcppArmadillo page. Questions, comments etc should go to the rcpp-devel mailing list off the Rcpp R-Forge page.
If you like this or other open-source work I do, you can sponsor me at GitHub.
This post by Dirk Eddelbuettel originated on his Thinking inside the box blog. Please report excessive re-aggregation in third-party for-profit settings.
Season Of KDE 2024 Conclusion
Another year, another successful Season Of KDE for 12 contributors!
This article has been co-written with the input from all contributors.
Translation ProjectsKDE counts on a very active translation community and translates software into over 50 different languages. In SOK 2024, we had 2 projects that focused on translating multiple apps into Hindi. Asish Kumar and Akash Kumar joined the KDE Hindi community to translate multiple apps into Hindi. They both worked together on translating Merkuro, then Akash focused on Tellico while Asish worked on KDE Connect and Cantor.
Kdenlive
Kdenlive brings you all you need to edit and put together your own movies. We had 2 projects for KDE's full-featured video editor:
-
Ajay Chauhan implemented multi-format rendering for Kdenlive by adding a filter to adjust the aspect ratio of video clips in the main track, allowing users to select the desired aspect ratio during export, and integrating it into the final rendering profile. Ajay also added code to apply filters to clips, calculate crop parameters, and handle video cropping to the desired ratio; and implemented the GUI component ComboBox that selects the aspect ratio and ensures that the selected ratio is passed to the RenderRequest object. Additionally, various issues were fixed during development, such as temporary file handling issue, preventing crashes, and refactoring code.
-
aisuneko icecat created a prototype keyframe curve editor GUI for Kdenlive. Based on recent progress in introducing advanced keyframe types and capabilities into the editor, the widget allows the user to intuitively view and control the current animation curve of keyframable effect parameters. As of now, the widget supports basic interactions such as dragging and double clicking, and integrates well with other existing Kdenlive components. This is still a work-in-progress feature, as more work needs to be done beyond SoK to have it further enhanced before it can be released to end users.
There are 5 new projects that made measuring the energy consumption of software easier and more integrated in the development pipeline. This helps make KDE software more efficient and environmentally friendly, as well as more accessible at the same time:
-
Sarthak Negi focused on testing, bug-fixing and integrating measurement workflows on KEcoLab. After setting up the testing environments, Sarthak worked on creating a CI test and refactoring code for efficiency and the code has been merged in the main repository.
-
Pradyot Ranjan worked on improving and updating the setup guide for selenium, a tool to automatize testing. The result can be found on this wiki page.
-
Amartya Chakraborty added support for KdeEcoTest on the Windows platforms. To do this, Amartya replicated test-scripts for Okular test using KdeEcoTest which previously used xdotool. Now this test-script can be executed on any platform. The conditional installation of packages based on the platform using pipenv has been implemented.
-
Athul Raj Kollareth worked on bringing support for KdeEcoTest on Wayland systems. The initial work consisted of [adding an abstraction layer](https://invent.kde.org/echarruau/feep-win-32-kdotool-integration/-/ merge_requests/1) so that KdeEcoTest could be run on different platforms including Windows. To build support for Wayland, we had to first restrict our scope and finally decided to move with only supporting the KWin compositor as it had built in functionalities for automating window related manipulations on the GUI. To automate input devices, the Linux kernel's evdev module was used which allowed us to monitor input devices and also emulate them using uinput. With these changes integrated into KdeEcoTest, we were able to run tests on Wayland, X11 and Windows thanks to Amartya's implementation. ![KEcoTest running on Wayland](KdeEcoTest_running under wayland.png)
-
Aakarsh MJ worked on integrating KEcolab into Okular's pipeline. This will allow the Okular team to measure energy consumption for each release. This paves the way for the creation of a template which will be further helpful for other projects as well. A merge request is in progress to integrate it into Okular.
Cantor is an application that lets you use your favorite mathematical programming language from within a friendly worksheet interface, while Labplot is KDE's user-friendly data visualization and analysis software. Both applications are closely intertwined, and have had three projects completed during SOK:
-
Dhairya Majmudar worked on extending the embedded documentation for supported Computer Algebra Systems Project. Dhairya created the common styles for several mathematical system documents, enhancing the users' experience allowing them to use them simultaneously; and Python scripts have been written to link the stylesheets to the HTML files. These Python scripts are further extended to convert HTML files in Qt Help files that can be uploaded to the KDE Store. The in-progress merge request can be found at: https://invent.kde.org/education/cantor/-/merge_requests/74.
-
Israel Galadima contributed to the "LabPlot: Download/Import of datasets from kaggle.com" project. Since kaggle.com seems to be the central place nowadays for finding datasets in the data science community, we wanted LabPlot's users to be able to access the datasets on kaggle.com directly from within LabPlot. Thus, Israel worked on a new dialog in LabPlot that allows users to search for and import datasets directly from kaggle.com into LabPlot spreadsheets, using the official kaggle cli tool to facilitate the communication between LabPlot and kaggle.com. Multiple merge requests have been merged, the last one is still in review.
-
Raphael Wirth introduced the support for data stored in the MCAP format to LabPlot. Throughout the project, Raphael extended the backend of LabPlot to allow the loading of JSON-encoded MCAP files into its internal data structure as well as the export back to the MCAP file format. Additionally, the user interface has been adapted to accommodate these advancements. This required the extension of the existing import dialog and the introduction of a new export dialog tailored specifically for saving MCAP files.
We would like to congratulate all participants and look forward to their future journey with KDE!
The State of KDE Apps and Plasma in Archlinux
KDE has a symbiotic relationship with many linux distros, since while we develop our software we also use particular versions of linux, I personally use archlinux as my distro of choice for many years being the only distro that I manage to bare for more than six months ( and I believe I am using it for more than 15 years already so that counts).
The "recipe" for packaging KDE software for arch is big, because we are big, and packaging large amounts of software is no easy feat, so me and Antonio Rojas started to update the build scripts to be less manual and less error prone. All the versions of Plasma 6 that have been packaged for arch are using this scripts in one way or another (or manually when we broke everything :)
This work is being done in a separate branch to not break the current workflow, but things are looking good and we hope to merge this in master soon, so that deploying newer versions of KDE software for arch will be a single command, meaning more time for the developers and less time creating packages.
Trey Hunner: My favorite Python 3.13 feature
Python 3.13 just hit feature freeze with the first beta release today.
Just before the feature freeze, a shiny new feature was added: a brand new Python REPL. ✨
This new Python REPL is will likely be my favorite thing about 3.13. It’s definitely the feature I’m most looking forward to using while teaching after 3.13.0 final is released later this year.
I’d like to share what’s so great about this new REPL and what additional improvements I’m hoping we might see in future Python releases.
Little nicetiesThe first thing you’ll notice when you launch the new REPL is the colored prompt.
You may also notice that as you type a block of code, after the first indented line, the next line will be auto-indented! Additionally, hitting the Tab key inserts 4 spaces now, which means there’s no more need to ever hit Space Space Space Space to indent ever again.
At this point you might be thinking, “wait did I accidentally launch ptpython or some other alternate REPL?” But it gets even better!
You can “exit” nowHave you ever typed exit at the Python REPL? If so, you’ve seen a message like this:
1 2 >>> exit Use exit() or Ctrl-D (i.e. EOF) to exitThat feels a bit silly, doesn’t it? Well, typing exit will exit immediately.
Typing help also enters help mode now (previously you needed to call help() as a function).
Block-level historyThe feature that will make the biggest different in my own usage of the Python REPL is block-level history.
I make typos all the time while teaching. I also often want to re-run a specific block of code with a couple small changes.
The old-style Python REPL stores history line-by-line. So editing a block of code in the old REPL required hitting the up arrow many times, hitting Enter, hitting the up arrow many more times, hitting Enter, etc. until each line in a block was chosen. At the same time you also needed to make sure to edit your changes along the way… or you’ll end up re-running the same block with the same typo as before!
The ability to edit a previously typed block of code is huge for me. For certain sections of my Python curriculum, I hop into ptpython or IPython specifically for this feature. Now I’ll be able to use the default Python REPL instead.
Pasting code just worksThe next big feature for me is the ability to paste code.
Check this out:
Not impressed? Well, watch what happens when we paste that same block of code into the old Python REPL:
The old REPL treated pasted text the same as manually typed text. When two consecutive newlines were encountered in the old REPL, it would end the current block of code because it assumed the Enter key had been pressed twice.
The new REPL supports bracketed paste, which is was invented in 2002 and has since been adopted by all modern terminal emulators.
No Windows support? Curses!Unfortunately, this new REPL doesn’t currently work on Windows. This new REPL relies on the curses and readline modules, neither of which are available on Windows. I’m hoping that this new REPL might encourage the addition of curses support on Windows (there are multiple issues discussing this).
The in-browser Python REPL on Python Morsels also won’t be able to use the new REPL because readline and curses aren’t available in the WebAssembly Python build.
Beta test Python 3.13 to try out the new REPL 💖Huge thanks to Pablo Galindo Salgado, Łukasz Langa, and Lysandros Nikolaou for implementing this new feature! And thanks to Michael Hudson-Doyle and Armin Rigo for implementing the original version of this REPL, which was heavily borrowed from PyPy’s pyrepl project.
The new Python REPL coming in 3.13 is a major improvement over the old REPL. While the lack of Windows support is disappointing, but I’m hopeful that a motivated Windows user will help add support eventually!
Want to try out this new REPL? Download and install Python 3.13.0 beta 1!
Beta testing new Python releases helps the Python core team ensure the final release of 3.13.0 is as stable and functional as possible. If you notice a bug, check the issue tracker to see if it’s been reported yet and if not report it!
PreviousNext: Creating a cards section with Layout Builder
In this post, we explore building a cards section with Layout Builder.
by lee.rowlands / 9 May 2024
The component will look something like the 'Services' section on our homepage*. If you've built websites over the last decade, you've probably built a component like this many times.
The key aspects of the component are
- A title
- Some intro text
- A series of cards. Each card has a URL, title, image and teaser text
If you've previously used paragraphs for modelling landing pages, you may immediately be thinking that your content model will be made up of paragraph type 'cards' with three fields as follows:
- A title
- A teaser field for the intro text
- A multi-value cards field, which is itself another paragraph type 'card'.
Or rather, because this is Layout Builder, you might be thinking of a block-content type called cards with those fields on it — leaning on paragraphs for the multi-value cards field.
Whilst that approach works well for paragraphs, it isn't the best approach for Layout Builder:
- There are some gnarly bugs with Layout Builder + Block Content + Paragraphs + Content moderation
- It requires content-editors to fumble in the off-canvas editor to rearrange each card using drag-and-drop. We want a nice re-order experience like this:
Let's instead pivot to a layout plugin for the cards component and think of it in terms of regions.
We have:
- A layout title
- An introduction region
- A cards region
We probably already have a block-content type that consists of a WYSIWYG field — e.g., something like the Basic block content type in core. We can use that for the intro text.
So we need a card block content-type. But we probably want two. A lot of our cards will just point to other pages on the site — and it makes sense for the card to be built from fields on that page. If we put a teaser image and teaser text field on all our node-types, we can make use of them when creating a card for that page. We can also use these for meta-tags like the OpenGraph image. And all our node-types already have a title and URL. The second block-type is if we need to link to pages outside the site. So, the content models for those two block types are as follows:
- For the internal card block-type, we need an entity-reference field to allow the content-editor to select the content to generate the card for
- For the external card block-type, we need all the fields — title, image, teaser, URL
Next, we need to define our layout plugin. We start with a layouts.yml file in our theme or module.
cards: label: Card grid category: Layouts template: layouts/cards icon_map: - [intro, intro, intro] - [c1, c2, c3] - [c4, c5, c6] - [c7, c8, c9] - [c10, c11, c12] regions: content: label: Cards intro: label: Introduction library: 'your_theme/card'Note: the icon_map isn't needed here, but it gives us a nice icon in the 'Add section' form.
With those pieces in place, we can use Layout builder restrictions to ensure only the right block-types can be placed in each region. The introduction region can be limited to the basic WYSIWYG block-type. The cards region can be limited to the internal and external card block-type.
This layout will use the default layout plugin, but we want a custom layout plugin with a title field in the configuration form. You can read more about creating a custom layout plugin from our previous post about creating a dynamic layout with flexible regions. This one will be much simpler. We just need a title field in the configuration form and a preprocess hook to expose that to our template.
The first step of this is to add a 'class' entry to our layout definition.
cards: // ... class: \Drupal\your_theme\Layouts\Cards // ...Then, we need to create that class.
<?php namespace Drupal\your_theme\Layouts; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Layout\LayoutDefault; /** * Defines a class for a layout that has a title option. */ class LayoutWithTitle extends LayoutDefault { /** * {@inheritdoc} */ public function defaultConfiguration() { return parent::defaultConfiguration() + ['title' => '']; } /** * {@inheritdoc} */ public function buildConfigurationForm(array $form, FormStateInterface $form_state): array { $build = parent::buildConfigurationForm($form, $form_state); $build['title'] = [ '#weight' => -10, '#type' => 'textfield', '#default_value' => $this->configuration['title'], '#title' => $this->t('Title'), '#description' => $this->t('Provide an optional title for this section'), ]; return $build; } /** * {@inheritdoc} */ public function submitConfigurationForm(array &$form, FormStateInterface $form_state): void { parent::submitConfigurationForm($form, $form_state); $this->configuration['title'] = $form_state->getValue('title'); } }Then, in your theme you can preprocess to make this variable available to the template.
/** * Implements hook_preprocess_HOOK(). */ function your_theme_preprocess_layout(array &$variables): void { // Add the title from LayoutWithTitle. $variables['title'] = $variables['content']['#settings']['title'] ?? NULL; }For optimum UX, we'd probably want to make Layout Builder Browser blocks, too. You can read more in our previous post about our approach to Layout Builder UX.
All that remains then is to theme the block-content types to match the design. For more on that, see our previous post on theming block-content types with Layout Builder.
As an extra enhancement, you could add integration with Layout Section Classes module to give content editors additional options like the number of cards shown across the page in the card grid.
Note: this component on our website is automated and built with Views, but there is often a need to build out curated equivalents.
Tagged Layout BuilderPython Insider: Python 3.13.0 beta 1 released
I'm pleased to announce the release of Python 3.13 beta 1 (and feature freeze for Python 3.13).
https://www.python.org/downloads/release/python-3130b1/
This is a beta preview of Python 3.13
Python 3.13 is still in development. This release, 3.13.0b1, is the first of four beta release previews of 3.13.
Beta release previews are intended to give the wider community the opportunity to test new features and bug fixes and to prepare their projects to support the new feature release.
We strongly encourage maintainers of third-party Python projects to test with 3.13 during the beta phase and report issues found to the Python bug tracker as soon as possible. While the release is planned to be feature complete entering the beta phase, it is possible that features may be modified or, in rare cases, deleted up until the start of the release candidate phase (Tuesday 2024-07-30). Our goal is to have no ABI changes after beta 4 and as few code changes as possible after 3.13.0rc1, the first release candidate. To achieve that, it will be extremely important to get as much exposure for 3.13 as possible during the beta phase.
Please keep in mind that this is a preview release and its use is not recommended for production environments.
Major new features of the 3.13 series, compared to 3.12Some of the new major new features and changes in Python 3.13 are:
New features- A new and improved interactive interpreter, based on PyPy’s, featuring multi-line editing and color support, as well as colorized exception tracebacks.
- An experimental free-threaded build mode, which disables the Global Interpreter Lock, allowing threads to run more concurrently.
- A preliminary, experimental JIT, providing the ground work for significant performance improvements.
- The (cyclic) garbage collector is now incremental, which should mean shorter pauses for collection in programs with a lot of objects.
- A modified version of mimalloc is now included, optional but enabled by default if supported by the platform, and required for the free-threaded build mode.
- Docstrings now have their leading indentation stripped, reducing memory use and the size of .pyc files. (Most tools handling docstrings already strip leading indentation.)
- The dbm module has a new dbm.sqlite3 backend that is used by default when creating new files.
- Support for type defaults in type parameters.
- A new type narrowing annotation, typing.TypeIs.
- A new annotation for read-only items in TypeDicts.
- PEP 594 (Removing dead batteries from the standard library) scheduled removals of many deprecated modules: aifc, audioop, chunk, cgi, cgitb, crypt, imghdr, mailcap, msilib, nis, nntplib, ossaudiodev, pipes, sndhdr, spwd, sunau, telnetlib, uu, xdrlib, lib2to3.
- Many other removals of deprecated classes, functions and methods in various standard library modules.
- C API removals and deprecations. (Some removals present in alpha 1 were reverted in alpha 2, as the removals were deemed too disruptive at this time.)
- New deprecations, most of which are scheduled for removal from Python 3.15 or 3.16.
(Hey, fellow core developer, if a feature you find important is missing from this list, let Thomas know.)
For more details on the changes to Python 3.13, see What’s new in Python 3.13. The next pre-release of Python 3.13 will be 3.13.0b2, currently scheduled for 2024-05-28.
More resources- Online Documentation
- PEP 719, 3.13 Release Schedule
- Report bugs at Issues · python/cpython · GitHub.
- Help fund Python directly (or via GitHub Sponsors), and support the Python community.
Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation.
Your release team,
Thomas Wouters
Łukasz Langa
Ned Deily
Steve Dower
Acquia Developer Portal Blog: DrupalCon Portland Day 2 Recap
Welcome to Day 2 at DrupalCon!! Today is another exhilarating day packed with cutting-edge sessions, collaborative workshops, and unparalleled networking opportunities. There are few better ways to enhance your skills and connect you with the vibrant Drupal community. Let's dive deeper into the world of Drupal and check out a few highlights from Day 2:
Keynote: Open Source AI Now: Why Open Must Win the AI War
KDE e.V. is looking for a web designer (Hugo) for environmental sustainability project
KDE e.V., the non-profit organisation supporting the KDE community, is looking for a web designer who is skilled with Hugo to implement a new environmental sustainability campaign for the KDE Eco website. Please see the [job ad]({{ '/resources/jobad-KDE-Eco-Website_2024.pdf' | prepend: site.url }}) for more details about this employment opportunity.
We are looking forward to your application.
Evolving Web: Inside Access: Stories of the 12 Stars of EvolveDrupal Atlanta
Last month we took EvolveDrupal—a unique summit that fosters digital transformation and open source collaboration—to Atlanta for its first appearance in the United States.
Couldn’t attend? Well, no need to feel left out! You can get the inside scoop right here. I’ve shared stories about 12 summit stars that’ll have you smiling, chuckling, or taking notes.
Attendees will find this a worthwhile read, too. Because unless you harnessed an AI bot to put you in three rooms at once, we’re betting there’s plenty you missed!
Ready to meet our stars? First, a quick refresher for those who need it.
Wait, What’s EvolveDrupal Again?Ok, let’s rewind. About a year ago our digital agency started EvolveDrupal in our hometown of Montreal. After years of remote meet-ups, it was a way to finally reunite the tech and design communities in person.
People were overjoyed to socialize in the same room as their peers again! Because let’s face it: sharing a beer on Zoom just isn’t the same. There’s none of those silly stories and spontaneous oversharing that really bring people together.
After that first summit, we built on EvolveDrupal’s success with events in Toronto and Ottawa, before heading across the border to Atlanta. (Psst... a little birdy told me we're coming back to the U.S. in September for EvolveDrupal NYC.)
Meet the Stars of EvolveDrupal AtlantaNow that you’re up to speed, here are all the juicy details you’re waiting for. Meet the standout stars who made EvolveDrupal Atlanta absolutely stellar.
1. Our Event-Planning Extraordinaire, Maya SchaefferMaya wears multiple hats at Evolving Web. On top of taking care of us as our Employee Experience & Operations Manager, she’s the de facto Chief Event Organizer for EvolveDrupal. Maya learned on-the-job to orchestrate big corporate gatherings and she tirelessly ensures their success. You can find her at EvolveDrupal looking like she’s in her element.
Unforeseen challenges and setbacks are an inevitable part of events—like the time a well-known office supplies company printed all of our participants’ name tags upside down! But Maya has learned to roll with the punches and adapt quickly.
Maya’s can-do attitude means she sometimes tries to do everything herself, but she’s learned to delegate more over the past year. Her charming smile means that few people can say “no” to her requests.
No one is a match for Maya's organizing skills!
2. Our Boss Baby: Sofia
Just 15 months old, Sofia has been to more Drupal conferences than most seasoned developers. She has accompanied her parents (our co-founders Alex and Suzanne) to DrupalCon Pittsburgh, DrupalConLille, GovCon, High Ed Web, and all four of our previous EvolveDrupal summits.
With this trajectory, in 20 years she’ll have the elusive combination that so many employers seek: a freshly minted college degree and two decades of Drupal experience.
Expect to see Sofia in Forbes 5 Under 5 very soon.
Sofia loves showing her Drupal pride, accompanied by Alex (her dad), Maya, and Sammy the Eagle.
3. Artificial Intelligence
I’d like to thank ChatGPT for writing this blog post. Joking! I’m a real person, I swear. Yet everywhere we look it seems that AI is popping up as a way to generate content, code, images, and so much more. So it was really helpful to get some perspective from the experts.
Nikhil Deshpande, Chief Digital & AI Officer at the Georgia Technology Authority, sat down for a Q&A session with our co-founder, Suzanne Dergacheva. Their discussion hit on a crucial dilemma: how to accelerate innovation through open source while retaining integrity and managing risk.
Some key takeaways from their talk include:
- AI has progressed beyond analytical tasks to creative endeavors like writing poetry.
- Its role in the workplace is expanding: over half of the U.S. workforce now uses AI tools to enhance productivity.
- AI is also shaping public services and government operations. In Minnesota, AI translation has improved accessibility for non-English speakers.
- In this age of AI, ethical considerations and good content governance are more important than ever.
- The integration of AI technologies into existing systems will foster a new era of innovation—one where these tools not only enhance existing processes, but optimize creativity and problem solving.
We also heard from Misha Sulpovar, Head of AI at Cherre & Wired Cognition. In This Is not a Drill: Seeing the Real Opportunities Among the AI Hype, Misha debunked some common myths about AI. No, robots are not going to take over. No, the robots didn’t tell us to say that. In the face of concerns that machines will take our jobs, Misha argues that AI is actually enhancing—instead of replacing—human capabilities. It’s time to embrace the robots. They’re your new work besties.
4. A11y (a.k.a. Accessibility)Championing open source goes hand-in-hand with advocating for accessibility. At Evolving Web we’re committed to making the web a better place for all. So we were thrilled to host not one, but two accessibility sessions at EvolveDrupal Atlanta!
Mary Blabaum, Senior UX Manager at Acquia, gave a great overview of accessibility in her session 5 Ways to Grow Your Inclusive Design Approach:
- Understand your user needs
- Activate by including inclusive strategy into your day to day
- Set standards such as adhering to WCAG
- Create with intent by baking inclusion into your design process
- Measure what matters using transparent accessibility conformance reports
Mary Blabaum from Acquia offered strategies to make accessibility the default in every design.
Penny Kronz, VP of Client Services at DubBot, gave us the rundown on the new success criteria in WCAG guidelines 2.2 with her session WCAG 2.2: What Changed? What Do I Need to Know? so that we can meet the latest accessibility requirements. Some notable changes include new criteria for increased touch target size, consistent focus appearance, and easy dismissal of pop-ups. While WCAG 2.2 retains the same structure as previous versions, it offers more specific guidance for building inclusive digital experiences.
5. OOUXSo much more than a pleasing acronym, object-oriented UX (OOUX) is a proven method for making user experiences more human-centric. Sophia Prater taught us how to shift our UX process to turn complex processes into intuitive user flows in How to Fix UX Fails with Object-Oriented UX. The room was packed, with every seat taken and more participants standing at the back to catch the talk!
One great takeaway from the talk was "ORCA". No relation to the whale. ORCA is an acronym that highlights great questions to ask when designing a single screen:
- O: What are the objects in the users' mental model?
- R: What are the objects' relationships to each other?
- C: What calls-to-action do objects offer users?
- A: What are the attributes that make up the objects?
Morgan decided to take a steamer to our backdrops. There wasn’t a single wrinkle to be seen when he was done with them. Not that he’s a Monica or anything (from the TV show Friends for those who—gasp!—don't get the reference.)
Morgan also delivered From Chaos to Clarity: The Benefits and Challenges of Design Systems with Bryenne. They dived into the complexities and challenges our team has encountered over the years, offering up some invaluable best practices for creating a sustainable design system.
Finally, Morgan captivated a creative audience at our EvolveUX Unconference, an interactive session with real-time feedback from the audience. Morgan showcased the Planned Parenthood Direct app and took participants behind the scenes of the project.
Creases? Not on Morgan's watch.
7. Sammy the Eagle
You read that right—the official mascot of Drupal GovCon swooped in to steal the show at EvolveDrupal Atlanta. I guess it’s easy when you have wings. Naturally, we set aside a free ticket and cleared his visit with the civil aviation authorities.
The Eagle has landed. Sammy the Eagle, that is.
8. Steve Persch’s Twister Board
Steve Persch is a seasoned Drupalist and the Director of Developer Experience at Pantheon. He’s also a theater grad! Which explains why he brings a dramatic flair to even the most technical of presentations.
In his talk The Fourth Decade of Web Deployments, Steve literally bent over backwards to illustrate how complex web pages have become. It certainly woke people up to see Steve pretzeling on a Twister board first thing in the morning. We’ve never seen a more visually stimulating illustration of a technical concept. Proof that majoring in theatre is useful, no matter what the haters say.
Always stretch before attending EvolveDrupal.
9. The EPIC Page Builder Battle
The boxing gloves came out when five speakers went head-to-head, each of them representing a different page building tool. And if you thought Drupal would have a leg up at an event with Drupal in the name, think again! It was no match for the ease with which our designer Yue Lu could build a site in Webflow.
Nevertheless, the key takeaway from our Page Builder Battle was that no single tool is perfect for everyone or every project. Choosing the right tool depends heavily on your unique needs.
We also learned that while Drupal’s content creation experience has room for improvement, the Drupal community is aware of this fact and actively working on it.
We duked it out to see which page builder tool is the ultimate champion.
10. Josh, Our Magic Weatherman
Our Atlanta-based team member, Josh, seems to have a mysterious ability to control the weather. Who knows how he did it, but Josh ordered some darn good weather for the event.
Booking the rooftop patio three months in advance was always going to be a gamble. So we were biting our fingernails as rain poured down the day before… but the summit rolled around with nothing but the bluest of skies! Honourable mention to Josh because we're sure he had something to do with it. Definitely a wizard.
Team members Adrienne and Josh enjoying suspiciously good weather at the Zivtech rooftop after-party.
11. The Drake Quote in our Brand Colours
As we left the elevator for the rooftop after-party, what did we see but a big quote from Drake on the wall! Way to make a canuck feel at home. And way to make us feel special, because it was in our brand green.
We're definitely not team Kendrick.
12. The Airbnb Deer
This is becoming a weird trend for us. It all started with the Airbnb we stayed in for DrupalCamp Florida. Our team walked in to find a huge taxidermy deer on the wall. After initially feeling creeped out, they named him Luke and accepted him as part of the gang.
Would you believe it, when we turned up at our Airbnb for DrupalCamp New Jersey—oh dear, another deer! This one was named Frosty because he seemed a little aloof.
And then in Atlanta, what did we find but yet another deer! Perhaps we should just listen to the signs from the universe and get one for our office.
Join the EvolveDrupal Adventure
Tickets are now on sale for EvolveDrupal Montreal on June 14. We're also heading back to the United States for EvolveDrupal NYC on September 20.
Want to stay in the loop? Sign up for EvolveDrupal updates. You'll be among the first to hear about ticket sales, early bird discounts, and competitions for free stuff!
Here's what to read next: 9 Ways to Make the Most of EvolveDrupal.
+ more awesome articles by Evolving WebTag1 Consulting: Migrating Your Data from Drupal 7 to Drupal 10: Assumptions of the API
As pointed out in the first article, the Migrate API scope is to move over content and configuration. Porting modules and themes are out of scope. With that in mind, let’s take a closer look at some of the assumptions and limitations. In addition to what will be presented in today’s article, I highly recommend reviewing the official documentation for upgrading from Drupal 7. Drupal is ever-evolving and the Migrate API documentation gets updated regularly. Of particular importance, review the page on known issues when upgrading from Drupal 7, as things get added and removed from that list as issues are discovered and fixed.
mauricio Wed, 05/08/2024 - 17:13Daniel Roy Greenfeld: TIL: Running UV outside a virtualenv
Breaking the rules to satisfy continuous integration.
A few months ago I blogged about forcing pip to require a virtualenv. However, when automating tests and deployments sometimes you work outside of virtualenvs. With pip this isn't a problem, you just don't set what I did in that article. However, what if you are using the rust-based uv where the default is to keep you in a virtualenv?
The answer is when you install dependencies using uv in this scenario, use the --python flag to specify the interpreter. According to the uv docs, this flag is intended for use in continuous integration (CI) environments or other automated workflows.
So without further ado, this is what I did:
python -m pip install uv uv pip install -p 3.12 -r requirements.txtAs a bonus, here's the command inside GitHub actions-flavored YAML:
- name: Install Dependencies run: | python -m pip install uv uv pip install -p 3.12 -r requirements.txtWant to know how to handle multiple versions of Python? Here's how use a matrix on GitHub: https://github.com/pydanny/dj-notebook/blob/main/.github/workflows/python-ci.yml#L18-L19