Conversation
c6fbdf7 to
1952c6c
Compare
|
So, turns out we're hitting a memory limit on the github action when compiling the docker images, so I am going to figure out what to do there. |
d5c573b to
e407e93
Compare
|
Weirdly this job hung forever waiting for something to happen. |
|
I think perhaps the |
bb9897a to
a9d9cb6
Compare
|
hi! Give me some time to take a look into this. I wasn't expeting a overhaul. I'll have to look into these new tools and confirm they are become the standard. Regarding the GH Action, I'll try to look into it. The k8s job probably is failing because you didn't update the k8s configuration files. I'll take a look. Secondly, the Postgres job is useful for, as you said, testing (and documenting) how to dump and load the database. I think every functionality of PokeAPI should be tested and having some test files that document how to actually do something is the best. |
|
I've not set up and used k8s myself before so testing and debugging is slow going. RE: Postgres job. Does it have to be done via docker? If so, I think porting it to circle CI so I can provision a bigger runner is the best course? It keep hitting memory limits. GitHub runner options are limited. |
|
No need to run it on Docker |
|
Postgres job rewritten to use bare metal instead of docker, now works :) |
Context: - Far more modern, easier environment management - I have tested all makefile commands work
Context: - This commit includes automatic formatting additions
Context: - This is a big change, but it is functionality identical - Explicit imports for some files make the diff very large - I set line length to 120 which is standard in Python - Some files used tabs instead of spaces (!) - now fixed
Context: - We needed to explicilty include psycopg-binary here - Rest of the changes are just replacements of python -> uv run
Context: - With the Docker config we hit a memory limit in Github actions - This alternative approach uses "bare metal" and still works
|
@Naramsim All tests passing now. Reorganised the commits to be distinct. Best reviewed commit by commit. |
This is the first part of #1390
UV package manager
uv is fast becoming the standard for managing an entire Python project. It handles package management, environment management, tool management etc. It's great.
The first commit introduces it. We also add
pyproject.tomlwhich is the new project dependency standard by Python. It replacesrequirements.txtand other configurations.Ruff auto formatting
Ruff is a Python code formatter. It is super fast, and like
uvbecoming the standard.The second commit is the "auto" formatted changes - there were very few.
Ruff manual formatting
This is the big commit. I had to manually go and update all the poorly formatted code in the entire project. Read the commit to see the summary of the changes.
Docker changes
I'm not the best at Docker, but I finally got it working. Changes are mostly around using
uvproperly.postgres job
This job used to run in Docker. For some reason it now hits memory limits. I've decided to just shift this to use "bare metal" and achieve the same result.
AI support
For the very very large files, I made 3-4 changes, then asked a coding agent to "copy the changes I did for the rest of the file to fix the import errors". Then I verified it by manually reading the diff
Proof it works
make build-allworks still