FLOSS Project Planets

The Drop Times: Insights from DrupalJam Speakers: Integration, Experience, and Advocacy

Planet Drupal - Tue, 2024-06-04 10:15
Dive into the heart of DrupalJam 2024 with exclusive insights from notable speakers! Discover the invaluable perspectives shared by Frederik Wouters, Mikko Hämäläinen, and Mathias Bolt Lesniak as they shed light on integrating RAG and OpenAI technologies, exploring Digital Experience Platforms (DXP), and advocating for open-source software. With sessions catering to all levels of expertise, DrupalJam promises practical knowledge and community engagement for every attendee. Stay tuned as we unravel each speaker's session, providing a deeper understanding of Drupal and open-source technologies at this premier event.
Categories: FLOSS Project Planets

Real Python: Python Interfaces: Object-Oriented Design Principles

Planet Python - Tue, 2024-06-04 10:00

Interfaces play an important role in software engineering. As an application grows, updates and changes to the code base become more difficult to manage. More often than not, you wind up having classes that look very similar but are unrelated, which can lead to some confusion. In this video course, you’ll see how you can use a Python interface to help determine what class you should use to tackle the current problem.

In this video course, you’ll be able to:

  • Understand how interfaces work and the caveats of Python interface creation
  • Comprehend how useful interfaces are in a dynamic language like Python
  • Implement an informal Python interface
  • Use abc.ABCMeta and @abc.abstractmethod to implement a formal Python interface

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

Categories: FLOSS Project Planets

Jonathan Dowland: Quake (soundtrack)

Planet Debian - Tue, 2024-06-04 06:17

I haven't done that much crate digging recently, but I did stick this on last week: Trent Reznor's soundtrack for Quake, originally released (within the game) in 1996, and finally issued for the first time independently in 2020.

Quake LP cover and inner covers

I picked it up the Nine Inch Nails gig in Cornwall, 2022.

An interesting factoid about the original release was the CD was mastered with the little-known pre-emphasis flag set to "on". This was relatively unusual at the time (1996) that it was never clear whether it was deliberate or not. CD ripping back then usually used an analog audio path from the CD-ROM drive to the PC sound card, and the CD-ROM would apply the necessary pre-emphasis. Therefore, ripping software didn't need to deal with it, and so most of it (then and now) doesn't, even though the path had long since changed to a purely-digital extraction. Thus, the various copies of the soundtrack circulating may or may not have had pre-emphasis correction applied, and if they did, it may or may not have been required to hear the soundtrack as it was intended.

I spent a bit of time a few years ago, before the reissue, trying to determine what was "correct". There is certainly an audible difference with pre-emphasis applied (or not), but it wasn't clear which was the intended experience. The reissue should have cleared this up once and for all, but I haven't gone back to check what the outcome was.

Categories: FLOSS Project Planets

Specbee: A quick guide to integrating CiviCRM with Drupal

Planet Drupal - Tue, 2024-06-04 04:02
Keeping up with your customer’s evolving expectations is not easy - especially when you want to deliver a memorable customer experience. But by leveraging the power of a CRM (Customer Relationship Management) tool, you can rest assured that you're equipped to meet those expectations head-on. A CRM doesn’t just help you manage customer data; it empowers you to understand and anticipate their needs, creating a proactive rather than reactive approach to customer service. Now you know Drupal is great with integrations. You can seamlessly integrate Drupal with almost any third-party tool. Combining a CMS like Drupal with a CRM like CiviCRM can revolutionize the way your organization manages data, engagement, and operations. CiviCRM is an open-source web-based CRM tool that caters to the needs of non-profits and other civic-sector organizations. In this article, let’s learn how to integrate CiviCRM with Drupal 10. What you need You only need two prerequisites before commencing your CiviCRM and Drupal 10 integration: cv tool Composer I assume that you already have a pre-installed Drupal site using Composer, so let’s not dig into installing Composer. Installing the cv tool Before installing the cv tool, it's important to understand what it is. Similar to Drush or Drupal Console, cv is a command line tool for installing and managing CiviCRM. This tool locates and boots the CiviCRM installation. Below are the two commands to install the cv tool on your system: sudo curl -LsS https://download.civicrm.org/cv/cv.phar -o /usr/local/bin/cv sudo chmod +x /usr/local/bin/cv Download CiviCRM packages We will use composer to download CiviCRM packages: composer require civicrm/civicrm-{core,packages,drupal-8} composer require civicrm/cli-toolsDownload translations for CiviCRM (optional) This step is optional and can be used if you have a multilingual site or need translations for CiviCRM. mkdir -p web/sites/default/files/civicrm/l10n/fr_FR/LC_MESSAGES curl -Lss -o web/sites/default/files/civicrm/l10n/fr_FR/LC_MESSAGES/civicrm.mo https://download.civicrm.org/civicrm-l10n-core/mo/en_EN/civicrm.mo export CIVICRM_L10N_BASEDIR=/var/drupalsites/techx/web/sites/default/files/civicrm/l10nInstall CiviCRM To install CiviCRM, now let’s use the cv CLI tool cv core:install --cms-base-url="[WEBSITE URL]" --lang="en_EN"Replace the [WEBSITE URL] token with your website’s base URL.   Once CiviCRM is installed, you can visit your website’s CiviCRM page at [WEBSITE URL]/civicrm. Note that CiviCRM will be installed on your existing Drupal database. While it is possible to install CiviCRM on a separate database, we will not cover that in this article (part 2 maybe? Subscribe to our newsletter so you don’t miss any of our latest articles!). explore more about CiviCRM and Drupal integration, visit their demo page.   Select your preferred language, choose Drupal 10 in the CMS option, and click on the "Try Demo" button. Final Thoughts Drupal CiviCRM integration is a powerful tool for organizations looking to enhance their website functionality and streamline relationship management processes. By combining the strengths of Drupal and CiviCRM, organizations can create a cohesive online presence that effectively engages constituents and supports their mission. Implementing best practices and following a systematic approach can lead to a successful integration that drives growth and success for the organization. Talk to our Drupal experts today to integrate your Drupal website with CiviCRM or any other CRM tool!
Categories: FLOSS Project Planets

