Feeds

Palantir: From Finance to Palantir

Planet Drupal - Wed, 2024-06-12 08:00

Taking a dive into the deep, dark quagmire of life

Some people have career aspirations from a young age, but for the rest of us, discovering a career-worthy passion, or even learning how to distinguish a job from a career, can take some time. I was nearly ten years into a job in finance (managing insurance/retirement/wealth-building products) when I finally admitted to myself that I couldn’t do it anymore. I felt like I should have a career, not just a job. I wanted to feel proud of the way I spent my days.

Diving in

After some soul-searching, I signed up for a Full-Stack Web Development bootcamp. I was never the kid who tinkered with code or tried to see how my AOL Instant Messenger worked (yes, I was a kid of the 90s) - but I suddenly found myself fascinated with the combination of language, math, and puzzle that was hiding in my browser’s Inspect tool. The bootcamp’s cost made this a risky prospect, but it also made me more likely to commit fully. I can’t say I loved every moment of the grind; working full-time, raising three kids (whom I had adopted just two days into the bootcamp), attending evening classes, keeping up with homework, and maintaining sanity was not always the easiest, but I tend to thrive in chaos. I learned the MERN Stack (MongoDB, Express.js, React, and Node), and after six months I left the bootcamp with one of the highest scores in my class and even higher hopes.

Cue the mass tech layoffs of late 2022, pitting my emerging knowledge against developers with years of experience at tech giants such as the site formerly known as Twitter. My understanding of code was evident, but my ability to explain code was underdeveloped, leaving me flailing in interviews and unable to find anyone willing to take a chance on me. Anyone, that is, until my local Women Who Code chapter posted about Palantir.net’s fellowship program. I applied, spent three months learning Drupal through DrupalEasy's Drupal Career Online program, and started an internship with Palantir.net. That internship turned into a full-time engineering role, and now I’m creating innovative tech and building professional websites from scratch.

Going deep

How could I transition from finance to React/JavaScript to Drupal/PHP in such a short time? Same way I managed to learn French — its proximity to English based on its Latin roots gave me a leg up. Both JavaScript and PHP are Object-Oriented languages, meaning they derive from making real-world objects into code. Object-Oriented Programming, or OOP, is a paradigm that encompasses several coding languages, and since I already had a base in OOP via JavaScript, I mainly needed to learn the syntax of PHP as the concepts were mostly the same. Not only are the languages similar, but the overall folder structure and architecture of both Drupal and React can be set up using the same patterns. I quickly noticed my new Palantiri teammates using the MVC (Model-View-Controller) architecture, which I was already comfortable with.

Another benefit of that MVC architecture is its collaborative nature. By separating sections of the code based on functionality, different people could work simultaneously on building one piece of a site without risking overwriting one another. React most prominently offers collaboration through its separation of interests via Components, delivering an end product to users, while Drupal is set up to not only be collaboratively built, but to allow site builders to delegate content creation, and even site administration, to users.

Surfacing from murky depths

Perhaps the coolest thing I discovered through this journey is the ability to create a site harnessing the powers of both Drupal and React! Drupal’s Content Management System structure creates a powerful backend for React’s simple and extensive front-end library. This just leaves me with the accessibility question - how can we make Drupal a more popular and attainable technology for entry-level developers? According to Statista’s data analytic survey, Drupal ranks 29th among the most-used frameworks among developers worldwide as of 2023. In the same survey, React ranked second only to Node, which is another JavaScript framework.

I think we can find a path for learners of all types, we just need to harness the power of our community to get there. We are not in competition with React or Wordpress or any other framework, Drupal is just another tool that people should have an opportunity to explore at any level. Who knows? Maybe they’ll fall in love like so many others have.

Calm waters

I love the glimmer of awe in people’s eyes now when I tell them I’m a software engineer. I can’t say the path was easy, but I’ve never regretted making the career change, and I never tire of continuing to suck up every ounce of knowledge I can find. I love the curiosity and creativity that I can bring to work with me every day, bouncing from front-end to back-end work, developing brand new technologies, and exploring every little thing that interests me. I’m happy to say I have found my career. 

Culture Drupal People
Categories: FLOSS Project Planets

Real Python: Quiz: Python Mappings

Planet Python - Wed, 2024-06-12 08:00

In this quiz, you’ll test your understanding of the basic characteristics and operations of Python mappings. By working through this quiz, you’ll revisit the key concepts and techniques of creating a custom mapping.

[ 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

The Drop Times: Why 1xINTERNET Rushed to Support the Starshot Initiative: Insights from Baddý Sonja

Planet Drupal - Wed, 2024-06-12 03:23
Discover why 1xINTERNET swiftly supported the Drupal Starshot Initiative. In this interview by Kazima Abbas, Baddy Sonja Breidert, CEO and Co-Founder, shares the motivations, goals, and impact behind their involvement. Don't miss these valuable insights from a key player in the Drupal community!
Categories: FLOSS Project Planets

Matthew Garrett: SSH agent extensions as an arbitrary RPC mechanism

Planet Debian - Tue, 2024-06-11 22:57
A while back, I wrote about using the SSH agent protocol to satisfy WebAuthn requests. The main problem with this approach is that it required starting the SSH agent with a special argument and also involved being a little too friendly with the implementation - things worked because I could provide an arbitrary public key and the implementation never validated that, but it would be legitimate for it to start doing so and then break everything. And it also only worked for keys stored on tokens that ssh supports - there was no way to extend this to other keystores on the client (such as the Secure Enclave on Macs, or TPM-backed keys on PCs). I wanted a better solution.

It turns out that it was far easier than I expected. The ssh agent protocol is documented here, and the interesting part is the extension support extension mechanism. Basically, you can declare an extension and then just tunnel whatever you want over it. As before, my goto was the go ssh agent package which conveniently implements both the client and server side of this. Implementing the local agent is trivial - look up SSH_AUTH_SOCK, connect to it, create a new agent client that can communicate with that by calling NewClient, and then implement the ExtendedAgent interface, create a new socket, and call ServeAgent against that. Most of the ExtendedAgent functions should simply call through to the original agent, with the exception of Extension(). Just add a case statement against extensionType, define some reasonably namespaced extension, and you're done.

Now you need to use this agent. You probably don't want to use this for arbitrary hosts (agent forwarding should only be enabled for remote systems you trust, not arbitrary machines you connect to - if you enabled agent forwarding for github and github got compromised, github would be able to use any private keys loaded into your agent, and you probably don't want that). So the right approach is to add a Host entry to the ssh config with a ForwardAgent stanza pointing at the socket you created in your new agent. This way the configured subset of remote hosts will automatically talk to this new custom agent, while forwarding for anything else will still be at the user's discretion.

For the remote end things are even easier. Look up SSH_AUTH_SOCK and call NewClient as before, and then simply call client.Extension(). Whatever you stick in the contents argument will simply end up being received at the client end. You now have a communication channel between a the remote system and the local client, and what you do with that is up to you. I'm using it to allow a remote system to obtain auth tokens from Okta and forward WebAuthn challenges that can either be satisfied via a local WebAuthn token or by passing the query off to Mac TouchID, but there's fundamentally no constraints whatsoever on what can be done here.

(If you want to do this on Windows and still have everything work with existing clients you'll need to take this into account - Windows didn't really do Unix sockets until recently so everything there is awful)

comments
Categories: FLOSS Project Planets

Freexian Collaborators: Monthly report about Debian Long Term Support, May 2024 (by Roberto C. Sánchez)

Planet Debian - Tue, 2024-06-11 20:00

