Skip to content

Commit e5b79b2

Browse files
feat: Add types to build.py and refactor helper methods (#1707)
* feat: Add types to build.py and refactor helper methods * feat: Optimize pokemon and encounters builder * fix: Add time logging to build steps * ci: Change github runners to arm64 runners for more efficiency * revert: arm on k8s --------- Co-authored-by: Triyan Mukherjee <triyanmukherjee@gmail.com>
2 parents 2b27189 + 7cbab68 commit e5b79b2

12 files changed

Lines changed: 1326 additions & 1230 deletions

File tree

‎.github/workflows/code-quality.yml‎

Lines changed: 4 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ on:
1818
jobs:
1919
ruff:
2020
name: Ruff (lint)
21-
runs-on: ubuntu-latest
22-
# TODO: remove once the codebase is fully lint-clean
23-
continue-on-error: true
21+
runs-on: ubuntu-26.04-arm
2422
steps:
2523
- name: Checkout
2624
uses: actions/checkout@v6
@@ -29,27 +27,11 @@ jobs:
2927
- name: Install dependencies
3028
run: make install
3129
- name: Lint
32-
run: make lint-check || true
33-
- name: Summary
34-
if: always()
35-
run: |
36-
{
37-
echo "## Ruff lint results"
38-
echo
39-
echo "<details><summary>Expand to see all errors (backlog while the codebase is being linted incrementally)</summary>"
40-
echo
41-
echo '```'
42-
uv run ruff check --output-format=concise . || true
43-
echo '```'
44-
echo
45-
echo "</details>"
46-
} >> "$GITHUB_STEP_SUMMARY"
30+
run: make lint-check
4731

4832
ty:
4933
name: ty (type-check)
50-
runs-on: ubuntu-latest
51-
# TODO: remove once the codebase is fully typed
52-
continue-on-error: true
34+
runs-on: ubuntu-26.04-arm
5335
steps:
5436
- name: Checkout
5537
uses: actions/checkout@v6
@@ -58,18 +40,4 @@ jobs:
5840
- name: Install dependencies
5941
run: make install
6042
- name: Type-check
61-
run: make typecheck || true
62-
- name: Summary
63-
if: always()
64-
run: |
65-
{
66-
echo "## ty type-check results"
67-
echo
68-
echo "<details><summary>Expand to see all errors (backlog while the codebase is being typed incrementally)</summary>"
69-
echo
70-
echo '```'
71-
uv run ty check --output-format=concise || true
72-
echo '```'
73-
echo
74-
echo "</details>"
75-
} >> "$GITHUB_STEP_SUMMARY"
43+
run: make typecheck

‎.github/workflows/database.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
./csvlint -lazyquotes "$filename" # TODO: remove lazyquotes when https://github.com/Clever/csvlint/issues/45 will be addressed
3535
done
3636
openapi:
37-
runs-on: ubuntu-latest
37+
runs-on: ubuntu-26.04-arm
3838
steps:
3939
- name: Checkout
4040
uses: actions/checkout@v6
@@ -45,7 +45,7 @@ jobs:
4545
make install-base
4646
make openapi-generate
4747
sqlite:
48-
runs-on: ubuntu-latest
48+
runs-on: ubuntu-26.04-arm
4949
strategy:
5050
fail-fast: false
5151
matrix:
@@ -71,7 +71,7 @@ jobs:
7171
- name: Test data
7272
run: curl -Ss http://localhost:8000/api/v2/pokemon/1/ | grep -q 'bulbasaur'
7373
postgres:
74-
runs-on: ubuntu-latest
74+
runs-on: ubuntu-26.04-arm
7575
steps:
7676
- name: Checkout
7777
uses: actions/checkout@v6

‎.github/workflows/docker-build-and-push.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717
jobs:
1818
docker:
1919
if: ${{ !github.event.repository.fork }}
20-
runs-on: ubuntu-latest
20+
runs-on: ubuntu-26.04-arm
2121
steps:
2222
- name: Checkout
2323
uses: actions/checkout@v6

‎.github/workflows/nix-environment.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616

1717
jobs:
1818
nix-test:
19-
runs-on: ubuntu-latest
19+
runs-on: ubuntu-26.04-arm
2020
steps:
2121
- name: Checkout
2222
uses: actions/checkout@v6

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
jobs:
1919
release:
2020
if: ${{ !github.event.repository.fork }}
21-
runs-on: ubuntu-latest
21+
runs-on: ubuntu-26.04-arm
2222
steps:
2323
- name: Checkout
2424
uses: actions/checkout@v6

‎data/v2/__init__.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
from .build import *
1+
from .build import build_all
2+
3+
__all__: tuple[str, ...] = ("build_all",)

0 commit comments

Comments
 (0)