FLOSS Project Planets

OpenSense Labs: Fully decoupled Drupal: Ultimate guide

Planet Drupal - Tue, 2021-11-30 06:41
Fully decoupled Drupal: Ultimate guide Maitreayee Bora Tue, 11/30/2021 - 17:11

Today organizations are seen focusing on creating very interactive and omnichannel user-experiences via their websites that consequently let them to depend on Drupal’s decoupled architecture. Such a facility of Drupal’s decoupled architecture offers the organizations the flexibility to innovate, provide countless options on what they want to create, and enables them the capacity to build multiple-websites and applications. Additionally, it also allows the developer to work with Drupal in three different modes such as fully decoupled Drupal approach, progressively decoupled Drupal (hybrid) approach and traditional Drupal. So, today we will discuss the fully decoupled Drupal approach and make you familiar with its features and functionalities. 

Understanding Fully Decoupled Drupal and its categories
  Source: Dries Buytaert's blog


There are commonly three approaches to go about Drupal architecture such as traditional (or coupled), progressively decoupled, and fully decoupled. You can read more on this: How to decouple Drupal and the different options of doing it. In accordance with the need of various preferences and requirements, all the three approaches are important in their own ways. Let us now briefly look at the first two approaches and focus more on the third approach i.e., fully decoupled Drupal as it is the main topic that we are diving into today. 

When it comes to traditional Drupal, all of the Drupal’s general responsibilities remain intact, since Drupal can be considered as a monolithic system and moreover efficiently maintains full control over the presentation and data layers. Traditional Drupal proves to be a great choice for editors who require complete control over the visual elements on the page, with access to features like in-place editing and layout management.

At times JavaScript is needed to deliver a highly interactive end-user experience. In cases like this, a decoupled approach becomes a necessity. So, a JavaScript framework is layered on top of the existing Drupal front end in progressively decoupled Drupal. This JavaScript is responsible for rendering a single block or component on a page, or it might even render everything within the page body. This approach pattern lies on a spectrum i.e., while the less of the page is dedicated to JavaScript, the editors are even more able to control the page with the help of Drupal's administrative capabilities. 

Fully decoupled Drupal involves a full separation of concerns between the presentation layer and all other aspects of the CMS. Within this approach, the CMS happens to become a data provider, and a JavaScript application, or a static site generator, communicating with Drupal through web service APIs. Read more on CMS and static site generators’ use cases here. In spite of the unavailability of key functionality such as in-place editing and layout management, fully decoupled Drupal can be captivating for developers who look for greater control across the front end and who are already well experienced with building applications in frameworks such as Angular, React, Gatsby, etc. 

Learn more on decoupled Drupal here:

Fully decoupled Drupal can be executed in two different ways, namely Fully decoupled app and Fully decoupled static site. We will now closely take a look at the ways below. 

Fully decoupled app

Fully decoupled applications are written in JavaScript and use frameworks such as Angular, React, Vue.js during the decoupling process. 

Source: W3Techs

                             

React Source: W3Techs


React is a JavaScript library which was started in 2013 and is used to create interactive user interfaces (UIs). It can be considered as one of the most powerful and highly used front-end technologies, maintained and supported by the tech giant Facebook. The React has the ability to split the codes into components to further allow developers with code reusability and fast debugging. Due to its declarative style and lack of assumptions about technology stack, it has earned immense popularity. Within the last few years, a large ecosystem can be seen growing around React. It also includes high quality libraries, conferences, and growing demand for developers with React skills.

Some of the leading websites and web applications which use React as front-end technology include Facebook, BBC, Airbnb, Reddit and New York Times, etc. 

React and Drupal

When it comes to React and Drupal, no matter if you are improving some of the elements on a current page, or even creating a fully decoupled single-page app (SPA), React and Drupal tend to work together in a great way. Also as part of an existing Drupal theme, React is used to provide a better user experience. 

More on the combination of Drupal and react here.

Angular Source: W3Techs


AngularJS is a lightweight and concise framework which is extremely extensible and allows you to try some interesting things with your website. It extends HTML to define user interfaces, therefore allowing you to build interactive web applications which are highly functional and tough to break. Reusable components can also be created with AngularJS, and due to its client-side nature, all kinds of cyber-attacks can be well prevented. It implements the MVC (Model-View-Controller) framework allowing faster development process, multiple views, asynchronous technique, SEO friendly development and much more useful features. AngularJS has an exciting functionality like a two-way data binding that allows user actions to immediately trigger application objects and vice-versa, also providing an extremely interactive framework. 

This framework is well supported by a large community and maintained by the tech giant Google. Gmail, Paypal and The Guardian use Angular as the front end technology.

Angular and Drupal

  • The strong combination of Drupal with Angular will allow you to move display logic to the client-side and streamline your backend, hence resulting in a speedy website.
  • Due to simplicity and clarity in the code structure, HTML happens to always stay on demand, and Angular can be seen making use of HTML to define user interfaces, therefore enabling organizations to build interactive web applications which are highly functional. 

More on the combination of Drupal and Angular here.

Vue Source: W3Techs


Vue.js is a JavaScript framework which is quite popular for developing interactive applications. This framework provides data-reactive components with a simple and flexible API. Additionally, it can be used as a library to add interactive elements/blocks to the existing sites. You can deliver a significant boost to user experiences with the help of this exceptional framework. 

Vue and Drupal

  • The combination of Vue and Drupal enables developers to easily request and store Drupal content as data objects through the official Vue-Resource plugin.
  • While combining with Vue, Drupal is able to show its magic at the back-end while the captivating features of the Vue handles the client-side. Also, Vue’s component system is one of the strongest features that enables large-scale application building, including small and self-contained reusable components.

More on the combination of Drupal and Vue here.

Fully decoupled static site

Fully decoupled static sites help in enhancing performance, security, and reduce the complexity for developers. A static site generator such as Gatsby or Metalsmith helps in retrieving content from Drupal, generating a static website, and deploying that static site to a CDN, generally via a particular cloud provider like Netlify.

Gatsby Source: W3Techs


Gatsby is an open-source and modern website framework which improves the site's performance by leveraging the latest web technologies like React and GraphQL. It is used in building blazing-fast applications and websites. This framework uses powerful pre-configuration in order to build a site which only uses static files for incredibly fast page loads, service workers, code splitting, etc.

Gatsby and Drupal

  • Using Drupal with Gatsby can be a great way in building an enterprise-quality CMS for free, paired with great modern development experience. It provides all the benefits of the JAMstack, such as performance, scalability, and security.
  • Gatsby can also do fireworks by pre-generating all the pages of the site, unlike dynamic sites which render pages on-demand, thus decreasing the need for live database querying. Consequently, performance is improved and overheads happen to decrease leading to lesser maintenance cost.

More on the combination of Drupal and Gatsby here.

Metalsmith

Metalsmith is a simple, pluggable static site generator that supports a broad array of templates and data format options. It provides a simple plug-in architecture and very easily can get started. Also, it uses a modular structure and its lightweight nature and lesser dependencies tend to make it an excellent solution. 

