Skip to content

Commit 67fa6ef

Browse files
authored
Merge pull request #4 from script3r/dev/fix-ci
feat: Modernize codebase with Python 3.10+ support and comprehensive improvements
2 parents bc9e66f + 1a86f76 commit 67fa6ef

File tree

10 files changed

+306
-125
lines changed

10 files changed

+306
-125
lines changed

.github/workflows/django-tink-fields.yml

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,13 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
15-
django-version: ["5.2", "5.1", "5.0"]
16-
exclude:
14+
include:
1715
- python-version: "3.10"
18-
django-version: "5.0"
19-
- python-version: "3.11"
20-
django-version: "5.0"
21-
- python-version: "3.12"
22-
django-version: "5.0"
23-
- python-version: "3.13"
24-
django-version: "5.0"
25-
- python-version: "3.14"
26-
django-version: "5.0"
16+
django-version: "5.2"
17+
- python-version: "3.13.7"
18+
django-version: "5.2"
19+
- python-version: "3.13.7"
20+
django-version: "5.1"
2721

2822
steps:
2923
- name: Checkout code
@@ -46,11 +40,21 @@ jobs:
4640
run: |
4741
python -m pip install --upgrade pip
4842
pip install -r requirements-test.txt
49-
pip install "Django>=${{ matrix.django-version }},<$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))').0"
43+
# Install specific Django version based on matrix
44+
case "${{ matrix.django-version }}" in
45+
"5.1")
46+
pip install "Django>=5.1,<5.2"
47+
;;
48+
"5.2")
49+
pip install "Django>=5.2,<5.3"
50+
;;
51+
esac
52+
# Install the package in development mode
53+
pip install -e .
5054
5155
- name: Run tests
5256
run: |
53-
pytest tink_fields/test/ -v --cov=tink_fields --cov-report=xml --cov-report=term-missing
57+
pytest -v --cov=tink_fields --cov-report=xml --cov-report=term-missing
5458
5559
- name: Upload coverage to Codecov
5660
uses: codecov/codecov-action@v4
@@ -66,15 +70,16 @@ jobs:
6670
- name: Checkout code
6771
uses: actions/checkout@v4
6872

69-
- name: Set up Python 3.14
73+
- name: Set up Python 3.13.7
7074
uses: actions/setup-python@v5
7175
with:
72-
python-version: "3.14"
76+
python-version: "3.13.7"
7377

7478
- name: Install dependencies
7579
run: |
7680
python -m pip install --upgrade pip
7781
pip install -r requirements-dev.txt
82+
pip install pyright
7883
7984
- name: Run Black
8085
run: black --check tink_fields/
@@ -83,21 +88,22 @@ jobs:
8388
run: isort --check-only tink_fields/
8489

8590
- name: Run flake8
86-
run: flake8 tink_fields/
91+
run: flake8 tink_fields/ --max-line-length=120
92+
93+
- name: Run Pyright
94+
run: pyright
8795

88-
- name: Run mypy
89-
run: mypy tink_fields/
9096

9197
security:
9298
runs-on: ubuntu-latest
9399
steps:
94100
- name: Checkout code
95101
uses: actions/checkout@v4
96102

97-
- name: Set up Python 3.14
103+
- name: Set up Python 3.13.7
98104
uses: actions/setup-python@v5
99105
with:
100-
python-version: "3.14"
106+
python-version: "3.13.7"
101107

102108
- name: Install dependencies
103109
run: |

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ jobs:
2121
- name: Checkout code
2222
uses: actions/checkout@v4
2323

24-
- name: Set up Python 3.14
24+
- name: Set up Python 3.13.7
2525
uses: actions/setup-python@v5
2626
with:
27-
python-version: "3.14"
27+
python-version: "3.13.7"
2828

2929
- name: Cache pip dependencies
3030
uses: actions/cache@v4
@@ -74,10 +74,10 @@ jobs:
7474
- name: Checkout code
7575
uses: actions/checkout@v4
7676

77-
- name: Set up Python 3.14
77+
- name: Set up Python 3.13.7
7878
uses: actions/setup-python@v5
7979
with:
80-
python-version: "3.14"
80+
python-version: "3.13.7"
8181

8282
- name: Install released package
8383
run: |