Like each month, have a look at the work funded by Freexian’s Debian LTS offering.

Debian LTS contributors

In May, 17 contributors have been paid to work on Debian LTS, their reports are available:

  • Adrian Bunk did 34.25h (out of 24.0h assigned and 22.0h from previous period), thus carrying over 11.75h to the next month.
  • Bastien Roucariès did 20.0h (out of 20.0h assigned).
  • Ben Hutchings did 16.0h (out of 24.0h assigned), thus carrying over 8.0h to the next month.
  • Chris Lamb did 18.0h (out of 18.0h assigned).
  • Daniel Leidert did 8.0h (out of 10.0h assigned), thus carrying over 2.0h to the next month.
  • Emilio Pozuelo Monfort did 35.5h (out of 46.0h assigned), thus carrying over 10.5h to the next month.
  • Guilhem Moulin did 13.0h (out of 14.75h assigned and 5.25h from previous period), thus carrying over 7.0h to the next month.
  • Lee Garrett did 11.0h (out of 37.25h assigned and 8.75h from previous period), thus carrying over 35.0h to the next month.
  • Lucas Kanashiro did 10.0h (out of 20.0h assigned), thus carrying over 10.0h to the next month.
  • Markus Koschany did 40.0h (out of 40.0h assigned).
  • Ola Lundqvist did 6.5h (out of 22.5h assigned and 1.5h from previous period), thus carrying over 17.5h to the next month.
  • Roberto C. Sánchez did 7.75h (out of 11.0h assigned and 1.0h from previous period), thus carrying over 4.25h to the next month.
  • Santiago Ruano Rincón did 8.0h (out of 16.0h assigned), thus carrying over 8.0h to the next month.
  • Sean Whitton did 5.5h (out of 5.5h assigned and 0.5h from previous period), thus carrying over 0.5h to the next month.
  • Sylvain Beucler did 10.5h (out of 0.75h assigned and 45.25h from previous period), thus carrying over 35.5h to the next month.
  • Thorsten Alteholz did 14.0h (out of 14.0h assigned).
  • Tobias Frost did 7.75h (out of 10.0h assigned and 2.0h from previous period), thus carrying over 4.25h to the next month.
Evolution of the situation

In May, we have released 20 DLAs.

Notable security updates in May included:

  • apache2: multiple vulnerabilities which may result in HTTP response splitting, denial of service, or authorization bypass (by Bastien Roucariès, in collaboration with apache2 maintainer Yadd)
  • bind9: two vulnerabilities, called KeyTrap and NSEC3, which may result in denial of service (by Santiago Ruano Rincón)
  • python-pymysql: potential SQL injection attack (by Chris Lamb)

The aforementioned apache2 was prepared by its Debian maintainer Yadd. This update also involved work on the package test suite in buster, which contributor Bastien Roucariès then forwarded to the apache2 package in unstable. More importantly, a regression in fossil was reported, and Bastien prepared a fix for it. Bastien coordinated the upload of both packages to minimize the introduction of regressions.

Contributor Daniel Leidert also prepared an upload of runc to Debian 11 in order fix a number of CVEs still affecting that package. Finally, contributor Thorsten Alteholz prepared uploads for qtbase-opensource-src, libjwt, and libmicrohttpd in Debian 11. Note that Debian 11 will pass into the LTS phase of support in August and these updates will improve the state and long-term supportability of Debian 11.

Debian 10 is presently in its final month of LTS support (as announced on the debian-lts-announce mailing list, support will end on June 30th), after which no new security updates will be made available on security.debian.org.

However, Freexian and its team of paid Debian contributors will continue to maintain Debian 10 going forward for the customers of the Extended LTS offer. Subscribe right away if you sill have Debian 10 which must be kept secure (and which cannot yet be upgraded).

Thanks to our sponsors

Sponsors that joined recently are in bold.

Categories: FLOSS Project Planets

Kay Hayen: Nuitka Release 2.3

Planet Python - Tue, 2024-06-11 18:00

This is to inform you about the new stable release of Nuitka. It is the extremely compatible Python compiler, “download now”.

This release bumps the long-awaited 3.12 support to a complete level. Now, Nuitka behaves identically to CPython 3.12 for the most part.

In terms of bug fixes, it’s also huge. Especially for Unicode paths and software with Unicode extension module names and Unicode program names, and even non-UTF8 code names, there have been massive amounts of improvements.

Table of Contents

Bug Fixes
  • Standalone: Added support for python-magic-bin package. Fixed in 2.2.1 already.

  • Fix: The cache directory creation could fail when multiple compilations started simultaneously. Fixed in 2.2.1 already.

  • macOS: For arm64 builds, DLLs can also have an architecture dependent suffix; check that as well. Makes the soundfile dependency scan work. Fixed in 2.2.1 already.

  • Fix: Modules where lazy loaders handling adds hard imports when a module is first processed did not affect the current module, potentially causing it not to resolve hidden imports. Fixed in 2.2.1 already.

  • macOS: The use of libomp in numba needs to cause the extension module not to be included and not to look elsewhere. Fixed in 2.2.1 already.

  • Python3.6+: Fix, added support for keyword arguments of ModuleNotFoundError. Fixed in 2.2.1 already.

  • macOS: Detect more versioned DLLs and arm64 specific filenames. Fixed in 2.2.1 already.

  • Fix, was not annotating exception exit when converting an import to a hard submodule import. Fixed in 2.2.2 already.

  • Fix, branches that became empty can still have traces that need to be merged.

    Otherwise, usages outside the branch will not see propagated assignment statements. As a result, these falsely became unassigned instead. Fixed in 2.2.2 already.

  • Windows: Fix, uninstalled self-compiled Python didn’t have proper installation prefix added for DLL scan, resulting in runtime DLLs not picked up from there. Fixed in 2.2.2 already.

  • Standalone: Added support for newer PySide6 version 6.7. It needed correction on macOS and has a new data file type. Fixed in 2.2.3 already.

  • Standalone: Complete support for pyocd package. Fixed in 2.2.3 already.

  • Module: Fix, the created .pyi files were incomplete.

    The list of imported modules created in the finalization step was incomplete, we now go over the actual done modules and mark all non-included modules as dependencies.

  • Scons: Fix, need to avoid using Unicode paths towards the linker on Windows. Instead, use a temporary output filename and rename it to the actual filename after Scons has completed.

  • Windows: Avoid passing Unicode paths to the dependency walker on Windows, as it cannot handle those. Also, the temporary filenames in the build folder must be in short paths, as it cannot handle them in case that is a Unicode path.

  • Scons: For ccache on Windows, the log filename must be a short path too, if the build folder is a Unicode path.

  • Windows: Make sure the Scons build executes inside a short path as well, so that a potential Unicode path is visible to the C compiler when resolving the current directory.

  • Windows: The encoding of Unicode paths for accelerated mode values of __file__ was not making sure that hex sequences were correctly terminated, so in some cases, it produced ambiguous C literals.

  • Windows: Execute binaries created with --windows-uac-admin with and --run options with proper UAC prompt.

  • Fix, need to allow for non-UTF8 Unicode in variable names, function names, class names, and method names.

  • Python3.10+: Fix, match statements that captured the rest of mapping checks were not working yet.

    match value: case {"key1": 5, **rest}: ... # rest was not assigned here
  • Windows: When deleting build folders, make sure the retries leading to a complete deletion always.

  • Python2: Fix, could crash with non-unicode program paths on Windows.

  • Avoid giving SyntaxWarning from reading source code

    For example, the standard site module of Python 3.12 gives warnings about illegal escape sequences that nobody cares about apparently.

  • Fix, the matplotlib warnings by options-nanny were still given even if the no-qt plugin was used, since the variable name referenced there was not actually set yet by that plugin.

  • Windows: Fix, when using the uninstalled self-compiled Python, we need python.exe to find DLL dependencies. Otherwise it doesn’t locate the MSVC runtime and Python DLL properly.

  • Standalone: Added support for freetype package.