Metalsmith and Drupal

  • The combination of both Metalsmith and Drupal can be very beneficial due to Drupal’s magnificent backend which can be utilized to feed data to all types of clients and Metalsmith’s extraordinary capabilities as a static site generator.
  • Along with Drupal’s great expertise in content governance, Metalsmith proves to be an excellent solution for building static sites.

More on the combination of Drupal and Metalsmith here.

Conclusion

I would like to conclude by saying that with fully decoupled Drupal, you can deliver fast and flexible content with no particular delivery environment. You can even have complete control upon how and where your content appears. Isn’t that great? Well, I am quite sure that this article helped you in familiarizing with the very significant fully decoupled Drupal approach. Hope, now you can take the right decision for your organization in terms of decoupling Drupal. 
 

Articles Off
Categories: FLOSS Project Planets

Make Your First KDE Patch: How To Improve System Settings!

Planet KDE - Tue, 2021-11-30 06:25
💸💸 Help me contribute to KDE and do these videos: 💸💸 Patreon: https://www.patreon.com/niccolove Youtube: https://www.youtube.com/channel/UCONH73CdRXUjlh3-DdLGCPw/join Paypal: https://paypal.me/niccolove Stay in the loop: https://t.me/veggeroblog My website is https://niccolo.venerandi.com and if you want to contact me, my telegram handle is [at] veggero.
Categories: FLOSS Project Planets

Steinar H. Gunderson: Commitcoin

Planet Debian - Tue, 2021-11-30 06:00

How do you get a git commit with an interesting commit ID (or “SHA”)? Of course, interesting is in the eye of the beholder, but let's define it as having many repeated hex nibbles, e.g. “000” in the commit would be somewhat interesting and “8888888888888888888888888” would be very interesting. This is pretty similar to the dreaded cryptocoin mining; we have no simple way of forcing a given SHA-1 hash unless someone manages a complete second-preimage break, so we must brute-force. (And hopefully without boiling the planet in the process; we'd have to settle for a bit shorter runs than in the example above.)

Git commit IDs are SHA-1 checksums of what they contain; the tree object (“what does the commit contain”), the parents, the commit message and some dates. Of those, let's use the author date as the nonce (I chose to keep the committer date truthful, so as to not be accused of forging history too much). We can set up a shell script to commit with --amend, sweeping GIT_AUTHOR_DATE over the course of a day or so and having EDITOR=true in order not to have to close the editor all the time.

