Create a modern pre-commit setup for Python using UV, Ruff and more

  Рет қаралды 1,466

Timnology

Timnology

Күн бұрын

Пікірлер: 19
@al76am8
@al76am8 3 күн бұрын
Please create more videos man!!!
@kurtke1990
@kurtke1990 13 күн бұрын
Thank you for sharing. This helps a lot.
@Proprogrammer001
@Proprogrammer001 4 күн бұрын
What a gem!
@timothyspottering
@timothyspottering 22 күн бұрын
You are really motivating me to introduce a CI / CD pipeline for my python startup development! Every of your videos is like a friendly reminder, that I should be doing that.
@Timnology-r4s
@Timnology-r4s 22 күн бұрын
I consider that a win!
@SalahSaoud-j5s
@SalahSaoud-j5s 6 күн бұрын
Thank you so much for the follow up video. Another fantastic video. Could you please share your thoughts on the tools and ways to document your python projects.
@Timnology-r4s
@Timnology-r4s 6 күн бұрын
To document the project I typically use www.mkdocs.org/ and use a CI pipeline to push it to a static website provider such as azure.microsoft.com/en-us/products/app-service/static. Alternatively you can host static websites on most cloud storages such as GCP Buckets, Amazon S3 and Azure Storage Accounts.
21 күн бұрын
Your videos are amazing.
@it_is_ni
@it_is_ni 11 күн бұрын
@0:44 just so you know: some of the characters in the icons are a lot closer together than the others, looks kinda weird. Maybe a kerning setting in the tool you're using to generate those?
@Timnology-r4s
@Timnology-r4s 6 күн бұрын
Thanks, now I can't unsee that, didn't notice it before :p. I use www.manim.community/ for the animations. I'll have a look if it does something weird with the kerning for non build-in fonts.
21 күн бұрын
Great video! Would you consider making a video about your PyCharm settings? Your setup looks minimalist, similar to my VSCode, and I’m interested in migrating from VSCode to PyCharm. I’ve customized a lot of settings in VSCode, but I’d like to learn more about PyCharm and its benefits. I've tried adjusting some settings and the UI to resemble yours, but I couldn’t quite get it right. I’d also love to know about integrations with tools like Ruff and Pyright in PyCharm and how they work together.
@Timnology-r4s
@Timnology-r4s 19 күн бұрын
Thanks for the suggestions. I'll have a think on how to structure such a video! To quickly get what was shown in the video you can install the catppuccin color scheme. The cleanliness mostly comes from enabling view -> appearance -> Presentation Mode. Distraction Free mode also works really well to hide a lot of UI elements.
18 күн бұрын
​@@Timnology-r4s Thanks i will check!
@alejandroulisessanchezgame6924
@alejandroulisessanchezgame6924 20 күн бұрын
Can u share your nvim config, or make a video about it ? 🙏
@Timnology-r4s
@Timnology-r4s 19 күн бұрын
In this video I'm using IntelliJ, but in others I'm using neovim. I'll have a think in how to showcase how I've setup my dev environment..
@yorailevi6747
@yorailevi6747 7 күн бұрын
I love it a lot! 2 questions. 1) will you update the website to add pre-commit instruction? 2) the pre-commit versioned hooks aren't updated to stay in sync if pyproject.toml version are updated, do you have any idea how to keep the pre-commit and local project tooling on the same version? example: pyright recently complained: ``` WARNING: there is a new pyright version available (v1.1.387 -> v1.1.390). Please install the new version or set PYRIGHT_PYTHON_FORCE_VERSION to `latest` ``` which requires updating both files
@Timnology-r4s
@Timnology-r4s 6 күн бұрын
1. Oh dang, thanks for the heads-up. I forgot to hit publish, the website is updated with the write-up now :). 2. There are a few ways to go about that, one way is to simply not update to the latest version unless you're missing features or run into bugs. A second is to indeed do it manually, for small projects that is usually fine. Lastly, the more mature option is to use automated systems such as docs.renovatebot.com/ which what I typically use. It supports UV, lock files AND pre-commit!
@Aristocle
@Aristocle 17 күн бұрын
Is there a particular reason why the pre-commit file is inside the tests folder? and not in the project root. Also, I believe the pyproject.toml file is in the tests folder just to run this specific example? Could you also give an example for gitlab?
@Timnology-r4s
@Timnology-r4s 17 күн бұрын
Both files are in the root. Perhaps they appear to be in the tests folder because of the right pointing chevron, but they are siblings. See the repo: github.com/timvancann/yt-python-ci. Pre-commit hooks are fully independent of CI provider, so this setup will work fine for gitlab as well.
I’ve Switched to UV for Python, and So Should You
17:35
ArjanCodes
Рет қаралды 77 М.
Rust & Python are nice, but Mojo has Magic
12:47
Code to the Moon
Рет қаралды 28 М.
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Terminal tools for IT pros
22:25
Christian Lempa
Рет қаралды 27 М.
uv - Ruff + Pytest Tool Management (in a FastAPI Project)
19:28
I tried React and it Ruined My Life
1:19:10
Tsoding Daily
Рет қаралды 156 М.
Why You Should Think Twice Before Using Returns in Python
21:27
ArjanCodes
Рет қаралды 43 М.
I'm Addicted to Windsurf, Send Help
19:32
Cole Medin
Рет қаралды 43 М.
Google’s Quantum Chip: Did We Just Tap Into Parallel Universes?
9:34
So You Think You Know Git - FOSDEM 2024
47:00
GitButler
Рет қаралды 1,3 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН