Feeds

KEcoLab in SoK24: Incorporating Energy-Consumption Measurements In The CI/CD Pipeline

Planet KDE - Wed, 2024-03-27 20:00
KEcoLab

Sustainability has been one of three goals at KDE over the past 2 years. One aspect of this goal is to measure the energy consumption of KDE software. To do this, it is necessary to access the lab in KDAB, Berlin, which can now be done remotely using KEcoLab.

Figure : Testing and debugging Okular scripts on a Virtual Machine host (image from Aakarsh MJ published under a CC-BY-4.0 license).

KEcoLab (remote-eco-lab) is a KDE Eco project aimed at enabling remote energy consumption measurements for your software using Gitlab's CI/CD pipeline. By automating the measurement process and integrating with the OSCAR statistics tool, developers can make informed decisions about improving code efficiency and obtain software eco-certification with the Blue Angel. This project came to being as part of GSoC 2023 under the mentorship of Volker Krause, Benson Muite, Nicolas Fella and Joseph P. De Veaugh-Geiss. Karanjot Singh is its original developer.

One of the main aims of Season of KDE 2024 is to integrate KEcoLab into Okular's pipeline. Okular is KDE's popular multi-platform PDF reader and universal document viewer. In 2022, Okular was awarded the Blue Angel ecolabel, the first ever eco-certified computer program. You can learn more about KDE Eco here and the process of measuring energy consumption in the KDE Eco handbook.

Deliverables Of The SoK24 Project
  1. Integrate KEcoLab into Okular's pipeline.
  2. Integrate KEcoLab's pipeline with E2E tests or integration tests.
  3. Usage scenario scripts with KdeEcoTest.
  4. Bug squashing.

I have been working together with Sarthak Negi for this Season of KDE.

Integrating KEcoLab Into Okular's Pipeline

As mentioned, the main aim for this mentorship is to integrate KEcoLab into Okular's pipeline. Okular, being a Blue Angel certified project, will benefit from having its energy consumption measured either for every release automatically or for specific merge requests via a manual trigger. In this way it is possible to track Okular's energy consumption and make necessary changes to adhere to Blue Angel specifications.

I have had discussions with the Okular team regarding the integration of KEcoLab into their pipeline. This was necessary to make sure that the new addition won't change their existing workflow rules, i.e., there would be no manual work required on their end to trigger the pipeline on every release. At the same time, we wanted to make sure it is possible to manually trigger the measurement process on a case-by-case basis. I'll go into further details below. The email exchange can be accessed here.

I have been testing the pipeline on a test-repo for the past few weeks, which can be accessed here.

The pipeline was tested for the following contexts:

  1. Triggering KEcoLab's pipeline for energy measurement:

    a) using Web UI.

    b) pushing the tag through Git.

  2. Pipeline runs on triggering it manually through the Web UI.

  3. Pipeline does not run on merge request.

  4. Prevent pipeline from running on every commit push.

The above was achieved by making use of a combination of GitLab's workflow: rules and GitLab's predefined CI/CD variables. There were several difficulties I faced during this time, notably preventing the pipeline from running on every release and rather restricting it to only major releases. During one of the monthly meetings, however, Volker thought this would not be necessary since there is only one release per month, i.e, for the time being it is not important to cherry pick the release candidates. As it is now, the measurement process will therefore be triggered on every release of Okular. This may change at a later date, and so I will document here some thoughts I had on how to this.

I initially thought about making use of a global variable which would be updated in the .pre stage depending on a comparison between the last and second-to-last tag to determine whether it's a major or minor release. This would be achieved by making use of a regex rule to identify the difference. The way this would work is by adding a rule under every job to check for the value of the variable. However, since the value wasn't persistent, I took a different approach by making use of artefacts which would contain the value required to determine if it's a major or a minor release version. When a measurement should be triggered, and when not, looks something like this:

  • v1.8.3 -> v2.0.8 # Pipeline should run

  • v2.2.3 -> v2.6.8 # Pipeline should not run

The code looked something like this:

check-major-version: stage: .pre image: alpine tags: - EcoLabWorker before_script: - echo "Checking for major version" script: - export PREV_COMMIT_TAG=$(git tag --sort=-v:refname | grep -A1 '$COMMIT_TAG' | tail -n 1) - export MAJOR_VERSION_CURRENT=$(echo $COMMIT_TAG | sed 's/v\([0-9]*\).*/\1/') - export MAJOR_VERSION_PREVIOUS=$(echo $PREV_COMMIT_TAG | sed 's/v\([0-9]*\).*/\1/') - if [ "$MAJOR_VERSION_CURRENT" == "$MAJOR_VERSION_PREVIOUS" ]; then IS_MAJOR_RELEASE="false" > release_info.env; fi artifacts: reports: dotenv: release_info.env