Python Bytes: #386 Major releases abound

Planet Python - Tue, 2024-06-04 04:00
<strong>Topics covered in this episode:</strong><br> <ul> <li><a href="https://numpy.org/news/#numpy-20-release-date-june-16"><strong>NumPy 2.0 release date is June 16</strong></a></li> <li><a href="https://github.com/encode/uvicorn/pull/2183#issuecomment-1976399675">Uvicorn adds multiprocess workers</a></li> <li><a href="https://github.com/prefix-dev/pixi"><strong>pixi</strong></a></li> <li><a href="https://blog.jupyter.org/jupyterlab-4-2-and-notebook-7-2-are-available-b5e6b3c753de">JupyterLab 4.2 and Notebook 7.2</a> are available</li> <li><strong>Extras</strong></li> <li><strong>Joke</strong></li> </ul><a href='https://www.youtube.com/watch?v=BybkexjbTMY' style='font-weight: bold;'data-umami-event="Livestream-Past" data-umami-event-episode="386">Watch on YouTube</a><br> <p><strong>About the show</strong></p> <p>Sponsored by Mailtrap: <a href="https://pythonbytes.fm/mailtrap"><strong>pythonbytes.fm/mailtrap</strong></a></p> <p><strong>Connect with the hosts</strong></p> <ul> <li>Michael: <a href="https://fosstodon.org/@mkennedy"><strong>@mkennedy@fosstodon.org</strong></a></li> <li>Brian: <a href="https://fosstodon.org/@brianokken"><strong>@brianokken@fosstodon.org</strong></a></li> <li>Show: <a href="https://fosstodon.org/@pythonbytes"><strong>@pythonbytes@fosstodon.org</strong></a></li> </ul> <p>Join us on YouTube at <a href="https://pythonbytes.fm/stream/live"><strong>pythonbytes.fm/live</strong></a> to be part of the audience. Usually Tuesdays at 10am PT. Older video versions available there too.</p> <p>Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to <a href="https://pythonbytes.fm/friends-of-the-show">our friends of the show list</a>, we'll never share it. </p> <p><strong>Brian #1:</strong> <a href="https://numpy.org/news/#numpy-20-release-date-june-16"><strong>NumPy 2.0 release date is June 16</strong></a></p> <ul> <li>“This release has been over a year in the making, and is the first major release since 2006. Importantly, in addition to many new features and performance improvement, it contains <strong>breaking changes</strong> to the ABI as well as the Python and C APIs. It is likely that downstream packages and end user code needs to be adapted - if you can, please verify whether your code works with NumPy 2.0.0rc2.”</li> <li><a href="https://numpy.org/devdocs/release/2.0.0-notes.html">NumPy 2.0.0 Release Notes</a></li> <li><a href="https://numpy.org/devdocs/numpy_2_0_migration_guide.html">NumPy 2.0 migration guide</a> <ul> <li>including “try just running ruff check path/to/code/ --select NPY201”</li> <li>“Many of the changes covered in the 2.0 release notes and in this migration guide can be automatically adapted in downstream code with a dedicated Ruff rule, namely rule NPY201.”</li> </ul></li> </ul> <p><strong>Michael #2:</strong> <a href="https://github.com/encode/uvicorn/pull/2183#issuecomment-1976399675">Uvicorn adds multiprocess workers</a></p> <ul> <li>via John Hagen</li> <li>The goal was to no longer need to suggest that people use Gunicorn on top of uvicorn. Uvicorn can now in a sense "do it all”</li> <li><a href="https://www.uvicorn.org/deployment/#built-in">Steps to use it and background on how it works</a>.</li> </ul> <p><strong>Brian #3:</strong> <a href="https://github.com/prefix-dev/pixi"><strong>pixi</strong></a></p> <ul> <li>Suggested by Vic Kelson</li> <li>“pixi is a cross-platform, multi-language package manager and workflow tool built on the foundation of the conda ecosystem.”</li> <li><a href="https://pixi.sh/latest/tutorials/python/">Tutorial: Doing Python development with Pixi</a></li> <li>Some quotes from Vic: <ul> <li>“Pixi is a project manager, written in Rust, that allows you to build Python projects without having Python previously installed. It’s installable with Homebrew (brew install pixi on Linux and MacOS). There’s support in VSCode and PyCharm via plugins. By default, pixi fetches packages from conda-forge, so you get the scientific stack in a pretty reliable and performant build. If a package isn’t on conda-forge, it’ll look on PyPI, or I believe you can force it to look on PyPI if you like.”</li> <li>“So far, it works GREAT for me. What really impressed me is that I got a Jupyter environment with CuPy utilizing my aging Nvidia GPU on the FIRST TRY.”</li> </ul></li> </ul> <p><strong>Michael #4:</strong> <a href="https://blog.jupyter.org/jupyterlab-4-2-and-notebook-7-2-are-available-b5e6b3c753de">JupyterLab 4.2 and Notebook 7.2</a> are available</p> <ul> <li><a href="https://github.com/jupyterlab/jupyterlab">JupyterLab</a> 4.2.0 has been released! This new minor release of JupyterLab includes 3 new features, 20 enhancements, 33 bug fixes and 29 maintenance tasks.</li> <li><a href="https://github.com/jupyter/notebook">Jupyter Notebook</a> 7.2.0 has also been released</li> <li>Highlights include <ul> <li>Easier Workspaces Management with GUI</li> <li>Recently opened/closed files</li> <li>Full notebook windowing mode by default (renders only the cells visible in the window, leading to improved performance)</li> <li>Improved Shortcuts Editor</li> <li>Dark High Contrast Theme</li> </ul></li> </ul> <p><strong>Extras</strong> </p> <p>Brian:</p> <ul> <li><a href="https://dev.to/hugovk/help-test-python-313-14j1">Help test Python 3.13!</a></li> <li><a href="https://dev.to/hugovk/help-us-test-free-threaded-python-without-the-gil-1hgf">Help us test free-threaded Python without the GIL</a> <ul> <li>both from Hugo van Kemenade</li> </ul></li> <li><a href="https://podcast.pythontest.com/episodes/221-how-to-get-pytest-to-import-your-code-under-test">Python Test 221: How to get pytest to import your code under test is out</a></li> </ul> <p>Michael:</p> <ul> <li><a href="https://github.com/HigherOrderCO/bend">Bend</a> follow up from Bernát Gábor <ul> <li>“Bend looks roughly like Python but is nowhere there actually. For example it has no for loops, instead you're meant to use bend keyword (hence the language name) to expand calculations and another keyword to join branches. So basically think of something that resembles Python at high level, but without being compatible with that and without any of the standard library or packages the Python language provides. That being said does an impressive job at parallelization, but essentially it's a brand new language with new syntax and paradigms that you will have to learn, it just shares at first look similarities with Python the most.”</li> </ul></li> </ul> <p><strong>Joke:</strong> <a href="https://www.reddit.com/r/programminghumor/comments/1cyk9ol/finally/?share_id=lDWIfCK2z_XcX91gJsuQ7&utm_content=2&utm_medium=ios_app&utm_name=iossmf&utm_source=share&utm_term=22">Do-while</a></p>
Categories: FLOSS Project Planets

