Mastodon
separate

Separate app dependencies using Multi-stage builds

Intro Deploying and testing a web app using docker has become the standard nowadays. Quite often, we don’t pay attention on building more than one docker images of the service in order to use them for different scenarios. One of the most known use cases are the following: Use the docker image to run the application. Use the docker image to run the tests. Usually, the second scenario comes with some additional dependencies, such us: testing frameworks, mocking tools and others. In this case, we don’t want to include all these extra dependencies in the production docker image. This post demonstrates how multi-stage builds could be used for this purpose. ...

counting

OSS: Estimate and monitor the number of active users using Github Actions

Context A beta version of your awesome open-source software has been released. Great news so far. Except from introducing new features, fixing bugs and answering users’ questions, it’s really important to have an estimation of the total number of users. In case you are not the only user of your OSS, it’s significant to monitor the active users for the following reasons: Motivation. Knowing that people are using you software will motivate you to keep maintaining and improving your project. Trustworthy software. Spreading the total number of active users indicates that your OSS is trustworthy. So, this article is going to present a way to count active users and installations using Github Actions. ...

sphinx-flow-image

Add prefect flow visualizations into a Sphinx project

This article demonstrates an easy way (hopefully) to add your prefect flow visualizations into your sphinx documentation using the sphinxcontrib-prefectviz plugin. Some context Let’s say that you have implemented some pipelines using the lovely Prefect, great news so far, you chose a great tool to automate the boring stuff. Now it’s time to document your flows, a simple way to have an overview of your flows is to use the flow visualization. Let’s start by creating an awesome project called example. The only prefect flow that this project has is inside the flow.py file: ...

dropboxignore-alt

Exclude files from your dropbox easily using dropboxignore

The “Problem” A common issue/request about Dropbox was about ignoring files without using Selective Sync. Dropbox recently introduced the ability to ignore specific files or folders. Although the significance of the new feature, many users [ 1, 2 , 3, 4] have expressed the importance of ignoring files from Dropbox using Glob just like .gitignore. For various reasons Dropbox doesn’t seem to have the will to implement such a feature :/ The walk-around As a result, I decided to implement dropboxignore which is a simple shell script that ignores files from Dropbox based on glob patterns. Additionally, existing .gitignore files can be used to automatically generate .dropboxignore files. ...

scrapy-plugin-alt

Store images efficiently in scrapy using folder structure

Introduction NOTE: This article was the reason to implement the scrapy-folder-tree scrapy extension. What is the problem and how deal with it When it comes to image storing, a common pitfall is to save all the images in a single folder. If the number of images is less than few thousands, when, stop reading this post because you will not face any issue. On the other hand, if you are planing to store numerous images, then consider splitting them in different folders. Listing a directory will become faster, more efficient and at the end of the day, your kernel will be happier. A common pattern is to create a folder structure based on the name of every file. For example, let’s say that path/to/image/dir will be the main directory, and you want to store imagefile.jpg. Create folder structure based on file’s characters and save the file inside the leaf folder: ...