Python web devs, what's your approach to package versioning in requirements.txt? To pin or not to pin?
@pamelafox Broad rule of thumb:
- no pinning for libraries unless there are known incompatibilities. But then, requirements are in pyproject.toml anyway.
- pin for applications, but use dependabot or something to test updates.
- for both, try to keep updated and test
- you’re not testing enough, probably, test more.
@brianokken thank you! I'm going through all my repos and pinning/dependabot-ing today. For the repos where I have full test coverage, I'll add anthony's dependabot-bot to auto-merge.
@brianokken so lets say i get to 100% coverage on my pytest tests. what kind of testing do you like to do once an app is deployed to staging? selenium/playwright?
@pamelafox I’ll let you know when I get that far. All of my web apps are side projects.
@pamelafox @brianokken I would usually go for a simpler end to end testing before selenium. Depending what your system is this could just be another pyest suite (for example, maybe you have an API to test?). If your front end is very JavaScript heavy then maybe something like selenium could help.
I don’t have experience with playwright but I’d like to try it