joshics.in: Drupal 10: Not Just Another Upgrade, But a Revolution in Web Development

Planet Drupal - Tue, 2024-06-04 01:12
Drupal 10: Not Just Another Upgrade, But a Revolution in Web Development bhavinhjoshi Tue, 06/04/2024 - 10:42

Ever had to scratch your head, ferreting out the secret weapon behind those mammoth success stories of the digital world? Well, ponder no more, you've just stumbled upon the world of Drupal 10!

As the latest prodigy of the Drupal family, Drupal 10 isn't just a facelift but a tool that champions uncharted territories. With an arsenal of new features, it's here to empower developers - both seasoned and novice ones.

Let's picture this through an everyday scenario. You're a site developer catering to a global audience. Earlier, you'd have to have multiple versions of the site to cater to various languages. Drupal 10 simplifies this with its built-in multilingual feature. You can now translate and localise your website without bothersome plugins.

Consider another common tussle developers face - keeping up with the digital world's insatiable appetite for interactive and responsive designs. With Drupal 10's layout builder, you can create and customize layouts per content type, per node, or even per user role.

Even SEO, the lifeline of online visibility, gets a boost with Drupal's 10 in-built meta tag and path auto modules. Now you can ensure your site stays in the limelight with less effort and more smart work.

Yet the standout trait of Drupal 10, one that deserves a tip of the hat, is the ease of upgrade. Remember the hair-pulling days of upgrading from Drupal 7 to 8? Those days are in the rear view mirror as Drupal 10 ensures a seamless upgrade, promising the preservation of custom themes and modules.