It turns out this is pretty slow (unsurprisingly!). So we discover that actually launching the “editor” takes a long time, and --no-edit is much faster. We can also move to a tmpfs in order not to be block on fsync and block allocation (eatmydata would also work, but doesn't fix the filesystem overhead). At this point, we're at roughly 50 commits/sec or so. So we can sweep through the entire day of author dates, and if nothing interesting comes up, we can just try again (as we also get a new committer date, we've essentially reset our random generator).

But we can do much better than this. A commit in git is many different things; load the index, see if we need to add something, then actually make the commit object and finally update HEAD and whatever branch we might be on. Of those, we only really need to make the commit object and see what it hash ended up with! So we change our script to use git commit-tree instead, and whoa, we're up to 300 commits/sec.

Now we're bottlenecked at the time it takes to fork and launch the git binary—so we can hack the git sources and move the date sweep into builtin/commit-tree.c. This is radically faster; about 100 times as fast! Now what takes time is compressing and creating the commit object.

But OK, my 5950X has 16 cores, right, so we can just split the range in 16 and have different cores test different ranges? Wrong! Because now, the entire sweep takes less than a second, so we no longer get the different committer date and the cores are testing the same SHA over and over. (In effect, our nonce space is too small.) We cheat a bit and add extra whitespace to the end of the commit message to get a larger parameter space; the core ID determines how many spaces.

At this point, you can make commits so fast that the problem essentially becomes that you run out of space, and need to run git prune every few seconds. So the obvious next step would be to not compress and write out the commits at all… and then, I suppose, optimize the routines to not call any git stuff anymore, and then have GPUs do the testing, and of course, finally we'll have Gitcoin ASICs, and every hope of reaching the 1.5 degree goal is lost…

Did I say Gitcoin? No, unfortunately that name was already taken. So I'll call it Commitcoin. And I'm satisifed with a commit containing dddddddd, even though it's of course possible to do much better—hardness is only approximately 2^26 commits to get a commit as interesting as that.

(Cryptobros, please stay out of my inbox. I'm not interested.)

Categories: FLOSS Project Planets

Russell Coker: Your Device Has Been Improved

Planet Debian - Tue, 2021-11-30 04:41

I’ve just started a Samsung tablet downloading a 770MB update, the description says:

  • Overall stability of your device has been improved
  • The security of your device has been improved

Technically I have no doubt that both those claims are true and accurate. But according to common understanding of the English language I think they are both misleading.

By “stability improved” they mean “fixed some bugs that made it unstable” and no technical person would imagine that after a certain number of such updates the number of bugs will ever reach zero and the tablet will be perfectly reliable. In fact if you should consider yourself lucky if they fix more bugs than they add. It’s not THAT uncommon for phones and tablets to be bricked (rendered unusable by software) by an update. In the past I got a Huawei Mate9 as a warranty replacement for a Nexus 6P because an update caused so many Nexus 6P phones to fail that they couldn’t be replaced with an identical phone [1].

By “security improved” they usually mean “fixed some security flaws that were recently discovered to make it almost as secure as it was designed to be”. Note that I deliberately say “almost as secure” because it’s sometimes impossible to fix a security flaw without making significant changes to interfaces which requires more work than desired for an old product and also gives a higher probability of things going wrong. So it’s sometimes better to aim for almost as secure or alternatively just as secure but with some features disabled.

Device manufacturers (and most companies in the Android space make the same claims while having the exact same bugs to deal with, Samsung is no different from the others in this regards) are not making devices more secure or more reliable than when they were initially released. They are aiming to make them almost as secure and reliable as when they were released. They don’t have much incentive to try too hard in this regard, Samsung won’t suffer if I decide my old tablet isn’t reliable enough and buy a new one, which will almost certainly be from Samsung because they make nice tablets.

As a thought experiment, consider if car repairers did the same thing. “Getting us to service your car will improve fuel efficiency”, great how much more efficient will it be than when I purchased it?

As another thought experiment, consider if car companies stopped providing parts for car repair a few years after releasing a new model. This is effectively what phone and tablet manufacturers have been doing all along, software updates for “stability and security” are to devices what changing oil etc is for cars.

Related posts:

  1. Long-term Device Use It seems to me that Android phones have recently passed...
  2. Android Device Service Life In recent years Android devices have been the most expensive...
  3. Xen and eth device renaming Recently I rebooted one of my Debian Xen servers and...
Categories: FLOSS Project Planets

Talk Python to Me: #343: Do Excel things, get notebook Python code with Mito

Planet Python - Tue, 2021-11-30 03:00
Here's a question: What's the most common way to explore data? Would you say pandas and matplotlib? Maybe you went more general and said Jupyter notebooks. How about Excel, or Google Sheets, or Numbers, or some other spreadsheet app? Yeah, my bet is on Excel. And while it has many drawbacks, it makes exploring tabular data very accessible to many people, most of whom aren't even developers or data scientists. <br/> <br/> On this episode, we're talking about a tool called Mito. This is an add-in for Jupyter notebooks that injects an Excel-like interface into the notebook. You pass it data via a pandas dataframe (or some other source) and then you can explore it as if you're using Excel. The cool thing is though, just below that, it's writing the pandas code you'd need to do to actually accomplish that outcome in code. <br/> <br/> I think this will make pandas and Python data exploration way more accessible to many more people. So if you've been intimidated by pandas, or know someone who has, this could be what you've been looking for.<br/> <br/> <strong>Links from the show</strong><br/> <br/> <div><b>Mito</b>: <a href="https://www.trymito.io/" target="_blank" rel="noopener">trymito.io</a><br/> <b>Mito summary stats</b>: <a href="https://docs.trymito.io/how-to/summary-statistics" target="_blank" rel="noopener">trymito.io</a><br/> <b>pandas-profiling package</b>: <a href="https://github.com/pandas-profiling/pandas-profiling" target="_blank" rel="noopener">github.com</a><br/> <b>Lux API</b>: <a href="https://pypi.org/project/lux-api/" target="_blank" rel="noopener">pypi.org</a><br/> <b>Hex notebooks</b>: <a href="https://medium.com/short-bits/hex-a-new-collaborative-interactive-notebook-for-sql-and-python-154b8e4170e1" target="_blank" rel="noopener">medium.com</a><br/> <b>Deepnote</b>: <a href="https://deepnote.com/" target="_blank" rel="noopener">deepnote.com</a><br/> <b>Papermill</b>: <a href="https://papermill.readthedocs.io/en/latest/index.html" target="_blank" rel="noopener">papermill.readthedocs.io</a><br/> <b>JupterLite</b>: <a href="https://blog.jupyter.org/jupyterlite-jupyter-%EF%B8%8F-webassembly-%EF%B8%8F-python-f6e2e41ab3fa" target="_blank" rel="noopener">jupyter.org</a><br/> <b>Jupyter Desktop App</b>: <a href="https://github.com/jupyterlab/jupyterlab-desktop" target="_blank" rel="noopener">github.com</a><br/> <b>Jut</b>: <a href="https://github.com/kracekumar/jut" target="_blank" rel="noopener">github.com</a><br/> <b>Jupyter project</b>: <a href="https://jupyter.org/" target="_blank" rel="noopener">jupyter.org</a><br/> <b>Watch this episode on YouTube</b>: <a href="https://www.youtube.com/watch?v=XAGmSPZsYLU" target="_blank" rel="noopener">youtube.com</a><br/> <b>Episode transcripts</b>: <a href="https://talkpython.fm/episodes/transcript/343/do-excel-things-get-notebook-python-code-with-mito" target="_blank" rel="noopener">talkpython.fm</a><br/> <br/> <b>--- Stay in touch with us ---</b><br/> <b>Subscribe on YouTube</b>: <a href="https://talkpython.fm/youtube" target="_blank" rel="noopener">youtube.com</a><br/> <b>Follow Talk Python on Twitter</b>: <a href="https://twitter.com/talkpython" target="_blank" rel="noopener">@talkpython</a><br/> <b>Follow Michael on Twitter</b>: <a href="https://twitter.com/mkennedy" target="_blank" rel="noopener">@mkennedy</a><br/></div><br/> <strong>Sponsors</strong><br/> <a href='https://shortcut.com/talkpython'>Shortcut</a><br> <a href='https://talkpython.fm/linode'>Linode</a><br> <a href='https://talkpython.fm/assemblyai'>AssemblyAI</a><br> <a href='https://talkpython.fm/training'>Talk Python Training</a>
Categories: FLOSS Project Planets

Test and Code: 172: Designing Better Software with a Prototype Mindset

Planet Python - Tue, 2021-11-30 03:00

A prototype is a a preliminary model of something, from which other forms are developed or copied.
In software, we think of prototypes as early things, or a proof of concept.
We don't often think of prototyping during daily software development or maintenance. I think we should.
This episode is about growing better designed software with the help of a prototype mindset.

Sponsored By:

Support Test & Code in Python

Links:

<p>A prototype is a a preliminary model of something, from which other forms are developed or copied.<br> In software, we think of prototypes as early things, or a proof of concept.<br> We don&#39;t often think of prototyping during daily software development or maintenance. I think we should.<br> This episode is about growing better designed software with the help of a prototype mindset.</p><p>Sponsored By:</p><ul><li><a href="https://testandcode.com/pycharm" rel="nofollow">PyCharm Professional</a>: <a href="https://testandcode.com/pycharm" rel="nofollow">Try PyCharm Pro for 4 months and learn how PyCharm will save you time.</a> Promo Code: TESTANDCODE22</li></ul><p><a href="https://www.patreon.com/testpodcast" rel="payment">Support Test & Code in Python</a></p><p>Links:</p><ul><li><a href="https://snarky.ca/programming-language-selection-is-a-form-of-premature-optimization/" title="Selecting a programming language can be a form of premature optimization" rel="nofollow">Selecting a programming language can be a form of premature optimization</a> &mdash; Brett Cannon's blog post</li></ul>
Categories: FLOSS Project Planets

Specbee: Extending Drupal 9 CKEditor - 7 Brilliant Modules You Didn't Know Existed

Planet Drupal - Tue, 2021-11-30 01:35
Extending Drupal 9 CKEditor - 7 Brilliant Modules You Didn't Know Existed Ravikant 30 Nov, 2021

A content editor is an extremely crucial part of a successful CMS. With a powerhouse of an editor like CKEditor as its default rich text editing tool, Drupal has upped its content management game considerably. The CKEditor team, along with members of Drupal community, have together built and customized several new features for Drupal 8/9 like the CKEditor widget system and the Advanced Content Filer (ACF). Along with its default features, you can also extend CKEditors capabilities with the help of some contributed modules and plug-ins. Read on to find out more about these interesting add-ons that extends CKEditor's features and usability.

The Drupal 9 CKEditor

As mentioned previously, CKEditor 4.5 is the default WYSIWYG rich editor in Drupal 8/9. CKEditor is a text editor which helps content editors to write and edit content directly in the web pages. CKEditor is an open source project also available under commercial licenses. This HTML text editor is much faster after being rebranded and rewritten. CKEditor has been upgraded with many powerful new features. As part of the Drupal 10 readiness initiative, Drupal contributors are working toward implementing the latest and most modern version - CKEditor 5 - in Drupal 10.

Extending CKEditor with these fantastic Drupal 9 modules
         1. CKEditor Read More 

Aren't there times when you don't want to display all your text at one go and instead give the user a choice to read the rest if they find it interesting? That's when you would want to use the Read More feature, thus inviting your users to read on while enabling a compact page layout. Drupal 9 provides a simple and easy to use contributed module called the CKEditor Read More to enable the Read More / Show Less functionality.

Implementing the module:
Once you install this module, you will need to configure a few settings:

  1. Edit preferred Text format and enable “Limit allowed HTML tags”.
  2. Add in “Allowed HTML tags”. Disable the “Limit allowed HTML tags” and hit save.
  3. Now drag and drop the “Read more” icon from Available buttons to Active toolbar (as shown in the image above) and hit save.
  4. After clearing the cache you will find the “Read More” icon in the text editor when you choose the “Preferred Text format”.

How to use it:
Within the content area, click on the “Text format” icon. Now you will get a rectangular box. Add the rest of the content that you want to show after your user clicks on Read More.
    
Can I modify the Read More text?
Absolutely! Simply click on the “Read more button” tab in “CKEditor plugin settings” and change the text to anything you desire.

2. CKEditor Color Button 

By default, CKEditor does not offer you a choice to change the text color from the editor. If you want to change the color of a selected text or highlight the text with different colors, the Drupal 9 CKEditor Color Button module should be on your list. This module requires the Panel button module to be installed as well. And both these  modules require the libraries, Color Button Library and Panel Button library to be installed. After installing the modules and adding libraries in the libraries folder of the theme, we can move the colors button from Available buttons to Active toolbar in the preferred text format. 

Can I add a custom color?
Yes! If you don't want to use any of the default colors already available, you can set a custom color too. You can do this in the “Text editors format” section where you activated these color options from. Find the “CKEditor Color button” in the “CKEditor plugins setting” section of “Text editors format” and add color in the “Text colors” textarea with comma separated and without # sign.

3. CKEditor Youtube 

The Drupal 9 CKEditor Youtube module helps you add Youtube videos into your content without a long embed code. After installing and moving the Youtube icon form from Available buttons to Active toolbar, you can find Youtube icons in the text editor in preferred text format. This module depends on the library.

 

This module provides many options as shown in the above screenshot. You can “Paste embed code” or paste a Youtube URL by specifying the width and height. Also you have handy options like “Autoplay”, “Start at (specific time)” and “Show player controls”.

4. CKEditor Templates & CKEditor Templates User Interface

The CKEditor Templates and CKEditor Templates User Interface modules are very helpful if you are using the same content structure for your pages or posts. These modules depend on libraries. The libraries can be downloaded and installed as instructed in the module pages. After installing these libraries, you can move the template icon from Available buttons to Active toolbar as shown in the below image.


The CKEditor Templates module provides a dialog popup with predefined templates. When you click on the template icon (as shown in the above screenshot) you will see that a popup will open and you can choose any predefined template. This template will be inserted with “text format and styles” which are added within templates. 

The CKEditor templates user interface model helps to create templates that show in the dialog with the help of the CKEditor Templates module. After enabling the module, you will find an option in the Config > Content Authoring > CKEditor Templates section.

When you click on CKEditor Templates from the configuration, you will be redirected to the CKEditor configuration templates page. Now you can add or edit templates.

5. CKEditor CodeSnippet

Using the CKEditor CodeSnippet module, you can add your "code content" within the content so it is highlighted and well formatted. This module uses the highlight-js library and all available styles for it. If you will install this module using composer then the library will install automatically. After installing this module, you can move the “code snippet” icon from the Available button to Active toolbar. 

Now you will find the Code Snippet tab in the CKEditor plugin settings of text format. Here you can check/uncheck supported programming languages. 

How to use it?

Once you install the module, you can insert the CodeSnippet feature in your content from CKEditor. When you click on the Code Snippet icon, you will get a popup. Here, you can paste your code and select the code language.

6. CKEditor Wordcount

Sometimes, you might want to set a limit to the number or words or characters inputted into your CKEditor. Especially with multiple hands working on the same content. You might also want to see the number or characters and words in your CKEditor at the footer of the editor (just like you would in MS Word). That's when you would install the CKEditor Wordcount module. After installing the module and library, you can find “word count and character count” in CKEditor plugin settings of text format. Here, you can check/uncheck features according to your requirement. You will also find a counter in CKEditor at the bottom-right part of it.

 

  7. CKEditor Tweetable Text

Using the CKEditor Tweetable Text module, you can give an option to your users to tweet a particular text by clicking on a word or syntax. You can get a tweet icon after installing the module and library as instructed in the module page. Now you can move the tweetable text icon from the Available button to the Active toolbar. You will then find a tweet icon in the text editor. When you click on this icon, a popup will open up. Here, you can add a Display Text (for which word(s) you want to add the tweet icon) and Tweetable Text (the text that will appear in the Tweet).  When a user clicks on Display Text then it will redirect to Twitter and Tweetable Text will be displayed.

CKEditor is one of the most simplest and powerful WYSIWYG editor in the market to get your work done. There are many more plugins and modules that can help you extend and further customize your editor but we have listed some of the most popular and useful ones here. Need more customizations and expert support to elevate your Drupal editorial experience? Contact our Drupal experts today.

Drupal 9 Drupal 9 Module Drupal Development Drupal Module Drupal Planet Drupal Tutorial Drupal Subscribe to our Newsletter Now Subscribe Leave this field blank

Leave us a Comment

  Recent Blogs Image Extending Drupal 9 CKEditor - 7 Brilliant Modules You Didn't Know Existed Image Why Page Speed Matters and How to Get Your Website to Load Faster! Image Drupal 9 Custom Module Development – A Beginners Guide Want to extract the maximum out of Drupal? TALK TO US Featured Success Stories

A Drupal powered multi-site, multi-lingual platform to enable a unified user experience at SEMI.

link

Discover how our technology enabled UX Magazine to cater to their massive audience and launch outreach programs.

link

Discover how a Drupal powered internal portal encouraged the sellers at Flipkart to obtain the latest insights with respect to a particular domain.

link

Categories: FLOSS Project Planets

Who is the target user?

Planet KDE - Mon, 2021-11-29 23:45

As a teenager, I played a lot of Vampire the Masquerade (VtM)–a tabletop role-playing game. One of the skills in which your character could become experienced was Computers, with ability measured from 0 to 5 dots:

This little table has stayed with me over time. As simple and crude as it is, I think it provides a reasonable measurement scale that can be used to guide software development: you need to decide how many dots in Computers a user must have before they can use your software, which helps you organize the user interface and prioritize features.

My sense is that currently most Linux-based software targets people with three dots in Computers or more, but is often usable for people with two dots. My wife is a solidly two-dot user who is happily using KDE Neon as her distro.

But how many zero and one dot users are out there? What fraction of the market are we abandoning by requiring two dots?

This question was answered a couple of years ago when the Organization for Economic Co-operation and Development commissioned a massive a study of adults’ computer skills, with over 200,000 participants (!!!) across 33 high-income countries. The Nielsen/Normal Group summarized the results, and here I’ll condense them even further:

  • 25% of users cannot use computers at all. AT ALL! These people have zero dots in Computers according to the VtM scale.
  • 14% can can perform easy and obvious button-driven tasks in single simple apps, such as sending or deleting an email. They also have zero dots in Computers, but would be on the higher end of zero. Maybe a little more than half a dot.
  • 29% can use more advanced functionality in individual apps, such as searching for data that is not currently visible, or writing an email reply to multiple people and not just the sender. They have one dot in Computers.
  • 26% can perform multi-step tasks involving more than one app, collate information from external sources, overcome minor errors and obstacles that occur during the process, and do some monitoring of background tasks for activity. They have two dots in Computers.
  • 5% can perform complex tasks involving multiple data sources and apps with lots of navigation, transform imperfect data with tools to make it suitable for the required work, and succeed at ambiguous tasks with more than one correct outcome or possible approach to get it done, overcoming significant roadblocks along the way. These people would probably have three dots in Computers (even if they are not software engineers).

Let that sink in: almost 40% of adults in rich countries have practically no computer skills at all. This isn’t mentioned in the summary, but my personal experience with people in the lowest-skill group (25%) is that they can only use smartphones and tablets, while those in the next skill group (14%) still strongly prefer them over computers.

Another 30% of people have effectively one dot in Computers on the VtM scale. Taken together with the two lowest-skill groups, this means 70% of people’s computer skills are non-existent or very basic. Those with more advanced skills–two dots in Computers and up–are only about 30% of the population.

Maybe the dominance of the smartphone makes a bit more sense now…

KDE is never going to achieve world domination with software that can only be used by at most 30% of the market–those with two or more dots in Computers. To broaden our appeal, we need to make our software usable by at least the people in the next level down (one dot in Computers), which doubles the potential to 60% of the market–going from a minority to a solid majority.

BUT WAIT! Won’t this “dumb down” KDE’s software? Won’t we alienate our current audience of 2-and-3-dots-in-Computers users? After all, smartphone software optimized for zero-dot people is indeed really simple and limiting. So it’s a risk.

But I think good design and high customizability can make software elastic, suitable for users with a range of skills. Software with little or no customizability or poor design can probably only straddle two categories, so decent phone apps would be comfortably usable by people with 0-1 dots in Computers, maybe 0-2 dots with exceptional design. This pretty much matches the experience of myself and many people I know: those with more technical ability find most phone apps to be limiting and prefer using a computer for heavy lifting.

But well-designed software that’s customizable and has good default settings can accommodate a wider range of skill levels: people with 1-3 dots, or even 1-4 dots!

We can deliberately exclude the zero-dot people from our target audience, who are probably never going to be happy with KDE software. Our focus on power will bleed through in even the simplest apps, and just never appeal to them. GNOME and ElementaryOS can have those users.

This is what I think we should shoot for in KDE: software that is simple by default so it can work for 1-dot users, but powerful when needed via expansive customization, so that it can appeal all the way to the 4-dot users–which includes many KDE developers. This is currently a strength of KDE software, and it won’t be going away!

Essentially we need to fully embrace Plasma’s motto of “Simple by default, powerful when needed” all KDE software, not just Plasma.

I see a lot of this already happening via our simple-by-default Kirigami apps gaining power and customization opportunities, and our powerful-by-default QtWidgets apps gaining better default settings and a streamined appearance. So let’s keep it up!

Categories: FLOSS Project Planets

TestDriven.io: Reproducible Builds with Bazel

Planet Python - Mon, 2021-11-29 23:40
This article looks at how Bazel can be used to create reproducible, hermetic builds.
Categories: FLOSS Project Planets

Matthew Wright: Financial market data analysis with pandas

Planet Python - Mon, 2021-11-29 22:27

Pandas is a great tool for time series analysis of financial market data. Because pandas DataFrames and Series work well with a date/time based index, they can be used effectively to analyze historical data. By financial market data, I mean data like historical price information on a publicly traded financial instrument. However, any sort of … Continue reading Financial market data analysis with pandas

The post Financial market data analysis with pandas appeared first on wrighters.io.

Categories: FLOSS Project Planets

KDE Plasma 5.23.4, Bugfix Release for November

Planet KDE - Mon, 2021-11-29 19:00

Tuesday, 30 November 2021. Today KDE releases a bugfix update to KDE Plasma 5, versioned 5.23.4.

Plasma 5.23 was released in October 2021 with many feature refinements and new modules to complete the desktop experience.

This release adds three weeks' worth of new translations and fixes from KDE's contributors. The bugfixes are typically small but important and include:

  • Breeze style: Reduce groove opacity for greater contrast with scrollbar/slider/etc. Commit. Fixes bug #444203
  • Applets/weather: Make cursor a pointing hand when hovering over source link. Commit.
  • Plasma Systemmonitor: Don’t make right click popup modal. Commit.
View full changelog
Categories: FLOSS Project Planets

Gábor Hojtsy: The big Symfony 4 to 6 jump plan in Drupal 10 and potential benefits down the line for future versions

Planet Drupal - Mon, 2021-11-29 15:25

As you may know, we are planning to release Drupal 10 in 2022 (as early as June), because Drupal 9's Symfony 4 and CKEditor 4 are both end of life the year after, around the end of 2023. So we plan go give enough time for people to update to Drupal 10 before Drupal 9 goes end of life. A similar situation happened with Drupal 8 to 9 driven by Symfony 3 to 4. However, moving Drupal 10 from Symfony 4 to 5 would again only give us a couple years of time to move on to Symfony 6 next, so the current plan is to move to Symfony 6 straight.

How is it possible to move Drupal 10 from Symfony 4 to 6? Symfony 6.0 was just released a few hours ago and is stable, so by the time Drupal 10 would be released, it will already be at least on Symfony 6.1.

However, the exact same thing happened with Drupal 8, and we did not do a double Symfony version jump update from Drupal 8 to 9 for two reasons: (a) even though Drupal core minor versions are supported for 12 months, Symfony minor versions are only supported for 8 months other than the last LTS minor version and (b) jumping two versions would mean that scanning for and acting on minor version to minor version all deprecations is challenging. Those two did not resolve themselves so to speak, however we have plans to mitigate them.

Symfony security extension for Drupal-used packages

First of all, Symfony normally supports minor releases for 8 months starting with Symfony 5. On the other hand Drupal minor releases are supported for 12 months, so if there are security fixes to be made, this would not be possible on a non-LTS version of Symfony. However we made arrangements with the Symfony team to have two of the Drupal core committers be part of the Symfony security process and be able to backport security fixes as needed for components used by Drupal even if the given Symfony minor version would be normally out of support. The two Drupal core committers involved are Alex Pott and Lee Rowlands! I don't believe there was an official announcement of this agreement yet, however it was in place since September 2019. Special thanks for the open minded collaboration of the Symfony leads as well!

Bridging the deprecations jump with Symfony 5.4

Second is bridging API deprecations. Nathaniel Catchpole outlined the plan for this recently. The problem is that Symfony 4 deprecated some APIs for removal/changes in Symfony 5 and them Symfony 5 deprecated some APIs for removal/changes in Symfony 6. Jumping through two versions gives Drupal 10 a potentially longer lifetime but with a need to solve identifying all deprecated API uses for both. Now that both Symfony 5.4 and 6.0 are out, the plan is to open the Drupal 10.x-dev branch for development very soon and update to Symfony 5.4 as well as other big dependency updates. Then release a Drupal 10.0.0-alpha1 that is based off of Symfony 5.4, which would allow contributed projects and custom code to check against deprecated APIs towards Symfony 6. And only later update to Symfony 6. This way there is a middle-point that allows to make the necessary updates and check deprecated APIs against.

As jumping two major Symfony versions is not something we did before, let us know in the Drupal 10 issue if you can poke holes at the grand plan. While it looks like this will be entirely possible, it would be best to find any potential pain points ahead of Drupal implementers hitting them.

A proposal with overlapping LTS release versions of Drupal core

Lee Rowlans went even further and presented the potential benefits of this plan down the line with Drupal 11 and Drupal 12. Releasing Drupal 10 on Symfony 6 would allow us to support it longer, up to November 2027. However it does not mean that we cannot release Drupal 11 earlier than 2026 let's say. Releasing earlier would allow us to jump faster to Symfony 7 while it would still give Drupal 10 users a more comfortable, longer support timeline. Check out this video where Lee explains the details and discuss in the issue titled Adopt a 2 year major release cadence and a 6 month LTS-to-LTS overlap period for Drupal 10 and beyond. (This is not yet a firm policy, it is under discussion).


Categories: FLOSS Project Planets

Talking Drupal: Talking Drupal #323 - Pantheon Autopilot

Planet Drupal - Mon, 2021-11-29 14:00

Welcome to Talking Drupal. Today we are talking about Pantheon Autopilot with Nathan Tyler.

TalkingDrupal.com/323

Topics
  • Nic - Firefly iii
  • Kevin - Visiting Asheville
  • Nathan - Working on 227 open source repos, soccer league
  • John - Drupal Providence
  • Pantheon Autopilot
  • Visual regression tests
  • How it works
  • Comparison with backstop js
  • Deployment workflow
  • Composer integration
  • Compatible Drupal versions
  • Other platforms
  • Pantheon upstreams
  • Development process
  • Acquisition
  • Automatic updates initiative in Drupal core
  • Developer reactions
  • Need for autopilot once automatic updates are supported
  • Roadmap
  • Adding it to your account
    • cost
  • Most surprising project from pantheon
Resources Guests

Nathan Tyler - @getpantheon

Hosts

Nic Laflin - www.nLighteneddevelopment.com @nicxvan John Picozzi - www.epam.com @johnpicozzi Kevin Thull - @kevinjthull

MOTW

Webform The Webform module allows you to build any type of form to collect any type of data, which can be submitted to any application or system. Every single behavior and aspect of your forms and their inputs are customizable. Whether you need a multi-page form containing a multi-column input layout with conditional logic or a simple contact form that pushes data to a SalesForce/CRM, it is all possible using the Webform module for Drupal 8/9.

Categories: FLOSS Project Planets

Łukasz Langa: Weekly Report, November 22 - 28

Planet Python - Mon, 2021-11-29 13:30

This was a week where I tried something new. Instead of cutting through tens of shallow PRs, I focused deeply on a single one. I installed Irit Katriel’s GH-29581 to try out PEP 654’s new except* and ExceptionGroup objects.

Categories: FLOSS Project Planets

Simple Tips to Get Involved in KDE!

Planet KDE - Mon, 2021-11-29 05:55
CORRECTION: When I said "mykde.kde.org" I meant "my.kde.org"! 💸💸 Help me contribute to KDE and do these videos: 💸💸 Patreon: https://www.patreon.com/niccolove Youtube: https://www.youtube.com/channel/UCONH73CdRXUjlh3-DdLGCPw/join Paypal: https://paypal.me/niccolove Stay in the loop: https://t.me/veggeroblog My website is https://niccolo.venerandi.com and if you want to contact me, my telegram handle is [at] veggero.
Categories: FLOSS Project Planets

Web Omelette: How to switch out the Entity form mode dynamically in Drupal 9

Planet Drupal - Mon, 2021-11-29 03:34

In this article we are going to see how we can dynamically use a different entity form mode depending on certain conditions in Drupal 9.

Categories: FLOSS Project Planets

Evgeni Golov: Getting access to somebody else's Ansible Galaxy namespace

Planet Debian - Mon, 2021-11-29 03:00

TL;DR: adding features after the fact is hard, normalizing names is hard, it's patched, carry on.

I promise, the longer version is more interesting and fun to read!

Recently, I was poking around Ansible Galaxy and almost accidentally got access to someone else's namespace. I was actually looking for something completely different, but accidental finds are the best ones!

If you're asking yourself: "what the heck is he talking about?!", let's slow down for a moment:

  • Ansible is a great automation engine built around the concept of modules that do things (mostly written in Python) and playbooks (mostly written in YAML) that tell which things to do
  • Ansible Galaxy is a place where people can share their playbooks and modules for others to reuse
  • Galaxy Namespaces are a way to allow users to distinguish who published what and reduce name clashes to a minimum

That means that if I ever want to share how to automate installing vim, I can publish evgeni.vim on Galaxy and other people can download that and use it. And if my evil twin wants their vim recipe published, it will end up being called evilme.vim. Thus while both recipes are called vim they can coexist, can be downloaded to the same machine, and used independently.

How do you get a namespace? It's automatically created for you when you login for the first time. After that you can manage it, you can upload content, allow others to upload content and other things. You can also request additional namespaces, this is useful if you want one for an Organization or similar entities, which don't have a login for Galaxy.

Apropos login, Galaxy uses GitHub for authentication, so you don't have to store yet another password, just smash that octocat!

Did anyone actually click on those links above? If you did (you didn't, right?), you might have noticed another section in that document: Namespace Limitations. That says:

Namespace names in Galaxy are limited to lowercase word characters (i.e., a-z, 0-9) and ‘_’, must have a minimum length of 2 characters, and cannot start with an ‘_’. No other characters are allowed, including ‘.’, ‘-‘, and space. The first time you log into Galaxy, the server will create a Namespace for you, if one does not already exist, by converting your username to lowercase, and replacing any ‘-‘ characters with ‘_’.

For my login evgeni this is pretty boring, as the generated namespace is also evgeni. But for the GitHub user Evil-Pwnwil-666 it will become evil_pwnwil_666. This can be a bit confusing.

Another confusing thing is that Galaxy supports two types of content: roles and collections, but namespaces are only for collections! So it is Evil-Pwnwil-666.vim if it's a role, but evil_pwnwil_666.vim if it's a collection.

I think part of this split is because collections were added much later and have a much more well thought design of both the artifact itself and its delivery mechanisms.

This is by the way very important for us! Due to the fact that collections (and namespaces!) were added later, there must be code that ensures that users who were created before also get a namespace.

Galaxy does this (and I would have done it the same way) by hooking into the login process, and after the user is logged in it checks if a Namespace exists and if not it creates one and sets proper permissions.

And this is also exactly where the issue was!

The old code looked like this:

# Create lowercase namespace if case insensitive search does not find match qs = models.Namespace.objects.filter( name__iexact=sanitized_username).order_by('name') if qs.exists(): namespace = qs[0] else: namespace = models.Namespace.objects.create(**ns_defaults) namespace.owners.add(user)

See how namespace.owners.add is always called? Even if the namespace already existed? Yepp!

But how can we exploit that? Any user either already has a namespace (and owns it) or doesn't have one that could be owned. And given users are tied to GitHub accounts, there is no way to confuse Galaxy here. Now, remember how I said one could request additional namespaces, for organizations and stuff? Those will have owners, but the namespace name might not correspond to an existing user!

So all we need is to find an existing Galaxy namespace that is not a "default" namespace (aka a specially requested one) and get a GitHub account that (after the funny name conversion) matches the namespace name.

Thankfully Galaxy has an API, so I could dump all existing namespaces and their owners. Next I filtered that list to have only namespaces where the owner list doesn't contain a username that would (after conversion) match the namespace name. I found a few. And for one of them (let's call it the_target), the corresponding GitHub username (the-target) was available! Jackpot!

I've registered a new GitHub account with that name, logged in to Galaxy and had access to the previously found namespace.

This felt like sufficient proof that my attack worked and I mailed my findings to the Ansible Security team. The issue was fixed in d4f84d3400f887a26a9032687a06dd263029bde3 by moving the namespace.owners.add call to the "new namespace" branch.

And this concludes the story of how I accidentally got access to someone else's Galaxy namespace (which was revoked after the report, no worries).

Categories: FLOSS Project Planets

Dima Kogan: GL_image_display

Planet Debian - Mon, 2021-11-29 02:53

I just spent an unspeakable number of days typing to produce something that sounds very un-impressive: an FLTK widget that can display an image. The docs and code live here. The big difference from the usual image-drawing widget is that this one uses OpenGL internally, so after the initial image load, the common operations (drawing, redrawing, panning and zooming) are very fast. I have high-resolution images in my projects, and this will make my tools much nicer.

Three separate interfaces are available:

  • C: core library and GLUT application
  • C++: FLTK widget
  • Python: FLTK widget for pyfltk

The FLTK widgets have built-in interactive panning/zooming, and the library can draw line overlays. So nice applications can be built quickly.

I already added some early disabled-by-default support into the mrcal-stereo tool to visualize the rectification and report sensitivities:

Nice!

Categories: FLOSS Project Planets

Mike Driscoll: PyDev of the Week: Pradyun Gedam

Planet Python - Mon, 2021-11-29 01:05

This week we welcome Pradyun Gedam (@pradyunsg) as our PyDev of the Week! Pradyun works on pip, Python Packaging Index (PyPI), the Python Packaging Authority (PyPA), Sphinx, TOML and more! Pradyun blogs and does talks. You can find out more about those on his website. If you're more interested in seeing Pradyun's work, then you ought to head on over to GitHub or GitLab.

Let's spend a few moments getting to know Pradyun better!

Can you tell us a little about yourself (hobbies, education, etc.)?

I grew up in Mumbai, but recently moved to the UK, where I’m working for Bloomberg. I’m part of the company’s Python Infrastructure team, mainly focusing on the software infrastructure and developer experience for Python within the organization.

I generally like sports. I’ve played a lot of cricket, basketball, and football throughout most of my life. Unfortunately, I haven’t been able to play any of those team sports recreationally for over a year now.

However, I have played a lot of video games lately. I have a strong bias toward systemic simulation games. Rimworld has been slurping up a lot of my free time over the past few weeks – perhaps, to the point of being unhealthy, now that I think about it. In the recent past, Steam tells me I’ve been playing Parkitect, Dyson Sphere Program, Oxygen Not Included, Hitman 2, and Rocket League.

I feel like I’m a weird breed of video gamer though – my last two gaming systems have been a Linux Desktop and a MacBook Air. My only Windows-based gaming happens through my GeForce NOW subscription.

Education-wise, I have a bachelor’s degree in “Computer Science Engineering.”

Why did you start using Python?

To make my own video game! Python was the first programming language I learnt, and I learnt it to make games.

I was in 8th grade, if I remember correctly, when my parents gave me the book “Core Python Programming” with the suggestion: How about you learn how to make games instead of just playing them?

That was a very sticky idea. So, after putting it off for a while, I did indeed pick up the book and learnt from it. By the end of it, I had learnt a lot about computers in general, and then went on to build a 2-player 2D tank shooter as well!

I found the process of writing my own game more fun than actually playing it, so I started looking around for more things to make with this new skill I had learnt.

What other programming languages do you know, and which is your favorite?

I definitely spend a lot of my time working with Python, largely biased by the fact that it’s the one I’m most familiar with. That is followed by web technologies (JavaScript, CSS, HTML). I also work a decent amount with C++ code at work. I’ve enjoyed working with Rust at every opportunity/excuse I’ve had to do so; especially since the entire development experience and tooling around the language are great. I’ve also attended beginner sessions for Clojure, Ruby, and Haskell in the past, but I won’t say I know them.

To be honest, I don’t think I have any favorites here – to me, programming languages are tools in the toolbox of a software engineer. The tools I’m most familiar with are Python, web technologies (JS, CSS, HTML, and their various relatives), C++, and Rust.

What projects are you working on now?

Lately, it’s been a mix of working on Python Packaging tooling, Sphinx documentation stuff, and fiddling around with speech recognition on my Raspberry Pi.

I ended up updating the page on my website about what I’m working on while writing my response here, so I guess that’s the rest of my answer. 

Which Python libraries are your favorite (core or third-party)?

The most fun I’ve had with Python has been with the ast module – mostly because it led to me learn way more than I needed to about language grammars, parsers, parser generators, and language design.

PursuedPyBear (ppb) is an educational game engine and the project that I’m most excited to see growing. Video games is how I got started with Python, and ppb provides a much better foundation for learning Python (and game development) than what I had!

rich is also high up on the list of packages that I like right now!

How did you get started with the Python Packaging Authority (PyPA)?

Honestly, I feel like I stumbled my way into it.

That was purely curiosity driven for me – “oh, GitHub is a thing” ? “oh, I can read source code of things I use” ? “oh, the people who wrote this have discussions in this issues tab”. So… I ended up reading on some of the long-standing issues on the project. And then, making comments in those issues and summarizing the discussions so far. Something I didn’t realise back then: When you write a summary of a really long GitHub discussion, you also retrigger the whole discussion based on that summary.

The first major discussion I got involved in like this was about how pip install --upgrade <something> behaves, which quickly got entangled with how pip install <directory> should reinstall the project from the directory. It just spiraled from there.

This was around May or June 2016. At this point, I had been writing Python code for fun for about two or three years. It was just after I’ve given my final exams for high school (12th grade). Given that I wasn’t exactly preparing for “Joint Entrance Examination” (JEE) full time – unlike most of my peers – I had a bunch of free time on my hands.

So, I ended up putting that time into what ended up being a few months of technical discussion about what-do-we-do-here. The whole thing resulted in a +163 ?13 PR at the end – and I learnt very quickly that a lot of working on software is a people thing.

I actually enjoyed the process and learnt a lot of new things as a result. There was a certain dopamine rush associated with that the whole thing, so I ended up spending more time on the project. A few months later, I got into a college and realised that I can apply for Google Summer of Code (GSoC)! I did that in 2017, and a couple of months after that was over, I got offered the commit bit on pip and virtualenv.

Since then, I’ve been involved in some form with nearly every PyPA project on GitHub – either as a direct code contributor, engaging in discussions on their issue tracker, or as someone providing inputs in the standardisation process.

And, since I looked these up while writing this: My first commit in pip was updating a bunch of http URLs to https.

e04941bba Update http urls to use https instead (#3808) What have you been doing with Sphinx lately?

Actually, quite a lot, now that this question has made me think about it.

Documentation is a big part of software’s usability story, and a large part of how users interact with a given project. I’ve always felt that Sphinx-based documentation looked very dated, thereby contributing to lower quality content and a poor user experience. These feelings were validated and boosted by the user experience research that was conducted for pip throughout 2020.

Long story short, I ended up writing a Sphinx theme (Furo) that’s become quite popular (if I may say so myself). In the process of writing that theme, I discovered a bunch more things I could do. So… since then, I have:

  • worked with the original author of sphinx-themes.org and completely revamped the website (twice!), while also making it significantly easier to maintain.
  • picked up the maintenance of sphinx-autobuild, which provides a really nice live-reloading experience for writing Sphinx documentation.
  • collaborated with various folks from ReadTheDocs to improve things around Sphinx on their platform.
  • gotten involved in conversations about Sphinx, both in the issue tracker of Sphinx, as well as in the technical writing spaces (like Write The Docs).
  • become a member of the Executable Books Project, where I’m trying to help out with all the cool things that everyone else is building.
  • started writing a second theme and a bunch of theme-related tooling for Sphinx (though, I’ve not posted the code publicly yet).

The first public beta of Furo was 2020.9.2.beta1, which was over a year ago!

Of the packages that you help maintain, what’s your favorite and why?

Hmm… this is a tricky question to answer. It doesn’t help that I genuinely have so many things to choose from.

Furo comes to mind first. It is probably the only project I work on where I make the final call on everything unilaterally. It helps that it looks pretty and that it’s visible when someone uses it.

However, the project I spend the most time on is definitely pip. That is not the most fun project to work on though, even though it can be the most rewarding in terms of the sheer number of users I can help through my involvement with it.

What are the biggest challenges that the PyPA is facing?

Oh wow, that’s a heavy question. There’s a lot to unpack here.

I think one of the unique things about Python’s packaging tooling, compared to most other popular languages, is that it’s almost entirely driven by volunteers. This contrasts drastically with the investments and resources that other ecosystems have put toward their tooling. There are many consequences of this, but this question is about the challenges, so I’ll stick to those aspects.

There are definitely a lot of known functionality improvements that are difficult to get done with only volunteers. It is often tricky to coordinate across projects since availability is a hit-or-miss story. Improvements take time and generally progress slowly, both due to the volunteer nature of the labour, as well as the scope and scale of the work. Broadly, the PyPA operates on consensus and that is often not straightforward to establish. Even in those cases where we all agree and know exactly what needs to be done, we simply don’t have the ability to “throw” developer time at it to solve it.

There’s also the problem of poor documentation and communication channels. As with the functionality improvements, there’s limited availability of folks with the right skills and knowledge to invest the necessary energy into these areas. This isn’t helped by the fact that these areas are fairly complicated and nuanced in their own right, often rivaling the code changes in the amount of energy and understanding necessary to get things right.

Paying down our accrued technical debt doesn’t really attract as much energy as it should IMO, especially for something so foundational to the Python language ecosystem. A lot of improvements are blocked on this, since many foundational projects have a whole lot of technical debt which hasn’t been paid down. This sort of long-term low-effort/low-reward stuff is difficult to do when everyone’s a volunteer. Some things are easier when you’re getting paid to do it. Paying down technical debt is certainly one of these. Conversely, paying down technical debt is also tricky to get funding for on its own. 🙂

The “shackles” of backwards compatibility is another challenge (I consider this distinct from technical debt). There are many behaviours, CLI options, API designs, names for parameters/functions, etc. that people rely on in these tools. We’ve also learnt that some of these are confusing, frustrating, poorly named, and overall horrible for the user experience. Or, they are sub-optimal choices/names/approaches, especially given that we have the context we do today. Or, there’s a better approach for solving these issues, since we’ve made improvements in other parts of the ecosystem. But we can’t do much about them anytime soon, since we can’t break the parts of the Python ecosystem that depend on these behaviours.

All of this isn’t news to the folks who are actively involved in this space, or to many of your readers. Some of these are constraints that any long-standing software system has. That said, there has been substantial effort put toward improving this ecosystem as a whole over the last few years!

The PyPA’s standards-based approach is starting to show its benefits, through the ecosystem of alternatives to setuptools and overall workflow tooling that has been built over the last few years – these don’t have the same technical debt or backwards compatibility concerns and can innovate at a much faster pace. There are also multiple efforts underway to create re-usable libraries that implement functionality that, earlier, was only available within the internals of long-standing tools (e.g., pip, setuptools, distutils, etc.).

The Python Software Foundation’s Packaging Working Group (Packaging-WG) has been working toward securing funding for the Python ecosystem. They actually maintain a list of fundable Python Packaging improvements which are well-scoped, have clear consensus among the community, and are clearly going to improve an end-users’ experience – all of which are things that organisations that could fund this kind of work would want.

The Packaging-WG’s efforts have been very fruitful, leading to some very visible and impactful work being funded, like the new pypi.org site and the pip resolver rewrite (I worked on this one!). These were the sorts of things that would’ve taken many more years had they been undertaken only by volunteers and we hadn’t gotten this sort of funding. This has also led to establishing better documentation and communication around changes, including setting up “infrastructure” for doing a better job on these fronts going forward.

Thanks so much for doing the interview, Pradyun!

The post PyDev of the Week: Pradyun Gedam appeared first on Mouse Vs Python.

Categories: FLOSS Project Planets

Russ Allbery: Fall haul

Planet Debian - Sun, 2021-11-28 22:45

It's been a while since I've posted one of these, and I also may have had a few moments of deciding to support authors by buying their books even if I'm not going to get a chance to read them soon. There's also a bit of work reading in here.

Ryka Aoki — Light from Uncommon Stars (sff)
Frederick R. Chromey — To Measure the Sky (non-fiction)
Neil Gaiman, et al. — Sandman: Overture (graphic novel)
Alix E. Harrow — A Spindle Splintered (sff)
Jordan Ifueko — Raybearer (sff)
Jordan Ifueko — Redemptor (sff)
T. Kingfisher — Paladin's Hope (sff)
TJ Klune — Under the Whispering Door (sff)
Kiese Laymon — How to Slowly Kill Yourself and Others in America (non-fiction)
Yuna Lee — Fox You (romance)
Tim Mak — Misfire (non-fiction)
Naomi Novik — The Last Graduate (sff)
Shelley Parker-Chan — She Who Became the Sun (sff)
Gareth L. Powell — Embers of War (sff)
Justin Richer & Antonio Sanso — OAuth 2 in Action (non-fiction)
Dean Spade — Mutual Aid (non-fiction)
Lana Swartz — New Money (non-fiction)
Adam Tooze — Shutdown (non-fiction)
Bill Watterson — The Essential Calvin and Hobbes (strip collection)
Bill Willingham, et al. — Fables: Storybook Love (graphic novel)
David Wong — Real-World Cryptography (non-fiction)
Neon Yang — The Black Tides of Heaven (sff)
Neon Yang — The Red Threads of Fortune (sff)
Neon Yang — The Descent of Monsters (sff)
Neon Yang — The Ascent to Godhood (sff)
Xiran Jay Zhao — Iron Widow (sff)

Categories: FLOSS Project Planets

Pages