{"authors":[],"description":"Findings, thoughts, tutorials, work. Pieces of my mind!","feed_url":"https://pawamoy.github.io/feed_json_created.json","home_page_url":"https://pawamoy.github.io/","icon":null,"items":[{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>In April 2023 I announced the launch of a sponsorware program called Insiders, for mkdocstrings and other projects of mine. After two years and a half, I reached a bit more than a thousand dollar in monthly sponsorships, meaning two goals were completed, the $500 and $1000 goals, and their 20 associated features and projects released to the public. Today I'm sunsetting the Insiders program, for a few reasons listed below.</p>","date_modified":"2025-10-24T00:00:00+00:00","date_published":"2025-10-24T00:00:00+00:00","id":"https://pawamoy.github.io/posts/sunsetting-the-sponsorware-strategy/","image":null,"tags":null,"title":"Sunsetting the Insiders program","url":"https://pawamoy.github.io/posts/sunsetting-the-sponsorware-strategy/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>How to use the same Pytest fixtures with different scopes, to prevent slowing down your test suite?</p>\n<div class=\"post-image post-image--excerpt-only\" markdown>\n\n![same pytest fixtures with different scopes](../assets/pytest-fixtures.png)\n\n</div>","date_modified":"2024-05-01T00:00:00+00:00","date_published":"2024-05-01T00:00:00+00:00","id":"https://pawamoy.github.io/posts/same-pytest-fixtures-with-different-scopes/","image":null,"tags":null,"title":"Same Pytest fixtures with different scopes","url":"https://pawamoy.github.io/posts/same-pytest-fixtures-with-different-scopes/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>I sometimes have a tingling sensation, a soft and warm chill flowing from the top of my spine up to my skull, when looking at someone using something that belongs to me (a physical object or something I created, like code).</p>\n<p>Do you too?</p>","date_modified":"2024-03-14T00:00:00+00:00","date_published":"2024-03-14T00:00:00+00:00","id":"https://pawamoy.github.io/posts/tingling-sensation-witnessing-existence/","image":null,"tags":null,"title":"The tingling sensation of witnessing your own existence","url":"https://pawamoy.github.io/posts/tingling-sensation-witnessing-existence/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>A few days ago I was finally able to setup my Linux computer and Oculus Quest 2 to play some Steam VR games wirelessly. It tooks me several attempts over many months, and it was one of the most complicated process I had to discover and follow. So I figured I would share a small step-by-step guide to help others.</p>\n<p>Even though the process was painful for me at times, I would like to make it clear that the ALVR and SideQuest teams and their community have nothing to do with that: they are doing an <em>amazing job</em> and I'm very thankful for that.</p>\n<div class=\"post-image\" markdown>\n\n![steam linux alvr quest2](../assets/quest2.png)\n\n</div>","date_modified":"2024-03-08T00:00:00+00:00","date_published":"2024-03-08T00:00:00+00:00","id":"https://pawamoy.github.io/posts/steam-linux-alvr-quest2/","image":null,"tags":null,"title":"Playing Steam VR games running on Linux in the Oculus Quest 2 through ALVR (wireless)","url":"https://pawamoy.github.io/posts/steam-linux-alvr-quest2/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>This post will embark you on my journey about making a living off my open source projects. I'm still at the beginning of the journey, but there is already a lot to say and I wanted to share my experience. I like the idea of keeping a journal of what I go through, and who knows, maybe it will help or inspire others.</p>\n<p>In this post I write a bit about me, but I also provide technical instructions on how to set things up.</p>\n<div class=\"post-image\" markdown>\n\n![the insiders journey](../assets/insiders-journey.png)\n\n</div>","date_modified":"2023-11-07T00:00:00+00:00","date_published":"2023-11-07T00:00:00+00:00","id":"https://pawamoy.github.io/posts/the-insiders-journey/","image":null,"tags":null,"title":"The Insiders journey","url":"https://pawamoy.github.io/posts/the-insiders-journey/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<style>\n  .doc-object {\n    border: 4px solid var(--md-typeset-table-color);\n    padding-left: 16px;\n    padding-right: 16px;\n  }\n</style>\n\n<p>One of the features of [mkdocstrings-python] is its ability to automatically render cross-references to objects of the documented package in code block signatures.</p>\n<p>Adding links to code blocks is possible in HTML, but doing so while preserving Pygments syntax highlighting <em>and</em> Black formatting was not an easy task. This post explains how it works.</p>\n<div class=\"post-image post-image--excerpt-only\" markdown>\n\n![adding links to formatted and syntax highlighted code](../assets/codeblock.png)\n\n</div>","date_modified":"2023-08-09T00:00:00+00:00","date_published":"2023-08-09T00:00:00+00:00","id":"https://pawamoy.github.io/posts/adding-links-to-formatted-and-syntax-highlighted-code/","image":null,"tags":null,"title":"Adding links to a Black formatted, Pygments syntax highlighted Python code block","url":"https://pawamoy.github.io/posts/adding-links-to-formatted-and-syntax-highlighted-code/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>In this post I present my latest project template for Python projects, <a href=\"https://github.com/pawamoy/copier-pdm\">copier-pdm</a>, based on the great <a href=\"https://github.com/copier-org/copier\">Copier</a>.</p>\n<p>This parodic title was inspired by the <a href=\"https://cjolowicz.github.io/posts/hypermodern-python-01-setup/\">\"Hypermodern Python\"</a> article series by <a href=\"https://github.com/cjolowicz\">Claudio Jolowicz</a>. Indeed, my Python development setup has parts that could considered modern by some, and old-school by others, so I found it funny to call it \"more-or-less modern\".</p>","date_modified":"2022-09-22T00:00:00+00:00","date_published":"2022-09-22T00:00:00+00:00","id":"https://pawamoy.github.io/posts/somewhat-modern-python-development/","image":null,"tags":null,"title":"Somewhat-modern Python","url":"https://pawamoy.github.io/posts/somewhat-modern-python-development/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>In the <a href=\"add-alembic-migrations-to-existing-fastapi-ormar-project.md\">previous post</a> I showed how to add Alembic migrations to an existing FastAPI + Ormar project. In this post we will see how to write unit tests for such applications.</p>\n<div class=\"post-image\" markdown>\n\n![testing fastapi ormar alembic apps](../assets/alembic_post.png)\n\n</div>","date_modified":"2022-08-28T00:00:00+00:00","date_published":"2022-08-28T00:00:00+00:00","id":"https://pawamoy.github.io/posts/testing-fastapi-ormar-alembic-apps/","image":null,"tags":null,"title":"Testing a FastAPI application using Ormar models and Alembic migrations","url":"https://pawamoy.github.io/posts/testing-fastapi-ormar-alembic-apps/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>I had trouble adding an <code>ON DELETE CASCADE</code> constraint to foreign keys <em>after</em> they were already created, so here's a small post explaning how I did it. This specific constraint, <code>ON DELETE CASCADE</code>, is not relevant here. This post will help you for any kind of change you want to apply on database already used in production.</p>\n<div class=\"post-image\" markdown>\n\n![add alembic migrations to existing fastapi ormar project](../assets/alembic_post.png)\n\n</div>","date_modified":"2022-02-13T00:00:00+00:00","date_published":"2022-02-13T00:00:00+00:00","id":"https://pawamoy.github.io/posts/add-alembic-migrations-to-existing-fastapi-ormar-project/","image":null,"tags":null,"title":"How to add Alembic migrations to an existing FastAPI + Ormar project","url":"https://pawamoy.github.io/posts/add-alembic-migrations-to-existing-fastapi-ormar-project/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>I have developed a Python client/library for <a href=\"https://aria2.github.io/\"><code>aria2</code></a> called <a href=\"https://github.com/pawamoy/aria2p\"><code>aria2p</code></a>.</p>\n<p>To test my code, I spawn <code>aria2c</code> processes to interact with them and see if everything works correctly. I know I could mock the calls, but I feel like actually testing the interaction between my client and <code>aria2c</code> is a better way to ensure my code does its best.</p>\n<p>Until recently the test suite fed actual downloads to <code>aria2c</code> (like Linux distributions ISOs, metalinks, magnets, or torrents), but of course the inevitable happened: some URLs broke.</p>\n<p>So I decided to go full local. This post describes my attempt at spawning local HTTP servers to serve fake/virtual files efficiently, files that are then fed to <code>aria2c</code>.</p>\n<div class=\"post-image post-image--excerpt-only\" markdown>\n\n![local http server fake files testing purposes](../assets/local-http-server.png)\n\n</div>","date_modified":"2020-11-15T00:00:00+00:00","date_published":"2020-11-15T00:00:00+00:00","id":"https://pawamoy.github.io/posts/local-http-server-fake-files-testing-purposes/","image":null,"tags":null,"title":"Local HTTP server sending fake files for testing purposes","url":"https://pawamoy.github.io/posts/local-http-server-fake-files-testing-purposes/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>In my Python projects, I use a combination of <a href=\"https://github.com/pawamoy/duty\">Duty</a> (my task runner) and <code>make</code>.</p>\n<p>My <code>Makefile</code> declares the same tasks as the ones written in <code>duties.py</code>, but in a generic manner:</p>\n<p>```Makefile\nTASKS = check test release</p>\n<p>.PHONY: $(TASKS)\n$(TASKS):\n    @poetry run duty $@\n```</p>\n<p>So, instead of running <code>poetry run duty check</code>, I can run <code>make check</code>. Convenient, right?</p>\n<p>Except that some duties (tasks) accept arguments. For example:</p>\n<p><code>bash\npoetry run duty release version=0.1.2</code></p>\n<p>So how do I allow the <code>make</code> equivalent?</p>\n<p><code>bash\nmake release version=0.1.2</code></p>","date_modified":"2020-10-17T00:00:00+00:00","date_published":"2020-10-17T00:00:00+00:00","id":"https://pawamoy.github.io/posts/pass-makefile-args-as-typed-in-command-line/","image":null,"tags":null,"title":"Passing Makefile arguments to a command, as they are typed in the command line.","url":"https://pawamoy.github.io/posts/pass-makefile-args-as-typed-in-command-line/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>A user of <a href=\"https://github.com/pawamoy/mkdocstrings\"><code>mkdocstrings</code></a> wrote a Crystal handler for their own use-case. They asked on <a href=\"https://gitter.im/mkdocstrings/community\">the Gitter channel</a> if we could allow to load external handlers, so they don't have to fork the project and install the fork, but rather just install their lightweight package containing just the handler.</p>\n<p>We both saw Python namespace packages as good candidates, so I experimented a bit, and here are my conclusions.</p>","date_modified":"2020-10-11T00:00:00+00:00","date_published":"2020-10-11T00:00:00+00:00","id":"https://pawamoy.github.io/posts/plugins-as-python-native-namespace-packages/","image":null,"tags":null,"title":"Python packages and plugins as namespace packages","url":"https://pawamoy.github.io/posts/plugins-as-python-native-namespace-packages/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>When you type <code>change git commit</code> or similar keywords in a search engine, you find many answers explaning how to rewrite a commit <em>message</em>, but not how to actually modify the <em>contents</em> of the commit.</p>\n<p>This post quickly explains how to do that.</p>\n<div class=\"post-image post-image--excerpt-only\" markdown>\n\n![howto edit git commit contents](../assets/edit-commit3.png)\n\n</div>","date_modified":"2020-10-04T00:00:00+00:00","date_published":"2020-10-04T00:00:00+00:00","id":"https://pawamoy.github.io/posts/howto-edit-git-commit-contents/","image":null,"tags":null,"title":"How to edit the contents of a git commit","url":"https://pawamoy.github.io/posts/howto-edit-git-commit-contents/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>When I replaced <a href=\"https://jekyllrb.com/\">Jekyll</a> and my <a href=\"https://github.com/pawamoy/jekyll-readthedocs/\">Jekyll-ReadTheDocs theme</a> with <a href=\"https://www.mkdocs.org/\">MkDocs</a> and a <a href=\"https://github.com/pawamoy/website\">blog-customised version</a> of the <a href=\"https://squidfunk.github.io/mkdocs-material/\">Material for MkDocs theme</a>, the URLs of my posts changed.</p>\n<p>I was using <a href=\"https://disqus.com\">Disqus</a> for comments, and they provide a way to migrate threads from old URLs to new URLs. Unfortunately, this time it didn't work for some reason (I had already done it once in the past and it worked fine).</p>\n<p>I've read more and more criticism about Disqus related to privacy, so I looked at a replacement. The Disqus thread migration was not working so it was the perfect occasion!</p>\n<p>I've read a few webpages and got interested in <a href=\"https://posativ.org/isso/\">Isso</a>. Unfortunately again, I <a href=\"https://github.com/posativ/isso/issues/671\">did not manage</a> to install it on my Raspberry Pi.</p>\n<p>So I went with a much simpler solution: <a href=\"https://utteranc.es/\">Utterances</a>. You basically enable a GitHub app on your repository, add a script in your posts pages, and voilà: your new comment section powered by GitHub issues.</p>\n<div class=\"post-image post-image--excerpt-only\" markdown>\n\n![migrate disqus comments to utterances github](../assets/comments.png)\n\n</div>","date_modified":"2020-09-13T00:00:00+00:00","date_published":"2020-09-13T00:00:00+00:00","id":"https://pawamoy.github.io/posts/migrate-disqus-comments-to-utterances-github/","image":null,"tags":null,"title":"Migrate Disqus comments to Utterances (in GitHub issues) with Python","url":"https://pawamoy.github.io/posts/migrate-disqus-comments-to-utterances-github/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>It started with <a href=\"https://github.com/triaxtec/openapi-python-client/issues/138#issuecomment-670053183\">a comment in a GitHub issue</a>.</p>\n<blockquote>\n<p>I often find it difficult to wrangle spacing jinja2 templates especially around optional clauses.</p>\n</blockquote>\n<p>I couldn't wrap my head either about this. So I decided to write a script and test every combination of newlines, indentation and dashes or no dashes in <code>{%-</code>, with the goal being to find combinations that will not have an extra middle line when an optional Jinja clause is false.</p>","date_modified":"2020-09-01T00:00:00+00:00","date_published":"2020-09-01T00:00:00+00:00","id":"https://pawamoy.github.io/posts/how-to-deal-with-jinja2-spacing/","image":null,"tags":null,"title":"How to deal with spacing in Jinja2 templates","url":"https://pawamoy.github.io/posts/how-to-deal-with-jinja2-spacing/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>I recently started playing with <a href=\"https://fastapi.tiangolo.com/\">FastAPI</a> and <a href=\"https://www.python-httpx.org/\">HTTPX</a>, and I am deploying my app with <a href=\"https://gunicorn.org/\">Gunicorn</a> and <a href=\"https://www.uvicorn.org/\">Uvicorn</a> workers.</p>\n<p>But when serving, the logs from each component looks quite different from the others. I want them to all look the same, so I can easily read them or exploit them in something like <a href=\"https://www.elastic.co/kibana\">Kibana</a>.</p>\n<p>After a lot of hours trying to understand how <a href=\"https://docs.python.org/3/library/logging.html\">Python logging</a> works, and how to override libraries' logging settings, here is what I have...</p>\n<div class=\"post-image\" markdown>\n\n![unify logging for a gunicorn uvicorn app](../assets/gunicorn_logs.png)\n\n</div>","date_modified":"2020-06-02T00:00:00+00:00","date_published":"2020-06-02T00:00:00+00:00","id":"https://pawamoy.github.io/posts/unify-logging-for-a-gunicorn-uvicorn-app/","image":null,"tags":null,"title":"Unify Python logging for a Gunicorn/Uvicorn/FastAPI application","url":"https://pawamoy.github.io/posts/unify-logging-for-a-gunicorn-uvicorn-app/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>While I was writing tests for one of my latest project, <a href=\"https://github.com/pawamoy/aria2p\"><code>aria2p</code></a>, I noticed that some tests that were passing on my local machine were now failing on the GitLab CI runner.</p>\n<p>I decided I needed to write all exceptions to log files so I could inspect what happened on GitLab.</p>\n<div class=\"post-image\" markdown>\n\n![save pytest logs as artifact gitlab ci](../assets/loguru.png)\n\n</div>","date_modified":"2019-10-17T00:00:00+00:00","date_published":"2019-10-17T00:00:00+00:00","id":"https://pawamoy.github.io/posts/save-pytest-logs-as-artifact-gitlab-ci/","image":null,"tags":null,"title":"Save the logs generated during a pytest run as a job artifact on GitLab/GitHub CI","url":"https://pawamoy.github.io/posts/save-pytest-logs-as-artifact-gitlab-ci/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>Last night I was doing that in my head: filling a 2D space with one continuous line doing turns at a 90° angle, always in the same direction. Other people do this as well, right?</p>\n<p>Well, today I actually drawn it:</p>\n<div class=\"post-image post-image--excerpt-only\" markdown>\n\n![challenge fill space one line 90 degree same direction](../assets/fill-space-drawing.jpg)\n\n</div>","date_modified":"2019-02-01T00:00:00+00:00","date_published":"2019-02-01T00:00:00+00:00","id":"https://pawamoy.github.io/posts/challenge-fill-space-one-line-90-degree-same-direction/","image":null,"tags":null,"title":"Challenge: fill a 2D space with one continuous line doing 90° angle turns in the same direction (left/right)","url":"https://pawamoy.github.io/posts/challenge-fill-space-one-line-90-degree-same-direction/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>As you may know, [Shiny Server] comes in two versions: open-source and professional. The professional adds security and authentication features like <em>password protected applications</em>, and <em>controlled access via SSL and LDAP, Active Directory, Google OAuth, PAM, proxied authentication, or passwords</em>. If you need these authentication features but don't want or can't spend [$9,995 per year] for the professional edition, then I got a solution for you!</p>\n<div class=\"post-image post-image--excerpt-only\" markdown>\n\n![django auth server for shiny](../assets/client-server-architecture.png)\n\n</div>","date_modified":"2018-03-15T00:00:00+00:00","date_published":"2018-03-15T00:00:00+00:00","id":"https://pawamoy.github.io/posts/django-auth-server-for-shiny/","image":null,"tags":null,"title":"Django application as an authentication / authorization server for Shiny","url":"https://pawamoy.github.io/posts/django-auth-server-for-shiny/"},{"authors":[{"name":"Timothée Mazzucotelli"}],"content_html":"<p>Honestly, this post is mostly a personal memo. I will NOT go through this again!</p>","date_modified":"2018-03-09T00:00:00+00:00","date_published":"2018-03-09T00:00:00+00:00","id":"https://pawamoy.github.io/posts/dual-screens-setup-nvidia-bunsenlabs-debian-jessie/","image":null,"tags":null,"title":"How to install NVidia drivers on BunsenLabs/Debian 8 to setup dual screens","url":"https://pawamoy.github.io/posts/dual-screens-setup-nvidia-bunsenlabs-debian-jessie/"}],"language":"en","title":"pawamoy's website","version":"https://jsonfeed.org/version/1.1"}