In conclusion, Drupal 10 is not just a new version, but a pivotal shift in web development that caters to today's fast-paced, ever-evolving digital landscape. It's about time we embrace it!

Drupal 10 Drupal Planet
Categories: FLOSS Project Planets

Haruna 1.1.2

Planet KDE - Mon, 2024-06-03 23:00

Haruna version 1.1.2 is out.

You can get it now on flathub:

Availability of other package formats depends on your distro and the people who package Haruna.

Windows version:

If you like Haruna then support its development: GitHub Sponsors | Liberapay | PayPal

Feature requests and bugs should be posted on bugs.kde.org, but for bugs make sure to fill in the template and provide as much information as possible.

Changelog: 1.1.2

Bugfixes:

  • Disabled track selection menus and buttons when there are no tracks to be selected
  • Fixed custom command toggling
  • Re-added "Scroll to playing item" and "Trash file" options to playlist context menu, lost during Qt6 port
  • Fixed some mpv properties not being correctly set at startup
  • Fixed video rendering on Windows
Categories: FLOSS Project Planets

Plasma 6 and 'traditional' window tiling

Planet KDE - Mon, 2024-06-03 20:00

I was keeping myself on Plasma 5.x until recently. I got so accustomed to the Bismuth window tiling script for KWin that I couldn’t imagine myself updating to Plasma 6.x where Bismuth doesn’t work.

Unfortunately (?), one of the recent Debian updates broke Bismuth in Plasma 5.x as well, so I had nothing keeping me on the old version anymore. I’m now (again) running the development version of (most) KDE software.

Since the update, I managed to make the Qtile tiling window manager work with Plasma to some extent. But the integration between Qtile and Plasma I hacked was less than ideal, and I kept switching between KWin which worked perfectly, as KWin does, but without tiling, and my Frankenstein Qtile which didn’t work that well, but it had tiling.

Maybe I’ll write about it if I get back to hacking Qtile, but that might not happen any time soon because…

Krohnkite

Then I saw the news that the predecessor of Bismuth – the Krohnkite script has been ported to KWin 6 – see the announcement on reddit, github to get and review the code, and kde store for the package you can install.

Huge kudos to all who are involved in the rebirth, the script works as well as it did with KWin 5.

Window decoration

The only thing missing was the simple ‘just a line around the window’ window decoration that Bismuth had.

KWin 6 and Krohnkite + Bismuth decoration

Now we have that as well, I’ve ported the original Bismuth window decoration to KWin 6 (nothing huge, just a few tiny changes to make it compile). The code, and the installation instructions are available on github.

You can support my work on Patreon, or you can get my book Functional Programming in C++ at Manning if you're into that sort of thing. -->
Categories: FLOSS Project Planets

Reproducible Builds (diffoscope): diffoscope 270 released

Planet Debian - Mon, 2024-06-03 20:00

The diffoscope maintainers are pleased to announce the release of diffoscope version 270. This version includes the following changes:

[ Chris Lamb ] * No-change release due to broken version 269 tarballs.

You find out more by visiting the project homepage.

Categories: FLOSS Project Planets

TestDriven.io: Approximate Counting in Django and Postgres

Planet Python - Mon, 2024-06-03 18:28
This article looks at how to speed up counting with Django and PostgreSQL.
Categories: FLOSS Project Planets

FreeBSD 13 Testing

Planet KDE - Mon, 2024-06-03 18:00

FreeBSD 13 is still supported as of this writing (much to the chagrin of the KDE-FreeBSD folks, who would like 14-only as soon as possible for ease of support and patching). My own machine is a weird Franken-beastie somewhere between 13.2 and 13.3, but I’ve been wrestling with some package-building failures on the FreeBSD cluster machines for all of 13.2, 13.3 and 14.0 – it builds on my machine, and then fails with compiler errors on the cluster. More weirdly still, it looks like “obvious missing C++ headers”, so I don’t understand why it works for me. Here’s some notes for my future self about quickly setting up a virtual machine for ports testing.

After I wrote this down, and started doing some testing, it turned out I had a local fix, which I had forgotten to push. Facepalm time, but at least I have a handful of notes for future me when I have an actual problem.

  • Set up a VirtualBox VM with a CD drive and a 40GiB hard disk,
  • Get a FreeBSD 13.2 install ISO image,
  • Run through the FreeBSD installation. This takes maybe 5 minutes with all of the default settings and creating a single user. I used automatic UFS on the whole virtual disk. Don’t bother with the ports tree.