.pyre/pyre.stderr

Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
2025-09-13 14:16:09,623 [PID 83382] INFO Could not determine the number of Pyre workers from configuration. Auto-set the value to 4.
2+
2025-09-13 14:16:09,624 [PID 83382] INFO Writing arguments into /var/folders/s8/lcrfctmn5tb2th2fxmt8cdpr0000gn/T/pyre_arguments_g2x2809m.json...
3+
2025-09-13 14:16:09,625 [PID 83382] DEBUG Arguments:
4+
{
5+
"source_paths": {
6+
"kind": "simple",
7+
"paths": [
8+
"/Users/script3r/Projects/django-tink-fields/tink_fields"
9+
]
10+
},
11+
"search_paths": [
12+
"/Users/script3r/Projects/django-tink-fields/.venv/lib/python3.13/site-packages"
13+
],
14+
"excludes": [
15+
"tink_fields/test"
16+
],
17+
"checked_directory_allowlist": [
18+
"/Users/script3r/Projects/django-tink-fields/tink_fields"
19+
],
20+
"checked_directory_blocklist": [],
21+
"extensions": [],
22+
"log_path": "/Users/script3r/Projects/django-tink-fields/.pyre",
23+
"global_root": "/Users/script3r/Projects/django-tink-fields",
24+
"debug": false,
25+
"python_version": {
26+
"major": 3,
27+
"minor": 9,
28+
"micro": 23
29+
},
30+
"shared_memory": {},
31+
"parallel": true,
32+
"number_of_workers": 4,
33+
"additional_logging_sections": [],
34+
"show_error_traces": false,
35+
"strict": true
36+
}
37+
2025-09-13 14:16:11,767 [PID 83382] DEBUG
38+
2025-09-13 14:16:11,768 [PID 83382] DEBUG Usage: pyre [OPTIONS] COMMAND [ARGS]...
39+
2025-09-13 14:16:11,768 [PID 83382] DEBUG Try 'pyre -h' for help.
40+
2025-09-13 14:16:11,769 [PID 83382] DEBUG
41+
2025-09-13 14:16:11,769 [PID 83382] DEBUG Error: No such command 'newcheck'.
42+
2025-09-13 14:16:11,821 [PID 83382] ERROR Check command exited with non-zero return code: 12.
43+
2025-09-13 14:16:19,816 [PID 83534] INFO No binary specified, looking for `pyre.bin` in PATH
44+
2025-09-13 14:16:19,816 [PID 83534] INFO Could not determine the number of Pyre workers from configuration. Auto-set the value to 4.
45+
2025-09-13 14:16:19,816 [PID 83534] INFO No typeshed specified, looking for it...
46+
2025-09-13 14:16:19,816 [PID 83534] DEBUG Could not find bundled typeshed. Try importing typeshed directly...
47+
2025-09-13 14:16:19,816 [PID 83534] DEBUG `import typeshed` failed.
48+
2025-09-13 14:16:19,816 [PID 83534] WARNING Could not find a suitable typeshed. Types for Python builtins and standard libraries may be missing!
49+
2025-09-13 14:16:19,818 [PID 83534] INFO Writing arguments into /var/folders/s8/lcrfctmn5tb2th2fxmt8cdpr0000gn/T/pyre_arguments_ubmcn97i.json...
50+
2025-09-13 14:16:19,818 [PID 83534] DEBUG Arguments:
51+
{
52+
"source_paths": {
53+
"kind": "simple",
54+
"paths": [
55+
"/Users/script3r/Projects/django-tink-fields/tink_fields"
56+
]
57+
},
58+
"search_paths": [],
59+
"excludes": [
60+
"tink_fields/test"
61+
],
62+
"checked_directory_allowlist": [
63+
"/Users/script3r/Projects/django-tink-fields/tink_fields"
64+
],
65+
"checked_directory_blocklist": [],
66+
"extensions": [],
67+
"log_path": "/Users/script3r/Projects/django-tink-fields/.pyre",
68+
"global_root": "/Users/script3r/Projects/django-tink-fields",
69+
"debug": false,
70+
"python_version": {
71+
"major": 3,
72+
"minor": 9,
73+
"micro": 23
74+
},
75+
"shared_memory": {},
76+
"parallel": true,
77+
"number_of_workers": 4,
78+
"additional_logging_sections": [],
79+
"show_error_traces": false,
80+
"strict": true
81+
}
82+
2025-09-13 14:16:23,493 [PID 83534] PERFORMANCE Initialized shared memory (heap size: 8589934592, dep table pow: 1, hash table pow: 26): 0.000s
83+
2025-09-13 14:16:23,508 [PID 83534] PERFORMANCE Initialized multiprocessing workers (workers: 4): 0.014s
84+
2025-09-13 14:16:23,509 [PID 83534] INFO Building module tracker...
85+
2025-09-13 14:16:23,510 [PID 83534] PERFORMANCE Module tracker built: 0.001s
86+
2025-09-13 14:16:23,510 [PID 83534] PERFORMANCE Full environment built: 0.001s
87+
2025-09-13 14:16:23,510 [PID 83534] INFO Collecting all definitions...
88+
2025-09-13 14:16:23,642 [PID 83534] PERFORMANCE Collected definitions (defines: 75): 0.131s
89+
2025-09-13 14:16:23,642 [PID 83534] INFO Checking 75 functions...
90+
2025-09-13 14:16:23,729 [PID 83534] INFO Processed 10 of 75 functions
91+
2025-09-13 14:16:23,733 [PID 83534] INFO Processed 20 of 75 functions
92+
2025-09-13 14:16:23,733 [PID 83534] INFO Processed 30 of 75 functions
93+
2025-09-13 14:16:23,734 [PID 83534] INFO Processed 40 of 75 functions
94+
2025-09-13 14:16:23,809 [PID 83534] INFO Processed 50 of 75 functions
95+
2025-09-13 14:16:23,812 [PID 83534] INFO Processed 60 of 75 functions
96+
2025-09-13 14:16:23,815 [PID 83534] INFO Processed 70 of 75 functions
97+
2025-09-13 14:16:23,820 [PID 83534] INFO Processed 75 of 75 functions
98+
2025-09-13 14:16:23,821 [PID 83534] PERFORMANCE Check_TypeCheck: 0.178s
99+
2025-09-13 14:16:23,821 [PID 83534] MEMORY Shared memory size post-typecheck (size: 0)
100+
2025-09-13 14:16:23,821 [PID 83534] INFO Postprocessing 9 sources...
101+
2025-09-13 14:16:23,884 [PID 83534] INFO Postprocessed 3 of 9 sources
102+
2025-09-13 14:16:23,887 [PID 83534] INFO Postprocessed 6 of 9 sources
103+
2025-09-13 14:16:23,889 [PID 83534] INFO Postprocessed 9 of 9 sources
104+
2025-09-13 14:16:23,889 [PID 83534] PERFORMANCE Check_Postprocessing: 0.068s
105+
2025-09-13 14:16:23,889 [PID 83534] PERFORMANCE Check (request kind: FullCheck): 0.380s
106+
2025-09-13 14:16:23,904 [PID 83534] ERROR Found 117 type errors!
107+
2025-09-13 14:16:31,386 [PID 83717] INFO No binary specified, looking for `pyre.bin` in PATH
108+
2025-09-13 14:16:31,386 [PID 83717] INFO Could not determine the number of Pyre workers from configuration. Auto-set the value to 4.
109+
2025-09-13 14:16:31,386 [PID 83717] INFO No typeshed specified, looking for it...
110+
2025-09-13 14:16:31,386 [PID 83717] DEBUG Could not find bundled typeshed. Try importing typeshed directly...
111+
2025-09-13 14:16:31,386 [PID 83717] DEBUG `import typeshed` failed.
112+
2025-09-13 14:16:31,386 [PID 83717] WARNING Could not find a suitable typeshed. Types for Python builtins and standard libraries may be missing!
113+
2025-09-13 14:16:31,387 [PID 83717] INFO Writing arguments into /var/folders/s8/lcrfctmn5tb2th2fxmt8cdpr0000gn/T/pyre_arguments_685un5bl.json...
114+
2025-09-13 14:16:31,387 [PID 83717] DEBUG Arguments:
115+
{
116+
"source_paths": {
117+
"kind": "simple",
118+
"paths": [
119+
"/Users/script3r/Projects/django-tink-fields/tink_fields"
120+
]
121+
},
122+
"search_paths": [],
123+
"excludes": [
124+
"tink_fields/test"
125+
],
126+
"checked_directory_allowlist": [
127+
"/Users/script3r/Projects/django-tink-fields/tink_fields"
128+
],
129+
"checked_directory_blocklist": [],
130+
"extensions": [],
131+
"log_path": "/Users/script3r/Projects/django-tink-fields/.pyre",
132+
"global_root": "/Users/script3r/Projects/django-tink-fields",
133+
"debug": false,
134+
"python_version": {
135+
"major": 3,
136+
"minor": 9,
137+
"micro": 23
138+
},
139+
"shared_memory": {},
140+
"parallel": true,
141+
"number_of_workers": 4,
142+
"additional_logging_sections": [
143+
"-progress"
144+
],
145+
"show_error_traces": false,
146+
"strict": false
147+
}
148+
2025-09-13 14:16:31,441 [PID 83717] PERFORMANCE Initialized shared memory (heap size: 8589934592, dep table pow: 1, hash table pow: 26): 0.000s
149+
2025-09-13 14:16:31,455 [PID 83717] PERFORMANCE Initialized multiprocessing workers (workers: 4): 0.012s
150+
2025-09-13 14:16:31,455 [PID 83717] INFO Building module tracker...
151+
2025-09-13 14:16:31,456 [PID 83717] PERFORMANCE Module tracker built: 0.001s
152+
2025-09-13 14:16:31,456 [PID 83717] PERFORMANCE Full environment built: 0.001s
153+
2025-09-13 14:16:31,456 [PID 83717] INFO Collecting all definitions...
154+
2025-09-13 14:16:31,585 [PID 83717] PERFORMANCE Collected definitions (defines: 75): 0.128s
155+
2025-09-13 14:16:31,585 [PID 83717] INFO Checking 75 functions...
156+
2025-09-13 14:16:31,747 [PID 83717] PERFORMANCE Check_TypeCheck: 0.162s
157+
2025-09-13 14:16:31,747 [PID 83717] MEMORY Shared memory size post-typecheck (size: 0)
158+
2025-09-13 14:16:31,814 [PID 83717] PERFORMANCE Check_Postprocessing: 0.066s
159+
2025-09-13 14:16:31,814 [PID 83717] PERFORMANCE Check (request kind: FullCheck): 0.359s
160+
2025-09-13 14:16:31,828 [PID 83717] ERROR Found 49 type errors!

0 commit comments

Comments
 (0)