New Features
  • Support for Python 3.12 is finally there. We focused on scalability first and because we did things the correct way immediately, rather than rushing to get it working and improving only later.

    As a result, the correctness and performance of Nuitka with previous Python releases are improved as well.

    Some things got delayed, though. We need to do more work to take advantage of other core changes. Concerning exceptions normalized at creation time, the created module code doesn’t yet take advantage. Also, more efficient two-digit long handling is possible with Python 3.12, but not implemented. It will take more time before we have these changes completed.

  • Experimental support for Python 3.13 beta 1 is also there, and potentially surprising, but we will try and follow its release cycle closely and aim to support it at the time of release.

    Nuitka has followed all of its core changes so far, and basic tests are passing; the accelerated, module, standalone, and onefile modes all work as expected. The only thing delayed is the uncompiled generator integration, where we need to replicate the exact CPython behavior. We need to have perfect integration only for working with the asyncio loop, so we wait with it until release candidates appear.

  • Plugins: Added support to include directories entirely unchanged by adding raw_dir values for data-files section, see Nuitka Package Configuration.

  • UI: The new command line option --include-raw-dir was added to allow including directories entirely unchanged.

  • Module: Added support for creating modules with Unicode names. Needs a different DLL entry function name and to make use of two-phase initialization for the created extension module.

  • Added support for OpenBSD standalone mode.

Optimization
  • Python3: Avoid API calls for allocators

    Most effective with Python 3.11 or higher but also many other types like bytes, dict keys, float, and list objects are faster to create with all Python3 versions.

  • Python3.5+: Directly use the Python allocator functions for object creation, avoiding the DLL API calls. The coverage is complete with Python3.11 or higher, but many object types like float, dict, list, bytes benefit even before that version.

  • Python3: Faster creation of StopIteration objects.

    With Python 3.12, the object is created directly and set as the current exception without normalization checks.

    We also added a new specialized function to create the exception object and populate it directly, avoiding the overhead of calling of the StopIteration type.

  • Python3.10+: When accessing freelists, we were not passing for tstate but locally getting the interpreter object, which can be slower by a few percent in some configurations. We now use the free lists more efficient with tuple, list, and dict objects.

  • Python3.8+: Call uncompiled functions via vector calls.

    We avoid an API call that ends up being slower than using the same function via the vector call directly.

  • Python3.4+: Avoid using _PyObject_LengthHint API calls in list.extend and have our variant that is faster to call.

  • Added specialization for os.path.normpath. We might benefit from compile time analysis of it once we want to detect file accesses.

  • Avoid using module constants accessor for global constant values

    For example, with (), we used the module-level accessor for no reason, as it is already available as a global value. As a result, constant blobs shrink, and the compiled code becomes slightly smaller , too.

  • Anti-Bloat: Avoid using dask from the sparse module. Added in 2.2.2 already.

Organizational
  • UI: Major change in console handling.

    Compiled programs on Windows now have a third mode, besides console or not. You can now create GUI applications that attach to an available console and output there.

    The new option --console controls this and allows to enforce console with the force value and disable using it with the disable value, the attach value activates the new behavior.

    Note

    Redirection of outputs to a file in attach mode only works if it is launched correctly, for example, interactively in a shell, but some forms of invocation will not work; prominently, subprocess.call without inheritable outputs will still output to a terminal.

    On macOS, the distinction doesn’t exist anymore; technically it wasn’t valid for a while already; you need to use bundles for non-console applications, though, by default otherwise a console is forced by macOS itself.

  • Detect patchelf usage in buggy version 0.18.0 and ask the user to upgrade or downgrade it, as this specific version is known to be broken.

  • UI: Make clear that the --nofollow-import-to option accepts patters.

  • UI: Added warning for module mode and usage of the options to force outputs as they don’t have any effect.

  • UI: Check the success of Scons in creating the expected binary immediately after running it and not only once we reach post-processing.

  • UI: Detect empty user package configuration files

  • UI: Do not output module ast when a plugin reports an error for the module, for example, a forbidden import.

  • Actions: Update from deprecated action versions to the latest versions.

Tests
  • Use Nuitka Project Options for the user plugin test rather than passing by environment variables to the test runner.

  • Added a new search mode, skip, `` to complement ``resume which resumes right

    after the last test resume stopped on. We can use that while support for a Python version is not complete.

Cleanups
  • Solved a TODO about using unified code for setting the StopIteration, coroutines, generators, and asyncgen used to be different.

  • Unified how the binary result filename is passed to Scons for modules and executables to use the same result_exe key.

Summary

This release marks a huge step in catching up with compatibility of Python. After being late with 3.12 support, we will now be early with 3.13 support if all goes well.

The many Unicode support related changes also enhanced Nuitka to generate 2 phase loading extension modules, which also will be needed for sub-interpreter support later on.

From here on, we need to re-visit compatibility. A few more obscured 3.10 features are missing, the 3.11 compatibility is not yet complete, and we need to take advantage of the new caching possibilities to enhance performance for example with attribute lookups to where it can be with the core changes there.

For the coming releases until 3.13 is released, we hope to focus on scalability a lot more and get a much needed big improvement there, and complete these other tasks on the side.

Categories: FLOSS Project Planets

Open Source AI Definition – Weekly update June 10

Open Source Initiative - Tue, 2024-06-11 17:40
Open Source AI needs to require data to be viable
  • With many different discussions happening at once, here are the main points:
    • On the issue of training data
      • @mark is concerned with openness of AI not being meaningful if there is not a focus on the training data.” Model weights are the most inscrutable component of current generative AI, and providers that release only [the weights] should not get a free ‘openness’ pass.”
      • @stefano agrees with all of that but questions the criteria used to assign green marks in Mark’s paper, pointing out inconsistencies. They use the example of Pythia-Chat-Base-7, which relies on a dataset from OpenDataHub with potential issues like non-versioned data and stale links, failing to meet stringent requirements required by @juliaferraioli. Similar concerns are raised for other models like OLMo 7B Instruct, which lack specific data versioning details. Maffulli also highlights the case of Pythia-7B, which once may have been compliant but it’s now problematic due to the unavailability of its foundational dataset, the Pile, illustrating the complexities in maintaining an “open source” status over time, if the stringent proposal suggested by @juliaferraioli and the AWS team is adopted.
      • @shujisado adds that while he sympathizes with @juliaferraioli‘s request for datasets, @stefano‘s arguments in support of the concept of “Data information” are aligned with the OSI principles and are reasonable.
      • @spotaws stresses that “data information” alone is insufficient if the data itself is too vague.
      • @juliaferraioli adds that while replicating AI systems like OLMo or Pythia may seem impractical due to costs and statistical nature, the capability is crucial for broader adoption and consistency.  She finds the current definition to be unclear and subjective.
      • @zack recommends to review StarCoder2, recognizing that it would be in the same category of BLOOM: a system with lots of transparency and a dataset made available but released with a restrictive license.
      • @Ezequiel_Lanza joined the conversation in support of the concept of Data information, claiming, with technical arguments that “sharing the dataset is not necessarily required and may not justify the potential risks associated with making it mandatory.”
      • Partially open / restrictive licenses
        • Continuing @marks points regarding restrictive licenses (like the ethical licenses), @stefano has added a link to an article highlighting some reasons why OSI is staying away from these licenses.
        • @pchestek further adds that a partially open license would create even more opportunities for open washing, as “open source AI” could have many meanings.
        • @mark clarified that rather than proposing a variety of meanings, they are seeking to highlight the dimensions of openness in their paper, exploring the broader landscape. 
        • @stefano adds that in the 26 years of OSI, it has contended with numerous organizations claiming varying degrees of openness as “open source. This issue is now mirrored in AI, as companies seek the market value of being labeled Open Source. Open Source is binary: either users have full rights or they don’t, and any system that falls short is not Open Source AI, regardless of how “almost” open it is.
      • Field of use/restriction 
        • @juliaferraioli believes that OSAID should include prohibitions against field-of-use restrictions.
        • @shujisado adds that OSAID specifies four freedoms as requirements for being considered open source and that this should be understood as the same since “freedom” is the same as “non-restricted”. The 10 clauses of the OSD have been replaced by the checklist in draft v0.0.8.
        • @juliaferraioli adds that individual components may be covered by their individual licenses, but the overall system may be subject to additional terms, which is why we need this to be explicit.