After booting the newly-installed system, configuration for ports testing can start.

  • As root, pkg install git cmake , which will first install the package manager, then git and cmake, which are two things we’re going to need anyway.
  • As root, clone the ports tree. I used git clone --depth 50 -b 2024Q2 https://git.freebsd.org/ports.git /usr/ports to get the quarterly branch.
  • Use the package manager to find out the dependencies of the desired port. With pkg rquery %dn followed by the name of the desired port, you get the dependencies of the port. Since most FreeBSD ports are developer-batteries-included, those are also the build dependencies.
  • Use pkg install to install them. Backtick expansion can make things easier here.
  • If there’s no package available, then the ports framework offers make build-depends-list run-depends-list which will print full paths to the ports directories of the dependencies. With a little bit of sed(1) processing, this turns into a list of installable packages.

Once the system is up, ports builds can proceed as usual.

Categories: FLOSS Project Planets

Bounteous.com: A New Age of Drupal: Drupal CMS

Planet Drupal - Mon, 2024-06-03 17:34
Drupal enables amazing capabilities for DXPs, but specialized talent is required. At DrupalCon NA, a new Drupal was announced for those without a technical background, Drupal CMS.
Categories: FLOSS Project Planets

Drupal Association blog: Pride Month 2024: Celebrating International Pride

Planet Drupal - Mon, 2024-06-03 14:30

To celebrate Pride Month 2024, the Drupal Association is sharing information to uplift international organizations that support the LGBTQ+ community and donating our proceeds of themed apparel from the Drupal Swag Shop to those organizations. Pride Month is celebrated in June each year to acknowledge the anniversary of the Stonewall Uprising (1969), which was a tipping point for the gay liberation movement and spurred the growth of LGBTQ+ support. The movement has since spread across the globe. Read more on the history of Pride Month.

The Drupal Association is guided by the values of open source, which have a strong history of inclusivity. Our focus is human-centric. We believe that the way forward is with collective responsibility, accountability, and care. As stated in the Open Web Manifesto, the open web thrives on inclusion: Everyone in the world, regardless of background, identity, wealth, or status, has a home on the open web. Inclusivity is one of Drupal’s core principles, making an open web possible. At the core of our beliefs is that every individual, regardless of sexual orientation, gender identity, or expression, has a place here and deserves to be supported.

This year, the Drupal Association will celebrate LGBTQ+ organizations from around the world who work in different sectors: jobs and training, legal advocacy, refugee support, and youth mental health. We invite you to learn more about each organization that we highlight. Then, we ask you, the Drupal Community, to vote for which organization will receive the proceeds from Drupal Pride swag raised during Pride Month in the Drupal Swag Shop.

Here are the organizations we will be celebrating during each week of the month:

  • Week 1: Micro Rainbow International Foundation is an organization that works globally to help LGBTQ+ people achieve their full potential in life and have equal access to employment, training, education, financial services, healthcare, housing, places of faith, and public places and services.

  • Week 2: Human Dignity Trust defends the human rights of LGBTQ+ people globally to challenge laws that persecute people on the basis of their sexual orientation and/or gender identity.

  • Week 3: Rainbow Railroad supports refugees, helping at-risk LGBTQ+ people get to safety worldwide. They’ve helped over 13,000 LGBTQ+ individuals find safety through emergency relocation, crisis response, cash assistance, and more.

  • Week 4: The Trevor Project provides resources for international LGBTQ+ youth, including a 24/7 helpline and a safe and secure social networking site for LGBTQ+ youth and their allies.

Follow the Drupal Association on Linkedin and X/Twitter as we celebrate each organization this month! 

You can shop now and throughout the month of June in the Drupal Swag Shop for Drupal Pride gear! At the end of the month, 100% of the Drupal Association’s profits from the sales of the Drupal Pride gear will be donated to the LGBTQ+ organization that receives the most votes. Shop now and spread the word with the community! 

When you’re ready, we invite you to vote for the organization for which you want to receive the donation.

We want to hear your Drupal Pride stories!

In addition to celebrating LGBTQ+ organizations worldwide, we want to hear the Drupal community’s stories! What does Drupal Pride mean to you? We want to hear why Pride is important to you. We invite you to share your story with us to be featured on the Drupal Association social media channels celebrating Pride Month 2024! 

We are looking for videos that are less than 30 seconds long, short quotes, or photos that we can share on social media to amplify your messages. To share your story, you can either upload it to this Google Drive folder or email it directly to christina@association.drupal.org. We look forward to seeing your submissions and celebrating Pride together!

Categories: FLOSS Project Planets

Test and Code: 221: How to get pytest to import your code under test

Planet Python - Mon, 2024-06-03 14:23

We've got some code we want to test, and some tests.
The tests need to be able to import the code under test, or at least the API to it, in order to run tests against it.
How do we do that? How do we set things up so that our tests can import our code?

In this episode, we discuss two options:

  • Installing the code under test as a pip installable package with `pip install -e /path/to/local/package`.
  • Using the pythonpath pytest setting.

Sponsored by Mailtrap.io

  • An Email Delivery Platform that developers love. 
  • An email-sending solution with industry-best analytics, SMTP, and email API, SDKs for major programming languages, and 24/7 human support. 
  • Try for Free at MAILTRAP.IO

