Skip to content

Commit ef4f230

Browse files
[DEV-11527] add: backwards compat static typing (#303)
Co-authored-by: Sung96kim <sung96kim@gmail.com>
1 parent de64098 commit ef4f230

116 files changed

Lines changed: 1663 additions & 1094 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
venv
2+
dist
3+
docs
4+
docsrc
5+
.hypothesis
6+
.mypy_cache
7+
.pytest_cache
8+
.tox
9+
build
10+
readme_docs
11+
scripts

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pip-log.txt
2626
.coverage
2727
.tox
2828
nosetests.xml
29+
.mypy_cache
2930

3031
# Translations
3132
*.mo
@@ -37,6 +38,7 @@ nosetests.xml
3738
.noseids
3839
.pytest*
3940
*.json
41+
.hypothesis
4042

4143
codeship.aes
4244
.env
@@ -55,10 +57,11 @@ examples/readme.py
5557
docsrc/_build
5658
docs/.doctrees
5759
setup_tests.sh
60+
test.csv
5861

5962
.venv
6063
.vscode/
6164

6265
.DS_Store
6366
.ipynb_checkpoints/
64-
*.ipynb
67+
*.ipynb

.pre-commit-config.yaml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.2.0
3+
rev: v4.5.0
44
hooks:
55
- id: check-yaml
6+
exclude: ^docs
67
- id: end-of-file-fixer
8+
exclude: ^docs
79
- id: trailing-whitespace
10+
exclude: ^docs
11+
- repo: https://github.com/pycqa/isort
12+
rev: 5.12.0
13+
hooks:
14+
- id: isort
15+
name: isort (python)
816
- repo: https://github.com/psf/black
9-
rev: 22.3.0
17+
rev: 23.11.0
1018
hooks:
1119
- id: black
12-
language_version: python3

AUTHORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Chris Lee <chris@indico.io>
2-
Nicolas Kassis<nic@indico.io>
2+
Nicolas Kassis<nic@indico.io>

CHANGES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Oct 16 2019 v2.0.0: Complete change of IndicoIo API through the Indico IPA platform. For IPA Platform API use only.
1+
Oct 16 2019 v2.0.0: Complete change of IndicoIo API through the Indico IPA platform. For IPA Platform API use only.

CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @IndicoDataSolutions/pr-be-indicodata-ai
1+
* @IndicoDataSolutions/pr-be-indicodata-ai

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,20 @@ You will also need the following env variables set for the Exchange integration
105105
2. Activate the virtual environment
106106
`source venv/bin/activate`
107107
3. Install the client
108-
`python3 setup.py install`
109-
4. Install pytest
110-
`pip3 install pytest`
108+
`pip3 install --editable .[all]`
109+
4. Install test deps
110+
`pip3 install "pytest<8" "requests-mock>=1.8.0" "pytest-asyncio>0.21"`
111111
5. Run tests
112112
`pytest -sv --host <indico_host> tests/`
113113
_ Only run unit tests `pytest -sv --host <indico_host> tests/unit/`
114114
_ Only run integration tests `pytest -sv --host <indico_host> tests/integration/`
115+
6. Check typing
116+
```sh
117+
pip3 install "mypy==1.8" typing_extensions pandas-stubs types-requests types-pytz types-openpyxl
118+
mypy --config-file=pyproject.toml
119+
```
120+
121+
Alternatively, run all the unit tests via `docker compose run --rm tester`
115122

116123
# Contributing
117124

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ From source:
1919
.. code:: bash
2020
2121
git clone https://github.com/IndicoDataSolutions/indico-client-python.git
22-
python setup.py install
22+
python setup.py install

docker-compose.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
1-
version: "3"
2-
31
services:
42
indico-client-build:
53
build:
64
context: .
7-
entrypoint: [ "sleep", "infinity" ]
5+
entrypoint: ["sleep", "infinity"]
6+
7+
tester:
8+
build:
9+
context: .
10+
dockerfile: tox.Dockerfile
11+
volumes:
12+
- ./:/indico-client
13+
- ${INDICO_API_TOKEN_PATH:-$HOME/indico_api_token.txt}:/root/indico_api_token.txt
14+
environment:
15+
INDICO_HOST: ${INDICO_HOST:-dev-ci.us-east-2.indico-dev.indico.io}
16+
command: tox -vvvvp

docsrc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"sphinx.ext.autodoc",
3636
"sphinx.ext.napoleon",
3737
"sphinx_autodoc_typehints",
38-
"sphinx_markdown_builder"
38+
"sphinx_markdown_builder",
3939
]
4040

4141
# Add any paths that contain templates here, relative to this directory.

0 commit comments

Comments
 (0)