Skip to content

Commit 92c9ef1

Browse files
authored
CI: Remove typecheck tests and clean things up (#439)
* Removed everything related to `typecheck_tests.py` * Made true/false values lowercase in `mypy.ini` like django-stubs
1 parent 180a5b1 commit 92c9ef1

File tree

9 files changed

+18
-491
lines changed

9 files changed

+18
-491
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -52,26 +52,3 @@ jobs:
5252
5353
- name: Run tests
5454
run: pytest
55-
56-
typecheck:
57-
runs-on: ubuntu-latest
58-
strategy:
59-
matrix:
60-
python-version: ['3.8', '3.9', '3.10', '3.11']
61-
steps:
62-
- uses: actions/checkout@v3
63-
- name: Setup system dependencies
64-
run: |
65-
sudo apt-get update
66-
sudo apt-get install binutils libproj-dev gdal-bin
67-
- name: Set up Python ${{ matrix.python-version }}
68-
uses: actions/setup-python@v4
69-
with:
70-
python-version: ${{ matrix.python-version }}
71-
- name: Install dependencies
72-
run: |
73-
pip install -U pip setuptools wheel
74-
pip install -r ./requirements.txt
75-
76-
- name: Run tests
77-
run: python ./scripts/typecheck_tests.py

CONTRIBUTING.md

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -73,36 +73,6 @@ To execute the unit tests, simply run:
7373
pytest
7474
```
7575

76-
We also test the stubs against the DRF's own test suite. This is done in CI but you can also do this locally.
77-
To execute the script run:
78-
79-
```bash
80-
python ./scripts/typecheck_tests.py
81-
```
82-
83-
You can also optionally specify a specific version tag to test against, e.g.
84-
85-
```bash
86-
python ./scripts/typecheck_tests.py --drf_version 3.12.1
87-
```
88-
89-
### Generating Stubs using Stubgen
90-
91-
The stubs are based on auto-generated code created by Mypy's stubgen tool (see: [the stubgen docs](https://mypy.readthedocs.io/en/stable/stubgen.html)).
92-
To make life easier we have a helper script that auto generates these stubs. To use it you can run:
93-
94-
```bash
95-
python ./scripts/stubgen-drf.py
96-
```
97-
98-
You can also pass an optional version tag, e.g.
99-
100-
```bash
101-
python ./scripts/stubgen-drf.py --drf_version 3.12.1
102-
```
103-
104-
The output for this is a gitignored folder called "stubgen" in the repo's root.
105-
10676
## Submission Guidelines
10777

10878
The workflow for contributions is fairly simple:

mypy.ini

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[mypy]
2-
strict_optional = True
3-
ignore_missing_imports = True
4-
check_untyped_defs = True
5-
show_traceback = True
6-
allow_redefinition = True
7-
incremental = True
2+
strict_optional = true
3+
ignore_missing_imports = true
4+
check_untyped_defs = true
5+
show_traceback = true
6+
allow_redefinition = true
7+
incremental = true
88
disable_error_code = empty-body
99
# TODO: update our test error messages to match new mypy output
10-
show_error_codes = False
11-
force_uppercase_builtins = True
12-
force_union_syntax = True
10+
show_error_codes = false
11+
force_uppercase_builtins = true
12+
force_union_syntax = true
1313

1414
plugins =
1515
mypy_django_plugin.main,

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
wheel
2-
gitpython==3.1.31
32
pre-commit==3.3.3
43
pytest==7.4.0
54
pytest-mypy-plugins==1.11.1

scripts/git_helpers.py

Lines changed: 0 additions & 32 deletions
This file was deleted.

scripts/paths.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

scripts/stubgen-drf.py

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)