Sponsored by The Complete pytest Course

  • For the fastest way to learn pytest, go to courses.pythontest.com
  • Whether your new to testing or pytest, or just want to maximize your efficiency and effectiveness when testing.
<p>We've got some code we want to test, and some tests.<br>The tests need to be able to import the code under test, or at least the API to it, in order to run tests against it.<br>How do we do that? How do we set things up so that our tests can import our code?</p><p>In this episode, we discuss two options:</p><ul><li>Installing the code under test as a pip installable package with `pip install -e /path/to/local/package`.</li><li>Using the <a href="https://docs.pytest.org/en/latest/reference/reference.html#confval-pythonpath">pythonpath pytest setting</a>.</li></ul> <br><p><strong>Sponsored by Mailtrap.io</strong></p><ul><li>An Email Delivery Platform that developers love. </li><li>An email-sending solution with industry-best analytics, SMTP, and email API, SDKs for major programming languages, and 24/7 human support. </li><li>Try for Free at <a href="https://l.rw.rw/pythontest">MAILTRAP.IO</a></li></ul><p><strong>Sponsored by</strong> <strong>The Complete pytest Course</strong></p><ul><li>For the fastest way to learn pytest, go to <a href="https://courses.pythontest.com/p/complete-pytest-course">courses.pythontest.com</a></li><li>Whether your new to testing or pytest, or just want to maximize your efficiency and effectiveness when testing.</li></ul>
Categories: FLOSS Project Planets

Talking Drupal: Talking Drupal #453 - Urban Institute

Planet Drupal - Mon, 2024-06-03 14:00

 Today we are talking about Urban Institute, What they do, and How they use Drupal with guest Josh Miller. We’ll also cover Access Unpublished as our module of the week.

For show notes visit: www.talkingDrupal.com/453

Topics
  • Tell us how you got started with Drupal
  • What does Urban Institute do
  • What do you do at Urban Institute
    • Number of people on dev team
    • Number of sites
  • How does Urban Institute use Drupal
  • Are you using a custom upstream
  • How many sites on Drupal 7
  • Are you doing Page builders
  • What kind of front end tools do you use
  • What is the preferred local development tool
  • Why did Urban Institute choose Drupal
  • What is the hardest part of using Drupal at a large non profit
  • What is the most interesting interactive experience you have built for Urban Institute
Resources Guests

Josh Miller - joshmiller

Hosts

Nic Laflin - nLighteneddevelopment.com nicxvan John Picozzi - epam.com johnpicozzi Randy Fay - rfay

MOTW Correspondent
  • Martin Anderson-Clutz - mandclu.com mandclu
  • Brief description:
    • Have you ever wanted to get feedback on unpublished content from people who aren’t users on your Drupal site? There’s a module for that.
  • Module name/project name:
  • Brief history
    • How old: created in Feb 2011 by aberg, though recent releases are by Christian Fritsch (chr.fritsch) of Thunder
    • Versions available: 8.x-1.5
  • Maintainership
    • Security coverage
    • Test coverage
    • Number of open issues: 58 open issues, 17 of which are bugs against the current branch
  • Usage stats:
    • 8,638 sites
  • Module features and usage
    • Once installed, this module adds a new element to your unpublished entity forms, for generating links with a special hash value. When generating the link, you can choose how long the hash value can be used for access.
    • Within that form section, you can copy the access URL for any of your generated tokens, and then paste into an email or some kind of direct message.
    • You will need to set a permission for users to access content using the special access URLs, so if you want anyone with the URL to be allowed access, you’ll need to assign that permission to the Anonymous user role
    • The access lifetime can be anything from 1 day to unlimited (never expires), and you can set the default value in the settings form. That form also allows you to set the URL parameter that will be used for access, gives you options to modify the HTTP headers on the unpublished page, and has a check box you can use to delete all expired tokens.
    • Expired tokens will be deleted on cron run, and when you delete an entity any related tokens are also removed.
    • This use case of allowing review of unpublished content for people who aren’t users in the Drupal site is a request I hear on a regular (if infrequent) basis, so I’ve personally found this module really useful.
  • Necessary Patch: https://www.drupal.org/project/access_unpublished/issues/3421309
  • Not to be confused with https://www.drupal.org/project/preview_link
    • Preview link is missing the ability to set length of access.
Categories: FLOSS Project Planets

Python Morsels: Python's many command-line utilities

Planet Python - Mon, 2024-06-03 13:16

Every command-line tool included with Python. These can be run with python -m module_name.

Table of contents

  1. How -m works
  2. General-purpose CLI tools
  3. Especially handy on Windows machines
  4. Working with Python code
  5. Analyzing Python code
  6. Just for fun
  7. Other Python-related tools
  8. Oddly meta tools
  9. Less useful tools
  10. Every command-line tool in Python

How -m works

Running Python with the -m command-line argument tells Python to run a given Python module as if it were a Python script.

Some modules do something at import time. For example the antigravity module will open up a web browser for an XKCD comic. Running this module from the command-line would do the same thing as importing it:

$ python -m antigravity

