Skip to content

Commit 9935690

Browse files
CI, ENH: Check each minimum dependency is enforced in *.yaml and environment.yml (#51189)
* Add pin_min_versions_to_ci_deps() * Fix typos * Remove debug statements * Update YAML package versions * Replace files with updated min versions * Add exclusions + edge cases * Revert file to original * Revert environment.yml * Fix bugs * Add helper function * Ran pre-commit run validate-min-versions-in-sync --all-files * Fix merge issue * add parameter for custom toml dependency * Add dummy test files for test_validate_min_versions_in_sync.py * Add unit test: test_update_yaml_file_version() * Add dummy test files for edge cases * Add parametrization to unit test * Run pre-commit * Fix tzdata bug * Fix tzdata issue * Refactor * Update ci deps * Remove pyarrow * Revert tzdata * Update pyarrow * Revert pyarrow * Add docstrings * Remove psutil * Fix file rewrite issue * Refactor test data * minor fixups * fixup * improve typing --------- Co-authored-by: MarcoGorelli <> Co-authored-by: Marco Edward Gorelli <[email protected]>
1 parent c9017d9 commit 9935690

27 files changed

+1149
-240
lines changed

.pre-commit-config.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ repos:
313313
entry: python scripts/generate_pip_deps_from_conda.py
314314
files: ^(environment.yml|requirements-dev.txt)$
315315
pass_filenames: false
316-
additional_dependencies: [pyyaml, toml]
316+
additional_dependencies: [tomli, pyyaml]
317317
- id: title-capitalization
318318
name: Validate correct capitalization among titles in documentation
319319
entry: python scripts/validate_rst_title_capitalization.py
@@ -391,10 +391,11 @@ repos:
391391
types: [yaml]
392392
- id: validate-min-versions-in-sync
393393
name: Check minimum version of dependencies are aligned
394-
entry: python scripts/validate_min_versions_in_sync.py
394+
entry: python -m scripts.validate_min_versions_in_sync
395395
language: python
396396
files: ^(ci/deps/actions-.*-minimum_versions\.yaml|pandas/compat/_optional\.py)$
397-
additional_dependencies: [tomli]
397+
additional_dependencies: [tomli, pyyaml]
398+
pass_filenames: false
398399
- id: validate-errors-locations
399400
name: Validate errors locations
400401
description: Validate errors are in appropriate locations.

ci/deps/actions-310-numpydev.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies:
1212
- pytest-cov
1313
- pytest-xdist>=2.2.0
1414
- hypothesis>=6.34.2
15-
- pytest-asyncio>=0.17
15+
- pytest-asyncio>=0.17.0
1616

1717
# pandas dependencies
1818
- python-dateutil

ci/deps/actions-310.yaml

+29-29
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies:
1212
- pytest>=7.0.0
1313
- pytest-cov
1414
- pytest-xdist>=2.2.0
15-
- pytest-asyncio>=0.17
15+
- pytest-asyncio>=0.17.0
1616
- boto3
1717

1818
# required dependencies
@@ -21,36 +21,36 @@ dependencies:
2121
- pytz
2222

2323
# optional dependencies
24-
- beautifulsoup4
24+
- beautifulsoup4>=4.9.3
2525
- blosc
26-
- bottleneck
27-
- brotlipy
28-
- fastparquet
29-
- fsspec
30-
- html5lib
31-
- hypothesis
32-
- gcsfs
33-
- jinja2
34-
- lxml
26+
- bottleneck>=1.3.2
27+
- brotlipy>=0.7.0
28+
- fastparquet>=0.6.3
29+
- fsspec>=2021.07.0
30+
- html5lib>=1.1
31+
- hypothesis>=6.34.2
32+
- gcsfs>=2021.07.0
33+
- jinja2>=3.0.0
34+
- lxml>=4.6.3
3535
- matplotlib>=3.6.1, <3.7.0
36-
- numba
37-
- numexpr
38-
- openpyxl<3.1.1
39-
- odfpy
40-
- pandas-gbq
41-
- psycopg2
42-
- pymysql
43-
- pytables
36+
- numba>=0.53.1
37+
- numexpr>=2.7.3
38+
- openpyxl<3.1.1, >=3.0.7
39+
- odfpy>=1.4.1
40+
- pandas-gbq>=0.15.0
41+
- psycopg2>=2.8.6
42+
- pymysql>=1.0.2
43+
- pytables>=3.6.1
4444
- pyarrow
45-
- pyreadstat
46-
- python-snappy
47-
- pyxlsb
45+
- pyreadstat>=1.1.2
46+
- python-snappy>=0.6.0
47+
- pyxlsb>=1.0.8
4848
- s3fs>=2021.08.0
49-
- scipy
50-
- sqlalchemy
51-
- tabulate
49+
- scipy>=1.7.1
50+
- sqlalchemy>=1.4.16
51+
- tabulate>=0.8.9
5252
- tzdata>=2022a
53-
- xarray
54-
- xlrd
55-
- xlsxwriter
56-
- zstandard
53+
- xarray>=0.21.0
54+
- xlrd>=2.0.1
55+
- xlsxwriter>=1.4.3
56+
- zstandard>=0.15.2

ci/deps/actions-311.yaml

+28-28
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ dependencies:
99
- cython>=0.29.32
1010

1111
# test dependencies
12-
- pytest>=7.0
12+
- pytest>=7.0.0
1313
- pytest-cov
1414
- pytest-xdist>=2.2.0
15-
- pytest-asyncio>=0.17
15+
- pytest-asyncio>=0.17.0
1616
- boto3
1717

1818
# required dependencies
@@ -21,36 +21,36 @@ dependencies:
2121
- pytz
2222

2323
# optional dependencies
24-
- beautifulsoup4
24+
- beautifulsoup4>=4.9.3
2525
- blosc
26-
- bottleneck
27-
- brotlipy
28-
- fastparquet
29-
- fsspec
30-
- html5lib
31-
- hypothesis
32-
- gcsfs
33-
- jinja2
34-
- lxml
26+
- bottleneck>=1.3.2
27+
- brotlipy>=0.7.0
28+
- fastparquet>=0.6.3
29+
- fsspec>=2021.07.0
30+
- html5lib>=1.1
31+
- hypothesis>=6.34.2
32+
- gcsfs>=2021.07.0
33+
- jinja2>=3.0.0
34+
- lxml>=4.6.3
3535
- matplotlib>=3.6.1, <3.7.0
3636
# - numba not compatible with 3.11
37-
- numexpr
38-
- openpyxl<3.1.1
39-
- odfpy
40-
- pandas-gbq
41-
- psycopg2
42-
- pymysql
37+
- numexpr>=2.7.3
38+
- openpyxl<3.1.1, >=3.0.7
39+
- odfpy>=1.4.1
40+
- pandas-gbq>=0.15.0
41+
- psycopg2>=2.8.6
42+
- pymysql>=1.0.2
4343
# - pytables>=3.8.0 # first version that supports 3.11
4444
- pyarrow
45-
- pyreadstat
46-
- python-snappy
47-
- pyxlsb
45+
- pyreadstat>=1.1.2
46+
- python-snappy>=0.6.0
47+
- pyxlsb>=1.0.8
4848
- s3fs>=2021.08.0
49-
- scipy
50-
- sqlalchemy
51-
- tabulate
49+
- scipy>=1.7.1
50+
- sqlalchemy>=1.4.16
51+
- tabulate>=0.8.9
5252
- tzdata>=2022a
53-
- xarray
54-
- xlrd
55-
- xlsxwriter
56-
- zstandard
53+
- xarray>=0.21.0
54+
- xlrd>=2.0.1
55+
- xlsxwriter>=1.4.3
56+
- zstandard>=0.15.2

ci/deps/actions-38-downstream_compat.yaml

+29-29
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dependencies:
1313
- pytest>=7.0.0
1414
- pytest-cov
1515
- pytest-xdist>=2.2.0
16-
- pytest-asyncio>=0.17
16+
- pytest-asyncio>=0.17.0
1717
- boto3
1818

1919
# required dependencies
@@ -22,37 +22,37 @@ dependencies:
2222
- pytz
2323

2424
# optional dependencies
25-
- beautifulsoup4
25+
- beautifulsoup4>=4.9.3
2626
- blosc
27-
- brotlipy
28-
- bottleneck
29-
- fastparquet
30-
- fsspec
31-
- html5lib
32-
- hypothesis
33-
- gcsfs
34-
- jinja2
35-
- lxml
27+
- brotlipy>=0.7.0
28+
- bottleneck>=1.3.2
29+
- fastparquet>=0.6.3
30+
- fsspec>=2021.07.0
31+
- html5lib>=1.1
32+
- hypothesis>=6.34.2
33+
- gcsfs>=2021.07.0
34+
- jinja2>=3.0.0
35+
- lxml>=4.6.3
3636
- matplotlib>=3.6.1, <3.7.0
37-
- numba
38-
- numexpr
39-
- openpyxl<3.1.1
40-
- odfpy
41-
- psycopg2
37+
- numba>=0.53.1
38+
- numexpr>=2.7.3
39+
- openpyxl<3.1.1, >=3.0.7
40+
- odfpy>=1.4.1
41+
- psycopg2>=2.8.6
4242
- pyarrow
43-
- pymysql
44-
- pyreadstat
45-
- pytables
46-
- python-snappy
47-
- pyxlsb
43+
- pymysql>=1.0.2
44+
- pyreadstat>=1.1.2
45+
- pytables>=3.6.1
46+
- python-snappy>=0.6.0
47+
- pyxlsb>=1.0.8
4848
- s3fs>=2021.08.0
49-
- scipy
50-
- sqlalchemy
51-
- tabulate
52-
- xarray
53-
- xlrd
54-
- xlsxwriter
55-
- zstandard
49+
- scipy>=1.7.1
50+
- sqlalchemy>=1.4.16
51+
- tabulate>=0.8.9
52+
- xarray>=0.21.0
53+
- xlrd>=2.0.1
54+
- xlsxwriter>=1.4.3
55+
- zstandard>=0.15.2
5656

5757
# downstream packages
5858
- botocore
@@ -65,6 +65,6 @@ dependencies:
6565
- statsmodels
6666
- coverage
6767
- pandas-datareader
68-
- pandas-gbq
68+
- pandas-gbq>=0.15.0
6969
- pyyaml
7070
- py

ci/deps/actions-38-minimum_versions.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies:
1414
- pytest>=7.0.0
1515
- pytest-cov
1616
- pytest-xdist>=2.2.0
17-
- pytest-asyncio>=0.17
17+
- pytest-asyncio>=0.17.0
1818
- boto3
1919

2020
# required dependencies

ci/deps/actions-38.yaml

+29-29
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies:
1212
- pytest>=7.0.0
1313
- pytest-cov
1414
- pytest-xdist>=2.2.0
15-
- pytest-asyncio>=0.17
15+
- pytest-asyncio>=0.17.0
1616
- boto3
1717

1818
# required dependencies
@@ -21,35 +21,35 @@ dependencies:
2121
- pytz
2222

2323
# optional dependencies
24-
- beautifulsoup4
24+
- beautifulsoup4>=4.9.3
2525
- blosc
26-
- bottleneck
27-
- brotlipy
28-
- fastparquet
29-
- fsspec
30-
- html5lib
31-
- hypothesis
32-
- gcsfs
33-
- jinja2
34-
- lxml
26+
- bottleneck>=1.3.2
27+
- brotlipy>=0.7.0
28+
- fastparquet>=0.6.3
29+
- fsspec>=2021.07.0
30+
- html5lib>=1.1
31+
- hypothesis>=6.34.2
32+
- gcsfs>=2021.07.0
33+
- jinja2>=3.0.0
34+
- lxml>=4.6.3
3535
- matplotlib>=3.6.1, <3.7.0
36-
- numba
37-
- numexpr
38-
- openpyxl<3.1.1
39-
- odfpy
40-
- pandas-gbq
41-
- psycopg2
36+
- numba>=0.53.1
37+
- numexpr>=2.7.3
38+
- openpyxl<3.1.1, >=3.0.7
39+
- odfpy>=1.4.1
40+
- pandas-gbq>=0.15.0
41+
- psycopg2>=2.8.6
4242
- pyarrow
43-
- pymysql
44-
- pyreadstat
45-
- pytables
46-
- python-snappy
47-
- pyxlsb
43+
- pymysql>=1.0.2
44+
- pyreadstat>=1.1.2
45+
- pytables>=3.6.1
46+
- python-snappy>=0.6.0
47+
- pyxlsb>=1.0.8
4848
- s3fs>=2021.08.0
49-
- scipy
50-
- sqlalchemy
51-
- tabulate
52-
- xarray
53-
- xlrd
54-
- xlsxwriter
55-
- zstandard
49+
- scipy>=1.7.1
50+
- sqlalchemy>=1.4.16
51+
- tabulate>=0.8.9
52+
- xarray>=0.21.0
53+
- xlrd>=2.0.1
54+
- xlsxwriter>=1.4.3
55+
- zstandard>=0.15.2

0 commit comments

Comments
 (0)