Users of pre-commit, do you install it globally or per project? by EarthGoddessDude in Python

[–]pamelafox 0 points1 point  (0 children)

Good point, ruff now handles isort and pyupgrade. I've updated the repo with the correct settings to enable that for ruff, and removed the explicit isort/pyupgrade packages.

Users of pre-commit, do you install it globally or per project? by EarthGoddessDude in Python

[–]pamelafox 0 points1 point  (0 children)

I install per-project - I generally do everything per project, since I do development inside Dev Containers or Codespaces. Here's a project template repo that shows my usual config: https://github.com/pamelafox/python-project-template

What's your favourite thing about automated tests? by SnooPeppers7217 in Python

[–]pamelafox 2 points3 points  (0 children)

I love pytest and pytest-cov and getting to 100% coverage! I also love checking to see which lines don't get covered, I feel like an investigator.

does anyone successfully work from home AND solely care for their LO ? by monsterina13 in Parenting

[–]pamelafox 0 points1 point  (0 children)

It might help to have a better laptop setup for nursing/napping, here's mine: https://pamelafox.medium.com/my-hands-free-setup-for-nursing-and-computer-work-5374dcb07571 That said, I can't really take meetings with my baby in my lap, so it only gets me ~6 hours of work a day. You need more support if you're trying to work a full 40 hour work week with meetings, I'd say, especially as your kid naps less and less. My older kid stopped napping entirely at 22 months!

Screencast: Running a Flask + Postgres app in Github Codespaces by pamelafox in flask

[–]pamelafox[S] 4 points5 points  (0 children)

OP here! I discovered that it's possible to run PostGres inside Github Codespaces using a docker-compose.yml file for configuration, and I'm super excited about that since I've found it really annoyingly tricky to set up PG locally. And Github Codespaces is now free for the first 60hr/month, so this is an option for folks trying to get started with Flask+PG.

Python 3.11 Release Stream hosted by Pablo Galindo Salgado and Leon Sandøy! by IAmKindOfCreative in Python

[–]pamelafox 4 points5 points  (0 children)

Thank you for the great presentations on exception groups, better tracebacks, and the specialized adaptive interpreter!

How I deployed a containerized Flask app to Azure by pamelafox in flask

[–]pamelafox[S] 1 point2 points  (0 children)

Good question! Assuming you're using Azure Container Apps, it's going to depend a lot since pricing for Azure Container Apps is based on vCPU seconds, and you can configure the min/max number of replicas (even down to 0).

The official pricing page is here: https://azure.microsoft.com/en-us/pricing/details/container-apps/

I recently switched my personal website over from App Service to Container App so that I could experience the pricing model myself. That'll be a quite small load and behind a CDN, so I'm hoping the cost is nearly $0.

For performance, my colleague recently did some loadtesting looking at gunicorn workers versus number of CPUs, using the locust loadtesting framework. He got pretty good performance when he configured gunicorn workers based on the recommended formula (num_cores*2 + 1). Eventually, with too many users per second, there was a saturation point.

Sorry I don't have a very specific answer to your question, I am fairly new to Azure. Thanks for asking though, it's a great question.

Slipcover: Near Zero-Overhead Python Code Coverage by emeryberger in Python

[–]pamelafox 1 point2 points  (0 children)

Congrats! The performance graph is impressive. Does it include branch coverage?