This is called an "import side effect" and most modules avoid import side effects. Fun Easter egg modules like antigravity and this are the exception.

Modules that avoid import side effects need a different mechanism to change their behavior when run as a command-line script or when imported as a module. Python uses a __name__ variable to distinguish between importing a module and running a module as a script.

When Python runs a module as a script, it sets the module's name to the string "__main__" (normally __name__ would contain the module's actual name). See more in defining a main function in Python.

For packages, Python also looks for a __main__.py file to run (there's one in the zipfile package for example).

This distinction between module versus script allows for some really nifty command-line tools.

General-purpose CLI tools

The first tools we'll look …

Read the full article: https://www.pythonmorsels.com/cli-tools/
Categories: FLOSS Project Planets

The Drop Times: Blueprint to the Stars!

Planet Drupal - Mon, 2024-06-03 12:25

Dear Readers,

Since my younger days, I have been fascinated by a quote, and it has kept me in check in all my endeavours.

"If you fail to plan, you plan to fail!"

Achieving milestones in any initiative requires meticulous planning and strategic execution, and the Drupal Starshot Initiative is no exception. As the guiding star for Drupal's future, the Starshot Initiative embodies a collaborative effort to propel the platform to unprecedented heights. The process behind this ambitious endeavour is as critical as the vision itself.

Central to the success of the Starshot Initiative is the detailed roadmap that outlines the project's phases, from ideation to implementation. This roadmap is not just a timeline of events but a dynamic blueprint that evolves with contributions from the Drupal community. Regular interactive sessions, such as the one headed by Dries Buytaert last week and the upcoming sessions headed by Drupal stalwarts, play a crucial role in this process. These sessions are designed to provide updates, gather feedback, and refine strategies to ensure that every step is aligned with the overarching goals.

The interactive nature of these sessions fosters a sense of unity and shared purpose, encouraging everyone to participate actively. By joining the #starshot channel on Drupal Slack, community members can stay informed and contribute meaningfully to the initiative. Through this collective effort, the Drupal community is working together to make the Starshot Initiative a beacon of innovation and excellence in the digital landscape.

With that, let's move on to last week's important news.

In a stimulating conversation with our sub-editor, Kazima Abbas, Brian Perry discusses the latest updates and future vision for the API Client Initiative. Dive into the in-depth interview to learn how the Drupal API Client is revolutionizing interaction with Drupal APIs and explore the exciting opportunities it presents for web development enthusiasts.

DrupalJam 2024, set to take place on June 12th at the Fabrique in Utrecht, marks a significant milestone as it celebrates its 20th edition. Organized by a team of dedicated volunteers, DrupalJam has earned international recognition for its professional quality and community-driven ethos. Kazima Abbas brings you exclusive insights from the organizers into the event's schedule, speakers, and opportunities for engagement.

Drupal Community is agile with a great deal of events. DrupalCon Portland 2024 concluded with the hope of two more Drupal conferences this year: DrupalCon Barcelona and DrupalCon Singapore 2024. The programs for DrupalCon Barcelona are now live, and DrupalCon Asia has opened up Sponsorship opportunities. Regarding the regional events, Drupal Developer Days Bulgaria 2024 is set to take place in Burgas from June 26 to 28, and tickets are now available! 

Excitement is afoot with announcements of events happening next year. Save the date for Florida DrupalCamp 2025, slated to convene at Florida Technical College from February 21 to 23, 2025. The 5th edition of Drupal MountainCamp is scheduled for March 11 to 13, 2025, in Davos, Switzerland.

The DropTimes has compiled notable Drupal events happening throughout the week of June 3rd to June 9th. This curated list offers a glimpse into the varied activities taking place within the Drupal community, catering to enthusiasts of all skill levels. Read here.

On May 31, 2024, Dries Buytaert led the first interactive Zoom session of the Drupal Starshot series, focusing on participation, funding, and governance. This session covered various topics, including the sentiment around DrupalCon pledges and blog posts, ways for the community to get involved, and innovative funding ideas such as Drupal Certified Partners. 

Wim Leers announced the official opening of the 0.x branch for the Experience Builder initiative. Sponsored full-time by Acquia, Dries Buytaert formally introduced the initiative at DrupalCon Portland 2024, following extensive research conducted by Drupal core product manager Lauri Eskola.

Indian Space Research Organization, ISRO, modernizes its grant management with the I-GRASP initiative, partnering with Quilltez and leveraging Drupal to streamline proposal submissions and reviews. The new online platform enhances efficiency, transparency, and security, reducing processing time and fostering stronger research collaborations. This technological advancement marks a significant milestone in ISRO's mission to drive innovation in space exploration.

The Drupal Association has announced the launch of a new initiative to empower local Drupal communities worldwide. Led by Programs Manager Joi Garrett, the Local Associations Initiative is designed to support the success of Drupal Local Associations by engaging directly with community leaders who promote the Drupal project in their regions. 

Jürgen Haas has announced the release of ECA 2.0.0-beta1 for Drupal, marking a milestone in the lead-up to the final ECA 2 release. This beta version introduces several major improvements and new features designed to enhance the functionality and performance of Drupal sites. Additionally, the latest version of the Smart Date module, 4.1, has been officially released, marking a significant milestone exactly one year after the first stable release of version 4.0. Led by Martin Anderson-Clutz, this update brings a host of improvements and new functionalities, making it ready for Drupal 11.

Ines Wallon, a Drupal Practice Leader and advocate for FLOSS, has launched Drupal GitLab Toolbox, a new project designed to enhance the continuous integration (CI) process for Drupal developers. The project offers a versatile GitLab CI pipeline specifically tailored for Drupal projects.

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.

Categories: FLOSS Project Planets

Real Python: String Interpolation in Python: Exploring Available Tools

Planet Python - Mon, 2024-06-03 10:00

String interpolation allows you to create strings by inserting objects into specific places in a target string template. Python has several tools for string interpolation, including f-strings, the str.format() method, and the modulo operator (%). Python’s string module also provides the Template class, which you can use for string interpolation.

In this tutorial, you’ll:

  • Learn how to use f-strings for eager string interpolation
  • Perform lazy string interpolation using the str.format() method
  • Learn the basics of using the modulo operator (%) for string interpolation
  • Decide whether to use f-strings or the str.format() method for interpolation
  • Create templates for string interpolation with string.Template

To get the most out of this tutorial, you should be familiar with Python strings, which are represented by the str class.

Get Your Code: Click here to download the free sample code you’ll use to explore string interpolation tools in Python.

Take the Quiz: Test your knowledge with our interactive “String Interpolation in Python: Exploring Available Tools” quiz. You’ll receive a score upon completion to help you track your learning progress:

Interactive Quiz

String Interpolation in Python: Exploring Available Tools

Take this quiz to test your understanding of the available tools for string interpolation in Python, as well as their strengths and weaknesses. These tools include f-strings, the .format() method, and the modulo operator.

String Interpolation in Python

Sometimes, when working with strings, you’d make up strings by using multiple different string values. Initially, you could use the plus operator (+) to concatenate strings in Python. However, this approach results in code with many quotes and pluses:

Python >>> name = "Pythonista" >>> day = "Friday" # Of course 😃 >>> "Hello, " + name + "! Today is " + day + "." 'Hello, Pythonista! Today is Friday.' Copied!

In this example, you build a string using some text and a couple of variables that hold string values. The many plus signs make the code hard to read and write. Python must have a better and cleaner way.

Note: To learn more about string concatenation in Python, check out the Efficient String Concatenation in Python tutorial.

The modulo operator (%) came to make the syntax a bit better:

Python >>> "Hello, %s! Today is %s." % (name, day) 'Hello, Pythonista! Today is Friday.' Copied!

In this example, you use the modulo operator to insert the name and day variables into the string literals. The process of creating strings by inserting other strings into them, as you did here, is known as string interpolation.

Note: Formatting with the modulo operator is inspired by printf() formatting used in C and many other programming languages.

The %s combination of characters is known as a conversion specifier. They work as replacement fields. The % operator marks the start of the specifier, while the s letter is the conversion type and tells the operator that you want to convert the input object into a string. You’ll learn more about conversion specifiers in the section about the modulo operator.

Note: In this tutorial, you’ll learn about two different types of string interpolation:

  1. Eager interpolation
  2. Lazy interpolation

In eager interpolation, Python inserts the values into the string at execution time in the same place where you define the string. In lazy interpolation, Python delays the insertion until the string is actually needed. In this latter case, you create string templates at one point in your code and fill the template with values at another point.

But the story doesn’t end with the modulo operator. Later, Python introduced the str.format() method:

Python >>> "Hello, {}! Today is {}.".format(name, day) 'Hello, Pythonista! Today is Friday.' Copied!

The method interpolates its arguments into the target string using replacement fields limited by curly brackets. Even though this method can produce hard-to-read code, it represents a significant advance over the modulo operator: it supports the string formatting mini-language.

Note: String formatting is a fundamental topic in Python, and sometimes, people think that formatting and interpolation are the same. However, they’re not. In this tutorial, you’ll only learn about interpolation. To learn about string formatting and the formatting mini-language, check out the Python’s Format Mini-Language for Tidy Strings tutorial.

Python continues to evolve, and every new version brings new, exciting features. Python 3.6 introduced formatted string literals, or f-strings for short:

Python >>> f"Hello, {name}! Today is {day}." 'Hello, Pythonista! Today is Friday.' Copied!

F-strings offer a more readable and clean way to create strings that include other strings. To make an f-string, you must prefix it with an f or F. Again, curly brackets delimit the replacement fields.

Note: To learn more about f-strings, check out the Python’s F-String for String Interpolation and Formatting tutorial.

Read the full article at https://realpython.com/python-string-interpolation/ »

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

Categories: FLOSS Project Planets

Pages