Initial Report on Definition Validation
  • @Mer has added how far we are regarding our system analysis compared to our current draft definition. Some points that remain incomplete have been highlighted.
  • Mistral (Mixtral 8x7B) is considered not in alignment with the OSAID because its data pre-processing code is not released under an OSI-approved license.
Can a derivative of non-open-source AI be considered Open Source AI?
  • @tarek_ziade shares his experience fine-tuning a “small” model (200M parameters) for a Firefox feature to describe images, using a base model for image encoding and text decoding. Despite not having 100% traceability of upstream data, Tarek argues that intentional fine-tuning and transparency make the new fine-tuned model open source. Any issues arising from downstream data can be addressed by the project maintainers, maintaining the model’s open source status.
Town hall recording out
  • We held our 10th town hall meeting a week and a half ago. You can access the recording here if you missed it.
  • A new town hall meeting is scheduled for this Friday, June 14.
Categories: FLOSS Research

Brett Cannon: Saying thanks to open source maintainers

Planet Python - Tue, 2024-06-11 17:29

After signing up for GitHub Sponsors, I had a nagging feeling that somehow asking for money from other people to support my open source work was inappropriate. But after much reflection, I realized that phrasing the use of GitHub Sponsors as a way to express patronage/support and appreciation for my work instead of sponsorship stopped me feeling bad about it. It also led me to reflect on to what degree people can express thanks to open source maintainers.

⚠️This blog post is entirely from my personal perspective and thus will not necessarily apply to every open source developer out there.Be nice

The absolutely easiest way to show thanks is to simply not be mean. It sounds simple, but plenty of people fail at even this basic level of civility. This isn&apost to say you can&apost say that a project didn&apost work for you or you disagree with something, but there&aposs a massive difference between saying "I tried the project and it didn&apost meet my needs" and "this project is trash".

People failing to support this basic level of civility is what leads to burnout.

Be an advocate

It&aposs rather indirect, but saying nice things about a project is a way of showing thanks. As an example, I have seen various people talk positively about pyproject.toml online, but not directly at me. That still feels nice due to how much effort I put into helping make that file exist and creating the [project] table.

Or put another way, you never know who is reading your public communications.

Produce your own open source

Another indirect way to show thanks is by sharing your own open source code. By maintaining your own code, you&aposll increase the likelihood I myself will become a user of your project. That then becomes a circuitous cycle of open source support between us.

Say thanks

Directly saying "thank you" actually goes a really long way. It takes a lot of positive interactions to counteract a single negative interaction. You might be surprised how much it might brighten someone&aposs day when someone takes the time and effort to reach out and say "thank you", whether that&aposs by DM, email, in-person at a conference, etc.

Fiscal support

As I said in the opening of this post, I set up GitHub Sponsors for myself as a way for people to show fiscal support for my open source work if that&aposs how they prefer to express their thanks (including businesses). Now I&aposm purposefully not saying "sponsor" as to me that implies that giving money leads to some benefit (e.g. getting a shout-out somewhere) which is totally reasonable for people to do. But for me, since every commit is a gift, I&aposm financially secure, and I&aposm not trying to make a living from my volunteer open source work or put in the effort to make sponsorship worth it, I have chosen to treat fiscal support as a way of showing reciprocity for the gift of sharing my code that you&aposve already received. This means I fully support all open source maintainers setting up fiscal support at a minimum, and if they want to put in the effort to go the sponsorship route then they definitely should.

Producing open source also isn&apost financially free. For instance, I pay for:

  1. The hosting of this blog via Ghost(Pro)
  2. Obsidian Sync to keep my open source notes available on all my devices so when I have an idea I can write it down
  3. Obsidian Publish to share my open source notes
  4. Computer upgrades (including ergonomic upgrades like keyboards)
  5. My personal time away from my wife and child, family and friends (which my open source journal exists to try and point out for those who don&apost realize how much time I put into my volunteer work)

So while open source is "free" for you as the consumer, the producer very likely has concrete financial costs in producing that open source on top of the intangible costs like volunteering their personal time.

But as I listed earlier, there are plenty of other ways to show thanks without having to spend money that can be equally valuable to a maintainer.

I also specifically didn&apost mention contributing. I have said before that contributions are like giving someone a puppy: it seems like a lovely gift at the time, but the recipient is now being "gifted" daily walks involving scooping 💩 and vet bills. As such, contributions from others can be a blessing and a curse all at the same time depending on the contribution itself, the attitude of the person making the contribution, etc. So I wouldn&apost always assume my contribution is as welcomed and desired as much as a "thank you" note.

Categories: FLOSS Project Planets

PyCoder’s Weekly: Issue #633 (June 11, 2024)

Planet Python - Tue, 2024-06-11 15:30

#633 – JUNE 11, 2024
View in Browser »

String Interpolation in Python: Exploring Available Tools

In this tutorial, you’ll learn about the different tools that Python provides for performing string interpolation. String interpolation allows you to create new strings by inserting different objects into a string template.
REAL PYTHON

Notebooks for Fundamentals of Music Processing

This is a collection of Python Notebooks for teaching and learning the fundamentals of music processing. Examples include illustrations, sound samples, math, and more.
INTERNATIONAL AUDIO LABS

Upgrade Python Versions Without the Pain

Stop wasting 30% of your team’s sprint on maintaining legacy codebases. Automatically migrate and keep up-to-date on Python versions, so that you can focus on being productive while staying secure, without the risk of breaking changes - Get a code assessment today →
ACTIVESTATE sponsor

Python’s Many Command-Line Utilities

This article describes every command-line tool included with Python, each of which can be run with python -m module_name.
TREY HUNNER

String Interpolation in Python (Quiz)

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.
REAL PYTHON

Python 3.12.4 Released

See the full list of changes in this release
CPYTHON DEV BLOG

PEP 712 Rejected

This Python Enhancement Proposal “Adding a ‘converter’ parameter to dataclasses.field” was determined to have an insufficient number of use cases.
PYTHON

Python 3.13.0 Beta 2 Released

CPYTHON DEV BLOG

Articles & Tutorials What Are CRUD Operations?

CRUD operations are the cornerstone of application functionality. Whether you access a database or interact with a REST API, you usually want to create, retrieve, update, and delete data. In this tutorial, you’ll explore how CRUD operations work in practice.
REAL PYTHON

What We Talk About When We Talk About System Design