Once I started testing it, I realised that the value of the updated global variable did not persist across jobs. Therefore, using the variable to determine whether the job should run or not was not viable. Additionally, I realized that this approach would still cause the pipeline to run and in any case it would result in a failed pipeline if all the jobs did not run. Since we decided the measurement process can run on every release, I abandoned trying to implement this.

Currently the pipeline is being tested on my fork of Okular here. It's almost ready, we just need to add the test scripts under 'remote-eco-lab/scripts/test-scripts/org.kde.okular' for which this patch has been made.

Figure : Testing Okular in KEcolab (image from Aakarsh MJ published under a CC-BY-4.0 license). Bug Squashing

This includes the following:

Updating The Test Script To Comply With The Latest Kate Version (Issue !23)

Kate was one of the first application that KEcoLab had test scripts for. Even though we made use of as many shortcuts as possible, we were still using tabs to navigate around the user interface. This caused a problem: the previous script was made on Kate v21, and with Kate v24 being released the script needed to be updated accordingly. Also, testing the script across different distros highlighted a shortcoming of a bash-script approach: on Ubuntu the file was not being saved as intended, whereas on Fedora the file was being saved. In other words, small differences had potentially significant impacts which could make the script fail. In fact, it is one of the more fragile aspects of this approach to usage scenario scripting, which a semantics-based tool like Selenium doesn't have.

Figure : Testing Kate scripts on a Virtual Machine host (image from Aakarsh MJ published under a CC-BY-4.0 license). Helping Debug A Test Script On The Remote Lab PC (Issue !29)

There is a usage scenario script that is failing on the System Under Test. Worse yet, we do not know why and currently have no way to visually monitor the issue. This is a real pain point, mainly because we are unsure what may be the underlying problem. The script simulating user behavior doesn't seem to exit after completion, resulting in the lab being stuck in an endless loop. It is only exited when the GitLab runner times out. Since we don't yet have visual output of what is happening on the System Under Test, we are setting up a VNC to monitor what is happening. If anyone is interested in helping debug this, take a look at the remote eco lab job here. Also, check out the discussion at this issue regarding the visual monitoring of what is happening on the remote lab PC.

Figure : Testing scripts running remotely on the System Under Test in the measurement lab at KDAB, Berlin (image from Aakarsh MJ published under a CC-BY-4.0 license). Test Out And Update The SUS Scripts For Okular In The FEEP Repository (Issue !52)

This mainly involved testing the script and cross-checking everything works. In this case, the shortcuts defined at the very top weren't consistent with the shortcuts used by the script.

Looking To The Future Of KEcoLab
  1. Usage scenario scripts with KdeEcoTest. Since KdeEcoTest now supports Wayland thanks to Athul Raj and runs on Windows thanks to Amartya Chakraborty, we can utilize this tool to further enhance the remote lab. The current bash scripts are based on xdotool, which only supports X11 and not Wayland and does not run on Windows. With Plasma 6 now supporting Wayland by default, and many KDE apps being available on Windows, including Okular, this seems to be the right next step for KEcoLab tooling.

  2. Setting up a VNC to monitor scripts visually. The problems faced by us have put further emphasis on the need to be able to monitor what is or is not happening on the remote System Under Test. This was also previously considered. From Joseph's notes, based on work done by Nicolas Fella during one of the lab setup sprints, the following approach can be utilized:

# VNC/remote desktop access ## Server Install - apt install tigervnc-standalone-server - echo "kwin_x11 &" >> .vnc/xstartup - echo "konsole" >> .vnc/xstartup ## Start Server - tigervncserver -geometry 1920x1080 ## Client create SSH tunnel: - ssh -N -L 5900:localhost:5901 kde@INSERT_IP_HERE In VNC client, e.g. KRDC: - connect to localhost:5900 It will start a single Konsole window. Use this to start other stuff

If this doesn't work, we may want to reference x11vnc. If anyone has successfully setup VNC before, feel free to reach out as we would appreciate your help!

Interested in Contributing?

If you are interested in contributing to KEcoLab, you can join the matrix channels Energy Measurement Lab and KDE Energy Efficiency and introduce yourself. KEcoLab is hosted here. Thank you to Karan and Joseph as well as the whole KDE e.V. and the wonderful KDE community for helping out with this project. You can also reach out to me via email or on Matrix

Categories: FLOSS Project Planets

Kdenlive 24.02.1 released

Planet KDE - Wed, 2024-03-27 18:52

We’re delighted to announce the first maintenance release of the 24.02 series, tackling regressions, bugs, and crashes. A big thank you to everyone who reported issues during this transition – keep up the great work!

Changelog

  • Fix crash on group cut. Commit.
  • Fix possible startup crash. Commit.
  • Fix typo. Commit.
  • Fix appstream release notes formatting. Commit.
  • Add release notes to AppData. Commit.
  • Fix: some sequence properties incorrectly saved, like subtitles list, timeline zone. Commit. Fixes bug #483516.
  • Fix: Windows crash clicking fullscreen button. Commit. Fixes bug #483441.
  • Fix: cannot revert letter spacing to 0 in title clips. Commit. Fixes bug #483710.
  • Fix: font corruption on Qt6/Wayland. Commit.
  • Fix: Fix pan timeline with middle mouse button. Commit. Fixes bug #483244.
  • Minor cleanup. Commit.
  • When file fails to open, display MLT’s warning to help debugging. Commit.
  • Fix crash trying to recover a backup after opening a corrupted file. Commit.
  • Fix multiple subtitles issues: several tracks not correctly saved, sequence copy not suplicating subs, crash on adding new subtitle track. Commit. Fixes bug #482434.
  • Update file org.kde.kdenlive.appdata.xml. Commit.
  • Update file org.kde.kdenlive.appdata.xml. Commit.
  • Add .desktop file. Commit.
  • Updated icons and appdata info for Flathub. Commit.
  • Org.kde.kdenlive.appdata: Add developer_name. Commit.
  • Org.kde.kdenlive.appdata.xml use https://bugs.kde.org/enter_bug.cgi?product=kdenlive. Commit.
  • Fix bin thumbnails for missing clips have an incorrect aspect ratio. Commit.
  • On sequence change, recursively update each sequence that embedded it. Commit. Fixes bug #482949.
  • When using multiple timeline sequences, fix change in a sequence resulting in effect loss if the tab was not changed. Commit.
  • Fix crash on spacer tool with grouped subtitle. Commit. Fixes bug #482510.
  • Fix crash moving single item in a group. Commit.
  • Block Qt5 MLT plugins in thumbnailer when building with Qt6. Commit. Fixes bug #482335.
  • [CD] Disable Qt5 jobs. Commit.
  • Don’t allow autosave when the document is closing. Commit.
  • Fix deleting single item in a group not working. Commit.
  • Fix moving a single item in a group with alt not always working and breaks on undo. Commit.
  • Fix another case of clips with mixes allowed to resize over another clip, add tests. Commit.
  • Fix adding a mix to an AV clit that already had a mix on one of its components moving existing mix. Commit.
  • Fix typo. Commit.
  • Fix for Qt6’s behavior change in QVariant::isNull() (fixes speech to text). Commit.
  • Fix crash on invalid gradient data. Commit. Fixes bug #482134.
  • Enforce proper styling for Qml dialogs. Commit.
  • Fix incorrect Bin clip video usage count and initialization, spotted by Ondrej Popp. Commit.

The post Kdenlive 24.02.1 released appeared first on Kdenlive.

Categories: FLOSS Project Planets

MidCamp - Midwest Drupal Camp: And That’s a Wrap

Planet Drupal - Wed, 2024-03-27 18:35
And That’s a Wrap

MidCamp has been and gone for 2024, and we couldn't have done it without our volunteers, organizers, contributors, venue hosts, sponsors, speakers, and of course, attendees for making this year's camp a success.

Replay the Fun

Find all of the sessions you missed, share your session around, and spread the word. Videos can be watched on the MidCamp YouTube channel (🔀 jump to the playlist) or on Drupal.tv.  Captions will follow within a couple of weeks.

Share Your Feedback

For those who joined us this year, please fill out our quick survey. We really value your feedback on any part of your camp experience, and our organizer team works hard to take as much of it as possible into account for next year.

Also, don’t forget to rate any sessions you attended (these can be found on each session node).

🥁…announcing... MidCamp 2025!

Mark your calendars now! We’ll be back at DePaul University for MidCamp 2025, March 20-21.

Explore other Upcoming Drupal Events

Need more Drupal Events to tide you over to next year? Head over to the Drupal Community Events page to check out what’s coming up in 2024.

One Last Thanks

MidCamp really wouldn't be possible without our amazing sponsors.

Consider adding your organization to the list next year. (2025 prospectus coming soon!)

Keep the madness going all year by joining in the MidCamp Slack We look forward to seeing you at MidCamp 2025. We’re also on Twitter and Mastodon.