Mahesh talks about the rules he has encountered when doing research on designing large systems. Guidelines include late-binding on the design, focusing on the problem rather than existing systems, talking about other applications, and more.
MAHESH BALAKRISHNAN

Get Your Own AI Agent to Answer Questions From Your Database

Introducing “Database Mind” - a ready-to-use AI system designed for easy integration into your projects. As part of the “Minds Endpoints” AI platform, it offers a simple plug-and-play API service, enabling developers to effortlessly incorporate advanced AI capabilities into their solutions →
MINDSDB sponsor

Statically Typed Functional Programming With Python 3.12

This detailed article looks at how to use the match statement along with Python’s typing mechanism to write functional programs similar in style to Kotlin.
OSKAR WICKSTROM

How to Annotate a Graph With Matplotlib and Python

The Matplotlib package is great for visualizing data. One of its many features is the ability to annotate points on your graph. This article shows you how.
MIKE DRISCOLL

bytes: The Lesser-Known Python Built-in Sequence

The bytes data type looks a bit like a string, but it isn’t a string. This article explores it and also looks at the main Unicode encoding, UTF-8
STEPHEN GRUPPETTA

Reflecting on One Year of Being an Engineering Manager

“Being a manager is a focus change from code to people, from output to outcomes and from being productive to making most of everyone’s time.” Read more of Victor’s reflecting on his first year as a manager.
VICTOR STOJANOV

Testing With Python: Fake It

This article is on using mock in your Python testing and is part of a larger series on testing in general.
BITECODE

Projects & Code Mesop: Build Web Apps in Python

GITHUB.COM/GOOGLE

WeasyPrint: The Awesome Document Factory

GITHUB.COM/KOZEA

django-axes: Track of Failed Login Attempts in Django

GITHUB.COM/JAZZBAND

Zango: Microservices in Django

GITHUB.COM/HEALTHLANE-TECHNOLOGIES

gloe: Library for Flow-Oriented Code

GITHUB.COM/IDEOS

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

June 12, 2024
REALPYTHON.COM

Wagtail Space NL

June 12 to June 15, 2024
WAGTAIL.SPACE

Django Girls Abraka Workshop 2024

June 13 to June 15, 2024
DJANGOGIRLS.ORG

Python Atlanta

June 13 to June 14, 2024
MEETUP.COM

PyData London 2024

June 14 to June 17, 2024
PYDATA.ORG

PyCamp Leipzig 2024

June 15 to June 17, 2024
BARCAMPS.EU

Wagtail Space US

June 20 to June 23, 2024
WAGTAIL.SPACE

Happy Pythoning!
This was PyCoder’s Weekly Issue #633.
View in Browser »

[ Subscribe to 🐍 PyCoder’s Weekly 💌 – Get the best Python news, articles, and tutorials delivered to your inbox once a week >> Click here to learn more ]

Categories: FLOSS Project Planets

The Drop Times: Drupal Starshot Initiative Sets Strategic Milestones in Product Definition

Planet Drupal - Tue, 2024-06-11 12:21
The Drupal community advanced its Starshot initiative with a key session on June 7, 2024, led by Dries Buytaert and Cristina Chumillas. The session focused on refining the Drupal ecosystem with user-centric improvements and strategic development milestones. Key topics included the mission statement review, concept wireframes, draft milestones for DrupalCon Barcelona, and the Starshot Council.
Categories: FLOSS Project Planets

The Last 2 Weeks in my GSoC

Planet KDE - Tue, 2024-06-11 11:30

We’re already on Week 3 of the coding period of Google Summer of Code! As a reminder, I’m adding Python support to a few KDE Frameworks. During the first two weeks I added support for KWidgetsAddons, and it’s now almost finished except for two widgets whose bindings aren’t generated properly and don’t compile.

I also wrote (with the help of my mentor Carl) the necessary CMake code to build the library. That part is probably going to end (hopefully) in extra-cmake-modules so it can be used by anyone easily. The plan is to eventually submit each of the bindings to their repository so it’s easier to keep the C++ libraries in sync with their Python bindings.

This week I will be adding some examples for KWidgetAddons now that it’s on a usable status. If you want to see how it’s going, you can take a look at the code.

Categories: FLOSS Project Planets

Dries Buytaert: Major version upgrades in Drupal: tools and workflow

Planet Drupal - Tue, 2024-06-11 10:29

When a new major version of Drupal is released, custom code often requires updates to align with API changes, including the removal of deprecated APIs.

Because I keep forgetting certain aspects of this workflow, I decided to document it for future reference.

Tools overview Tool Interface Functionality Target Audience Upgrade Status module UI in Drupal Identifies deprecated code, hosting environment compatibility, and more Site administrators and developers Drupal Check Command-line Identifies deprecated code Developers, especially during coding and continuous integration (CI) Upgrade Status module

The Upgrade Status module assesses a Drupal site's readiness for major version upgrades by checking for deprecated code and other compatibility issues.

Screenshot of a Drupal upgrade status report showing hosting environment compatibility checks.
  1. Install the Upgrade Status module like you would install any other Drupal module:

    [code bash]$ ddev composer require –dev drupal/upgrade_status[/code]

    Here, ddev is the tool I prefer for managing my local development environment. composer is a dependency manager for PHP, commonly used to install Drupal modules. The –dev option specifies that the module should be installed as a development requirement, meaning it is necessary for development environments but not installed on production environments.

  2. Enable the Upgrade Status module:

    [code bash]$ ddev drush pm-enable upgrade_status[/code]

    drush stands for "Drupal shell" and is a command-line utility for managing Drupal sites. The command pm:enable (where pm stands for "package manager") is used to enable a module in Drupal.

  3. After enabling the module, you can access its features by navigating to the Admin > Reports > Upgrade status page at /admin/reports/upgrade-status.
Upgrading PHP and MySQL using DDEV

The Upgrade Status module might recommend updating PHP and MySQL, per Drupal's system requirements.

To update the PHP version of DDEV, use the following command:

[code bash]$ ddev config –-php-version 8.3[/code]

To upgrade the MySQL version of DDEV and migrate your database content, use the following command:

[code bash]$ ddev debug migrate-database mariadb:10.11[/code]

After updating these settings, I restart DDEV and run my PHPUnit tests. Although these tests are integrated into my CI/CD workflow, I also run them locally on my development machine using DDEV for immediate feedback.

Drupal Check

Drupal Check is a command-line tool that scans Drupal projects for deprecated code and compatibility issues.

Output of Drupal Check command indicating no deprecated code was found.
  1. Installation:

    [code bash]$ ddev composer require –dev mglaman/drupal-check[/code]
  2. Run Drupal Check from the root of your Drupal installation:

    [code bash]$ ./vendor/bin/drupal-check –memory-limit 500M docroot/modules/custom[/code]

    I usually have to increase the memory limit, hence the --memory-limit 500M.

Categories: FLOSS Project Planets

Real Python: Listing All Files in a Directory With Python

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

Getting a list of all the files and folders in a directory is a natural first step for many file-related operations in Python. When looking into it, though, you may be surprised to find various ways to go about it.

When you’re faced with many ways of doing something, it can be a good indication that there’s no one-size-fits-all solution to your problems. Most likely, every solution will have its own advantages and trade-offs. This is the case when it comes to getting a list of the contents of a directory in Python.

In this video course, you’ll be focusing on the most general-purpose techniques in the pathlib module to list items in a directory, but you’ll also learn a bit about some alternative tools.

[ 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

Qt on macOS 15 Sequoia

Planet KDE - Tue, 2024-06-11 09:19

As is customary Apple announced their latest operating system versions at WWDC yesterday, including macOS 15 Sequoia, named after the national park in the Sierra Nevada mountain range.

Categories: FLOSS Project Planets

Plasma Browser Integration 1.9.1

Planet KDE - Tue, 2024-06-11 06:35

I’m pleased to announce the immediate availability of Plasma Browser Integration version 1.9.1 on the Firefox Web Store. This is the Firefox release of version 1.9 that was released way back in November 2023. We’re not sure how it got stuck in Add-on review and that we didn’t realize this but whatever the reason, it’s out now! This is a maintenance release shipping a couple of important changes as well as the usual translation updates. The extension is of course fully supported under Plasma 6!

Konqi surfing the world wide web

Plasma Browser Integration bridges the gap between your browser and the Plasma desktop. It lets you share links, find browser tabs and visited websites in KRunner, monitor download progress in the notification center, and control music and video playback anytime from within Plasma, or even from your phone using KDE Connect!

The next release will likely be version 2.0 ported to Manifest v3 since Chrome has continued their roll-out of enforcing the new manifest version soon. We’re still trying to find a way to keep a unified code base supporting both Firefox and Chrome. Chrome for example requires service workers for the extension now while Firefox continues to support only background pages. Recent Firefox and Chrome releases seem to support each other’s manifest properties, though, therefore we’re confident to make this work without introducing browser-specific git branches.

What’s new?

If you’re a Firefox user, check out the previous version announcement for more details on what’s new:

  • Reworked page injection code (e.g. fixes Spotify)
  • Port away from deprecated InstallTrigger
  • “Share…” menu now also on tab context menu
  • Tabs runner queries only “normal” windows (no apps)
  • History runner skips “blob” URLs
  • Check native messaging host before sending to it (fixes annoying console warnings on unsupported platforms, e.g. Windows)
  • Prettier console debug output
  • Performance and resource usage improvements

(also see the Changelog Page on our Community Wiki)

Categories: FLOSS Project Planets

Python Bytes: #387 Heralding in a new era of database queries

Planet Python - Tue, 2024-06-11 04:00
<strong>Topics covered in this episode:</strong><br> <ul> <li><a href="https://github.com/Dataherald/dataherald">Dataherald</a></li> <li><a href="https://www.pythonmorsels.com/cli-tools"><strong>Python's many command-line utilities</strong></a></li> <li><a href="https://github.com/wolfi-dev">Distroless Python</a></li> <li><a href="https://docs.python.org/3/library/functools.html"><strong>functools.cache</strong></a>, <a href="https://github.com/tkem/cachetools/"><strong>cachetools</strong></a><strong>, and</strong> <a href="https://github.com/awolverp/cachebox"><strong>cachebox</strong></a></li> <li><strong>Extras</strong></li> <li><strong>Joke</strong></li> </ul><a href='https://www.youtube.com/watch?v=ETZ3CvfbF_o' style='font-weight: bold;'data-umami-event="Livestream-Past" data-umami-event-episode="387">Watch on YouTube</a><br> <p><strong>About the show</strong></p> <p>Sponsored by ScoutAPM: <a href="https://pythonbytes.fm/scout"><strong>pythonbytes.fm/scout</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>Michael #1:</strong> <a href="https://github.com/Dataherald/dataherald">Dataherald</a></p> <ul> <li>Interact with your SQL database, Natural Language to SQL using LLMs.</li> <li>Allows you to set up an API from your database that can answer questions in plain English</li> <li>Uses include <ul> <li>Allow business users to get insights from the data warehouse without going through a data analyst</li> <li>Enable Q+A from your production DBs inside your SaaS application</li> <li>Create a ChatGPT plug-in from your proprietary data</li> </ul></li> </ul> <p><strong>Brian #2:</strong> <a href="https://www.pythonmorsels.com/cli-tools"><strong>Python's many command-line utilities</strong></a></p> <ul> <li>Trey Hunner</li> <li>Too many to list, but here’s some fun ones <ul> <li>json.tool - nicely format json data</li> <li>calendar - print the calendar <ul> <li>current by default, but you can pass in year and month</li> </ul></li> <li>gzip, ftplib, tarfile, and other unixy things <ul> <li>handy on Windows</li> </ul></li> <li>cProfile &amp; pstats</li> </ul></li> </ul> <p><strong>Michael #3:</strong> <a href="https://github.com/wolfi-dev">Distroless Python</a></p> <ul> <li>via Patrick Smyth</li> <li>What is <a href="https://www.chainguard.dev/unchained/minimal-container-images-towards-a-more-secure-future">distroless</a> anyway? <ul> <li>These are container images without package managers or shells included.</li> <li>Debugging these images presents some wrinkles (can't just exec into a shell inside the image), but they're a lot more secure.</li> </ul></li> <li>Chainguard, creates low/no CVE distroless images based on our FOSS distroless OS, <a href="https://github.com/wolfi-dev">Wolfi</a>.</li> <li>Some Python use-cases: <pre><code>docker run -it cgr.dev/chainguard/python:latest # The entrypoint is a Python REPL, since no b/a/sh is included docker run -it cgr.dev/chainguard/python:latest-dev # This is their dev version and has pip, bash, apk, etc. </code></pre></li> </ul> <p><strong>Brian #4:</strong> <a href="https://docs.python.org/3/library/functools.html"><strong>functools.cache</strong></a>, <a href="https://github.com/tkem/cachetools/"><strong>cachetools</strong></a><strong>, and</strong> <a href="https://github.com/awolverp/cachebox"><strong>cachebox</strong></a></p> <ul> <li><a href="https://docs.python.org/3/library/functools.html"><strong>functools</strong></a> cache and lru_cache - built in </li> <li><a href="https://github.com/tkem/cachetools/"><strong>cachetools</strong></a> - “This module provides various memoizing collections and decorators, including variants of the Python Standard Library's @lru_cache function decorator.”</li> <li><a href="https://github.com/awolverp/cachebox"><strong>cachebox</strong></a> - “The fastest caching Python library written in Rust”</li> </ul> <p><strong>Extras</strong> </p> <p>Brian:</p> <ul> <li><a href="https://pythoninsider.blogspot.com/2024/06/python-3124-released.html">Python 3.12.4 is out</a></li> <li><a href="https://devblogs.microsoft.com/python/python-in-visual-studio-code-june-2024-release/">VSCode has some pytest improvements</a></li> </ul> <p>Michael:</p> <ul> <li>Time for a <a href="https://www.macrumors.com/2024/06/06/alternatives-bartender-mac-menu-bar/">bartender alternative</a>, I’ve switched to <a href="https://icemenubar.app">Ice</a>.</li> <li><a href="https://www.rocket.chat">Rocket.chat</a> as an alternative to Slack</li> </ul> <p><strong>Joke:</strong> <a href="https://dev.to/alvaromontoro/css-cartoons-29bp">CSS Cartoons</a></p>
Categories: FLOSS Project Planets

Specbee: Why and How to migrate your DotNetNuke (DNN) site to Drupal 10

Planet Drupal - Tue, 2024-06-11 02:28
First things first, let's talk about why you're here. You've got a DNN website that's starting to show its age, and you're eyeing that sleek, modern Drupal CMS like it's the latest iPhone. From DotNetNuke to DNN Platform to DNN Evoq-sometimes simply called Evoq-this CMS has seen a series of transformations. Once an extremely popular CMS solution for organizations (mostly enterprise-level), DNN Evoq has faced the inevitable challenge of staying relevant over two decades. It's hard for any software to remain popular for over 20 years, especially with the changing world of web development and content management. Drupal, despite being older than DNN (okay, a year older), is thriving! Over time, it has only evolved into a more modern, user-friendly, and robust CMS. Moreover, Drupal excels at what it was designed to do: effective content management.  However, this is not intended to be a comparison blog of DNN vs. Drupal, even though we'll touch on a few reasons to consider the switch. This article aims to shed light on the DNN to Drupal migration process and what it entails. Additionally, we will share a case study of one of  Specbee's successful DNN to Drupal migrations.  Why you should migrate from DNN Evoq to Drupal To those who need to know some history of DNN, it was created by Shaun Walker and launched in late 2002. Written in C#, DNN is open source and relies on .NET framework and ASP.NET Web Forms. DNN soon became a platform known for its extensibility and seamless scalability which also brought in a lot of consultants and agencies to offer DNN development services.  However, over the years, DNN has experienced significant changes. The shift to the ASP.NET MVC model in 2009, coupled with some acquisitions, led to a decline in its user base and community support. DNN started relying on outdated technologies (since the .NET framework stopped development in 2019) and is unable to adapt to modern technologies and advancements. This evolution made it less appealing for businesses looking for a robust and active platform.  Now, why should you consider moving to Drupal, especially Drupal 10? Active and Vibrant Community: Drupal has one of the largest open-source communities. This means continuous improvements, a wealth of modules and themes, and a support system that's always buzzing. Continuous innovation: Drupal's constant innovation, driven by its passionate community, keeps it ahead with advanced features and enhancements. New strategic initiatives like Drupal Starshot, Project Browser, Experience Builder, Recipes, and Automatic Updates are poised to revolutionize the Drupal experience, making it more intuitive, efficient, and adaptable than ever before.  Cutting-Edge Features: Drupal 10 comes packed with modern features. It leverages Symfony 6 and Twig 3, ensuring your site is not just robust but also future-proof. The new admin theme, Claro, and the front-end theme, Olivero, offer a more intuitive and visually appealing experience. Effective editorial workflow system: With Drupal, end users can easily create and manage workflows tailored to their organization's needs and adjust them on-demand as necessary which is becoming more and more of a demand today.  In comparison, DNN's customization options and support for complex editorial workflows often require extensive coding knowledge.  Scalability and Flexibility: Like DNN, Drupal is known for its scalability. However, Drupal takes it a step further with its flexible content architecture, allowing you to create and manage various content types with ease. Security: Drupal is renowned for its strong security track record. The Drupal Security Team actively monitors and addresses vulnerabilities, giving you peace of mind. SEO and Performance: Drupal 10 includes out-of-the-box features that help improve SEO and site performance. From clean URLs to advanced caching mechanisms, it’s designed to help your site rank better and load faster. Accessibility: Drupal is committed to web accessibility standards, ensuring your site is usable by everyone. Extensive Ecosystem: With thousands of modules and themes, Drupal offers a vast ecosystem to extend your site's functionality without reinventing the wheel. By switching to Drupal 10, you're stepping into a future-ready, secure, and highly customizable environment. It's a move that can significantly improve your digital presence and provide a solid foundation for growth. Preparing for the migration Before you begin your DNN to Drupal migration, we recommend reading this article to get yourself prepped for a migration regardless of the version. It covers what information you should share with your Drupal development partner. This migration is also a perfect time to add those extra features or third-party integrations you've always wanted. Additionally, it's a great opportunity to revamp your website's design and user experience if needed. Consider your website’s current SEO positioning and how you would like to optimize it. Once you've considered everything, create a backup of your website to avoid any accidental changes or data loss. Next, make a checklist of your content structure, including content types, URLs, metadata, and media files. After this, let the Drupal migration experts take over. DNN to Drupal migration process Here’s a 4-step migration process that is (or should ideally be) followed by your Drupal migration partner: 1. Migration Audit Identify your DNN website features, functionality, modules, and content structure Conduct a detailed analysis to understand the digital landscape Catalog content views for easier replication Develop a strategic content migration strategy 2. Build Application Meticulously rebuild content structure and theme Replicate website features, add new features Conduct thorough regression testing Ensure a solid foundation, seamless functionality, and flawless performance 3. Migrate Content Content extraction from your database in a CSV, XML or JSON format Ensure a seamless transition from DNN to the latest Drupal version Import all contents and valuable assets, match them with the freshly created content types and fields Meticulously validate the entire data migration process for data accuracy and completeness. 4. Testing Thoroughly test migrated data for sanity and integrity. Subject replicated features to smoke testing and load testing. Guarantee seamless performance under various scenarios. Conduct meticulous security checks. Watch this video of our step-by-step Drupal migration process, irrespective of the CMS you are coming from. (To be embedded) https://youtu.be/D5JUud_a81k?feature=shared A DNN to Drupal migration case study The client (Stamats) approached us with a two-fold issue. They had three magazine sites on a legacy version of DNN that was riddled with malware and needed major work for the migration to Drupal. Among those sites was MeetingsToday.com.  Meetings Today was several years old, and had more than 20,000 articles in DNN. There was also extensive functionality related to their physical magazine, events, podcasts, webinars, and more. Their primary goal was to retain and grow their audience. They were experiencing issues with editing, and an uncertain future. The challenge came to Specbee to create a Drupal distribution that could serve the core publishing needs of several online magazine sites built in DNN.  So we built a custom Drupal distribution to save them time and money in the long term. This approach allowed any new feature developed for one site to be easily implemented across all sites while preserving their unique designs. It also gave them the ability to spin up a new publishing site without building a brand new website from scratch getting them to market 10x faster.  Specbee delivered a solution that allowed for Drupal's powerful editorial controls and publishing tools for multiple sites while allowing those sites to retain their unique functionality. References https://devessence.com/blog/!/22/what-is-your-dnn-migration-strategy/https://www.dnnsoftware.com/community-blog/cid/134716/asp-net-mvc-and-d…https://www.linkedin.com/in/shaunbrucewalker/ Final thoughts We understand that migrations are never an easy decision for any business. While entrusting a reliable technology partner can alleviate some concerns, it's crucial to dedicate your attention and time before handing over the reins. By choosing the right Drupal partner (such as Specbee, a certified Drupal migration partner), you can streamline the migration process, making it as seamless and painless as possible. Still wondering if you should migrate your DNN website to Drupal? Give us a call and we’ll help you make the right decision.
Categories: FLOSS Project Planets

Konsole Layout Automation (part 1)

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

Do you find yourself opening up the same tabs in your terminal and running the same commands every day? Have you wanted to make this easier, say, by clicking a desktop icon or running a short command?

Recently, I saw a question along these lines in the KDE support room on Matrix. Someone wanted to have Konsole automatically open some tabs and run specific commands when it's started. Since I've done this kind of thing, for personal and professional environments, I thought I'd share. You too can avoid doing the same manual terminal setup day after day, and just get to what you're working on.

Here in Part 1, I'll outline how to open tabs with different profiles and run commands in them. Next week, in Part 2, I'll share how to set up layouts (a.k.a. split panes) and run commands in those. You can combine these techniques to make your setup truly flexible. Using aliases, functions and scripts, you can bring up a complex layout with one command or button click.

Inspiration

I have a motto: If I have to do the exact same thing more than twice (on a computer), I should probably script / automate it. It's an up front time investment that saves me a lot of manual tedium later.

My inspiration for scripting terminal layouts came from iTerm2's customization abilities. After a few years of using it on a work-provided MacBook Pro, I was spoiled. It's truly nice how easy it is to create profiles and save splits in the GUI. You can then tweak their configurations using any text editor. When I searched for how to do this with Linux terminals, I found quite a few people were also looking for an "iTerm2 equivalent for Linux".

Goal: Launch a Konsole window with tabs which run commands

💡 Note For more detailed instructions on using Konsole, please see the output of konsole --help and take a look at the Konsole Handbook

We'll start with that request from Matrix: having Konsole create tabs and run commands in them when it starts. Here are the steps I used to accomplish this. Feel free to use this as inspiration and adapt for your own needs.

Use case: Quickly set up a working environment that I use daily to save time every day. There will be a couple of tabs connected to different remote hosts, one that changes to a notes directory, and one running a system monitor.

Here's an overview of the steps:

  • Create a Konsole profile which will run a command and optionally use another color theme
  • Create a tab layout file to launch Konsole with which will open a tab with that profile
  • Create a profile with a different command for an additional tab, and then identify commands for a couple of the other tabs
  • Update the tab layout file to launch Konsole with all the desired tabs

Now let's get into the details.

Create the first Konsole profile

Making custom profiles for different hosts are where my adventures in customizing Konsole began.

Use case: I would like to automatically connect to my hosted VPS in a tab with a specific color theme.

Reasoning: Running commands using a theme is quicker and easier than typing by hand (especially as they get more complex). With a custom color scheme, I can see at a glance which tab has my server session vs. any other system. This helps me avoid typing commands for my server into another system and vice-versa.

💡 Note Profiles are stored as plain text files in /.local/share/konsole/. Profile names are cAsE senSiTive. Since profile files are plain text, you can create, edit, and delete them with scripts. That is beyond the scope of this post.

The first step is to set up a custom profile with a custom color theme, a custom tab title format, and a command.

I'm using "eternal terminal" (et) for its ability to reconnect, rather than ssh to connect to the VPS. I also have an entry for the host in .ssh/config

In Settings -> Manage Profiles - New I created a profile named VPS. The following are the options I changed. Others were left as-is ("hostname" is a stand-in for the actual VPS hostname):

Name: VPS Command: et VPS Tab title format: %n hostname Tab Color: I chose a color Appearance - Color scheme & font: I chose a different color scheme

Now that I have a custom profile, I can use it with a new tab in Konsole. When I go to File -> New Tab and click "VPS", the tab will open with the new profile, and the command will run to connect to the server.

You can use Konsole's command line options in the following way to have it launch with a tab using a profile.

konsole --new-tab --profile VPS

This command can be used with an alias, function, script, Windows batch file, desktop shortcut or whatever you prefer.

There's another way to launch Konsole which is better for opening multiple tabs. It uses a "tabs configuration file".

Create a tabs configuration file

💡 Note I have found this to be unreliable if any tab uses ssh or et There's an open bug report for this. Until this is resolved, you may have better luck with a shell script that opens multiple tabs, I'll add information below.

Now I'll create a tabs configuration file with the VPS profile in it.

Each line in this file describes a tab for Konsole to open. The format is detailed in the command line options documentation. I keep these in ~/konsole_layouts/, keep yours in whatever directory works for you. I'll save this file as "vps-tabs".

Each line must have at least a profile or a command field. It can have both, and there are other options as well.
Do not specify a command on a line for a tab if you also use a profile which itself has a command. This may lead to unexpected behavior.

If you only need to run a command in a tab, you can just use the command field. You combine a command with a profile (that has no command) if you want to customize the tab further.

This is what will go in the file for now for my first tab:

title: VPS ;; profile: VPS

The command below will start Konsole using this file. (Change file path to point to the file on your system). Opening Konsole in this way can also be done with an alias, script etc.

konsole --hold --tabs-from-file ~/konsole_layouts/vps-tabs

Notice that I'm using --hold which tells Konsole to keep tabs open even after their command has exited. This will help debugging any problems that might arise (unless the window crashes entirely or fails to load). Once things are set up and running smoothly, you don't need to use --hold, if you prefer.

Create additional profiles

Use case: At the start of the day, I want to automatically open tabs which connect to both servers I need to work with. I want an additional tab open to my notes directory and another one running a system monitor.

Time to add an additional profile to Konsole:

  • Server2 - this will use ssh to connect to a second server and use a profile for a different color theme

I won't create profiles for the system monitor tab or the Notes tab. I'll run those commands directly from the tab configuration file.

Update the tabs file with additional tab definitions

At this point, I'll add lines to the tabs configuration file I created.

  • A tab for the Server2 profile.
  • A tab which changes to a notes directory, and uses the Sand profile with colors I prefer for them.
  • A tab for the system monitor which runs the btm command and uses another profile with yet another color scheme.

The file now looks like this:

title: VPS ;; profile: VPS title: SysAdminNotes ;; workdir: ~/Nextcloud/Notes/SysAdmin ;; profile: Sand title: Server2 ;; profile: Server2 title: NavyBlue ;; command: btm ;; profile: NavyBlue

And now, when I run konsole --hold --tabs-from-file ~/konsole_layouts/vps-tabs, Konsole launches with all the tabs I need.

Bonus: Run commands after connecting to a remote host

It's possible with both ssh and et to run commands on a remote host after connection. For instance, I could update the command in my VPS profile like so:

Name: VPS Command: et VPS -c 'sudo apt update && apt list --upgradable; exec /bin/zsh' Tab title format: %n hostname Tab Color: I chose a color Appearance - Color scheme & font: I chose a different color scheme

The command not only connects to my VPS, it also displays a list of any available updates, and stays connected to the host. Note the exec /bin/zsh at the end. This will keep an interactive terminal open after other commands are run.

With ssh, to run a command on a remote host while staying connected, the command is slightly different:

ssh -t VPS 'sudo apt update && apt list --upgradable; zsh' But what if I need to connect to a jumphost before the remote host and I still want to run a command after I connect?

This can be done with either SSH or Eternal Terminal. For SSH, the process is relatively easy, and plenty of sites online provide instructions. Eternal Terminal, on the other hand, is a bit more tricky.

It took some research and experimentation to get this working with Eternal Terminal, so here it is ("jumphost" is a placeholder for the actual hostname of the jumphost).

Command=et jumphost -c "ssh -t remotehost 'cd /some/directory && . ../some_script && cd ../another-directory; exec /bin/zsh'" Alternative to using a tabs file: a shell script or function

If you have difficulties with using a tabs configuration file, you can use a shell script (or function) that takes advantage of the command line options Konsole has. For instance, using the -e flag we can have tabs run commands:

#!/usr/bin/env bash konsole --new-tab -e echo This is tab 1 & konsole --new-tab -e echo This is tab 2 & konsole --new-tab -e echo This is tab 3 & konsole --new-tab -e echo This is tab 4 &

You can combine commands with profiles as well:

#!/usr/bin/env bash konsole --new-tab --profile VPS & konsole --new-tab --profile Sand --workdir: ~/Nextcloud/Notes/SysAdmin & konsole --new-tab --profile Server2 & konsole --new-tab --profile NavyBlue -e btm &

Explore the Konsole docs and experiment!

Known issues
  • Launching Konsole with --tabs-from-file will open an extra tab in addition to the ones from the configuration file. This has an open bug report.
  • Sometimes, with --tabs-from-file, the new Konsole window immediately disappears. This may be related to ssh/et being in a command. I filed a bug report for that.
  • If using a tabs configuration file, or a script: only use Eternal Terminal with one tab. Trying to use it with more than one tab will result in et core dumping in one of them.
Categories: FLOSS Project Planets

Pages