Thanks!

The MidCamp Team

Categories: FLOSS Project Planets

The Drop Times: Inspiring Inclusion: Celebrating the Women in Drupal | #2

Planet Drupal - Wed, 2024-03-27 15:04
In celebration of International Women's Day, The DropTimes dedicates March to highlighting the influential women of the Drupal community. The second part of the "Women in Drupal" series, featuring insights from April Sides of Red Hat, Stephanie Bridges of Digital Polygon, Laura Johnson of Four Kitchens, Mary Blabaum of Acquia, Tiffany Farriss of Palantir, Jill Moraca of Princeton University, and Surabhi Gokte of Axelerant, emphasizes the importance of diversity, equity, and inclusion within technology and specifically within Drupal. Their stories cover overcoming imposter syndrome, the significance of representation, mentoring junior developers, and advocating for women's visibility and leadership roles. These leaders share their commitment to fostering a welcoming, supportive, and inclusive environment, reflecting Drupal's ongoing initiatives to inspire inclusion and celebrate the diverse contributions that women make to the community and the tech industry at large.
Categories: FLOSS Project Planets

ImageX: Boosting Drupal Website Management Workflows: New Administrative Toolbar Is Coming!

Planet Drupal - Wed, 2024-03-27 14:20

Authored by: Nadiia Nykolaichuk 

The administrative navigation toolbar is an essential piece in the puzzle of your website’s overall capability to boost website management tasks. It serves as the guiding compass for your team, leading them across the administrative sections quickly and confidently. To achieve this, the toolbar needs to be intuitive, visually clear, straightforward, logically organized, and well-positioned.

Categories: FLOSS Project Planets

Steinar H. Gunderson: git grudge

Planet Debian - Wed, 2024-03-27 13:56

Small teaser:

Probably won't show up in aggregators (try this link instead).

Categories: FLOSS Project Planets

FSF News: Alyssa Rosenzweig, who spearheaded the reverse-engineering of Apple's GPU, to keynote LibrePlanet

GNU Planet! - Wed, 2024-03-27 12:50
BOSTON, Massachusetts, USA -- March 27, 2024 -- The Free Software Foundation (FSF) today announced Alyssa Rosenzweig, who reverse-engineered Apple's current line of graphics processing units (GPU), as keynote speaker for LibrePlanet 2024. LibrePlanet 2024: Cultivating Community is the sixteenth edition of the FSF's conference on ethical technology and user freedom and will be held on May 4 and 5 at the Wentworth Institute of Technology in Boston, MA, as well as online.
Categories: FLOSS Project Planets

Droptica: 7 Drupal Websites of Polish Universities That Inspire - Overview

Planet Drupal - Wed, 2024-03-27 11:04

I recently wrote a blog post about the best university websites on Drupal, which come from different corners of the world. In this article, I focus on web pages from Poland, similarly presenting their functionalities. For this compilation, I’ve selected seven examples of - in my opinion - the most interesting and inspiring websites.

Categories: FLOSS Project Planets

Real Python: Reading and Writing WAV Files in Python

Planet Python - Wed, 2024-03-27 10:00

There’s an abundance of third-party tools and libraries for manipulating and analyzing audio WAV files in Python. At the same time, the language ships with the little-known wave module in its standard library, offering a quick and straightforward way to read and write such files. Knowing Python’s wave module can help you dip your toes into digital audio processing.

If topics like audio analysis, sound editing, or music synthesis get you excited, then you’re in for a treat, as you’re about to get a taste of them!

In this tutorial, you’ll learn how to:

  • Read and write WAV files using pure Python
  • Handle the 24-bit PCM encoding of audio samples
  • Interpret and plot the underlying amplitude levels
  • Record online audio streams like Internet radio stations
  • Animate visualizations in the time and frequency domains
  • Synthesize sounds and apply special effects

Although not required, you’ll get the most out of this tutorial if you’re familiar with NumPy and Matplotlib, which greatly simplify working with audio data. Additionally, knowing about numeric arrays in Python will help you better understand the underlying data representation in computer memory.

Click the link below to access the bonus materials, where you’ll find sample audio files for practice, as well as the complete source code of all the examples demonstrated in this tutorial:

Get Your Code: Click here to download the free sample code that shows you how to read and write WAV files in Python.

You can also take the quiz to test your knowledge and see how much you’ve learned:

Take the Quiz: Test your knowledge with our interactive “Reading and Writing WAV Files in Python” quiz. Upon completion you will receive a score so you can track your learning progress over time:

Take the Quiz »

Understand the WAV File Format

In the early nineties, Microsoft and IBM jointly developed the Waveform Audio File Format, often abbreviated as WAVE or WAV, which stems from the file’s extension (.wav). Despite its older age in computer terms, the format remains relevant today. There are several good reasons for its wide adoption, including:

  • Simplicity: The WAV file format has a straightforward structure, making it relatively uncomplicated to decode in software and understand by humans.
  • Portability: Many software systems and hardware platforms support the WAV file format as standard, making it suitable for data exchange.
  • High Fidelity: Because most WAV files contain raw, uncompressed audio data, they’re perfect for applications that require the highest possible sound quality, such as with music production or audio editing. On the flipside, WAV files take up significant storage space compared to lossy compression formats like MP3.

It’s worth noting that WAV files are specialized kinds of the Resource Interchange File Format (RIFF), which is a container format for audio and video streams. Other popular file formats based on RIFF include AVI and MIDI. RIFF itself is an extension of an even older IFF format originally developed by Electronic Arts to store video game resources.

Before diving in, you’ll deconstruct the WAV file format itself to better understand its structure and how it represents sounds. Feel free to jump ahead if you just want to see how to use the wave module in Python.

The Waveform Part of WAV

What you perceive as sound is a disturbance of pressure traveling through a physical medium, such as air or water. At the most fundamental level, every sound is a wave that you can describe using three attributes:

  1. Amplitude is the measure of the sound wave’s strength, which you perceive as loudness.
  2. Frequency is the reciprocal of the wavelength or the number of oscillations per second, which corresponds to the pitch.
  3. Phase is the point in the wave cycle at which the wave starts, not registered by the human ear directly.

The word waveform, which appears in the WAV file format’s name, refers to the graphical depiction of the audio signal’s shape. If you’ve ever opened a sound file using audio editing software, such as Audacity, then you’ve likely seen a visualization of the file’s content that looked something like this:

Waveform in Audacity

That’s your audio waveform, illustrating how the amplitude changes over time.

The vertical axis represents the amplitude at any given point in time. The midpoint of the graph, which is a horizontal line passing through the center, represents the baseline amplitude or the point of silence. Any deviation from this equilibrium corresponds to a higher positive or negative amplitude, which you experience as a louder sound.

As you move from left to right along the graph’s horizontal scale, which is the timeline, you’re essentially moving forward in time through your audio track.

Having such a view can help you visually inspect the characteristics of your audio file. The series of the amplitude’s peaks and valleys reflect the volume changes. Therefore, you can leverage the waveform to identify parts where certain sounds occur or find quiet sections that may need editing.

Coming up next, you’ll learn how WAV files store these amplitude levels in digital form.

The Structure of a WAV File Read the full article at https://realpython.com/python-wav-files/ »

[ 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

mark.ie: Using the LocalGov Drupal Subsites Extras module

Planet Drupal - Wed, 2024-03-27 08:32

Create subsites with a different look and feel to the rest of your LocalGov Drupal website.

Categories: FLOSS Project Planets

Haruna 1.0.2

Planet KDE - Wed, 2024-03-27 07:00

Haruna version 1.0.2 is out.

There are not a lot of changes in this release as the focus was on porting to Qt6 and KF6 and code refactoring. Some hwdec options have been removed, if needed they can be set in the settings under "Custom commands" as set hwdec decoding_method_name and choose "Run at startup".

You can get it now on flathub:

Windows version can be found here. Availability of other package formats depends on your distro and the people who package Haruna.

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.0.2

Features:

  • Opening items from the playlist is faster
  • If Maximum recent files setting is set to zero the recent files are removed from the config file

Bugfixes:

  • Opening file through Open File action was not playing the file
  • Opening playlist file from playlist header was not doing anything
  • Hiding/showing Playlist toolbar setting was not working
  • Track sub-menus in Audio and Subtiles global menus being empty
  • Freeze when opening HamburgerMenu
Categories: FLOSS Project Planets

LN Webworks: How Can Drupal Commerce Drive Your E-Commerce Revenue to New Heights?

Planet Drupal - Wed, 2024-03-27 05:23

Every e-commerce platform is different and comes with its own unique and specific needs. Some can use simple ready-made tools, while others need special software made just for them. New trends like smart personalization, easy shopping on phones, and caring for the environment are also important for online shops.

To help businesses achieve personalized website goals, Drupal comes into the scene. It's like a toolbox that lets you build your online store just the way you want. Drupal commerce is great because it's flexible and lets you try out new ideas. But there’s more to it. 

Today, we'll learn more about what makes Drupal Commerce special, like its features and how it's built.

Categories: FLOSS Project Planets

Pages