Skip to content

Commit 52d7d87

Browse files
committed
Backport PR pandas-dev#47287: DEPS: Sync environment.yml with CI dep files
1 parent 2d370af commit 52d7d87

File tree

27 files changed

+1340
-242
lines changed

27 files changed

+1340
-242
lines changed

.github/workflows/code-checks.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,32 @@ jobs:
166166

167167
- name: Build image
168168
run: docker build --pull --no-cache --tag pandas-dev-env .
169+
170+
requirements-dev-text-installable:
171+
name: Test install requirements-dev.txt
172+
runs-on: ubuntu-latest
173+
174+
concurrency:
175+
# https://github.community/t/concurrecy-not-work-for-push/183068/7
176+
group: ${{ github.event_name == 'push' && github.run_number || github.ref }}-requirements-dev-text-installable
177+
cancel-in-progress: true
178+
179+
steps:
180+
- name: Checkout
181+
uses: actions/checkout@v3
182+
with:
183+
fetch-depth: 0
184+
185+
- name: Setup Python
186+
id: setup_python
187+
uses: actions/setup-python@v3
188+
with:
189+
python-version: '3.8'
190+
cache: 'pip'
191+
cache-dependency-path: 'requirements-dev.txt'
192+
193+
- name: Install requirements-dev.txt
194+
run: pip install -r requirements-dev.txt
195+
196+
- name: Check Pip Cache Hit
197+
run: echo ${{ steps.setup_python.outputs.cache-hit }}

.github/workflows/posix.yml renamed to .github/workflows/ubuntu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Posix
1+
name: Ubuntu
22

33
on:
44
push:
@@ -145,7 +145,7 @@ jobs:
145145

146146
- name: Extra installs
147147
# xsel for clipboard tests
148-
run: sudo apt-get update && sudo apt-get install -y libc6-dev-i386 xsel ${{ env.EXTRA_APT }}
148+
run: sudo apt-get update && sudo apt-get install -y xsel ${{ env.EXTRA_APT }}
149149

150150
- uses: conda-incubator/[email protected]
151151
with:

ci/deps/actions-310.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ dependencies:
3131
- jinja2
3232
- lxml
3333
- matplotlib
34-
# TODO: uncomment after numba supports py310
35-
#- numba
34+
- numba
3635
- numexpr
3736
- openpyxl
3837
- odfpy

environment.yml

Lines changed: 80 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,85 @@
1+
# Local development dependencies including docs building, website upload, ASV benchmark
12
name: pandas-dev
23
channels:
34
- conda-forge
45
dependencies:
5-
# required
6-
- numpy>=1.18.5
76
- python=3.8
8-
- python-dateutil>=2.8.1
7+
8+
# test dependencies
9+
- cython=0.29.30
10+
- pytest>=6.0
11+
- pytest-cov
12+
- pytest-xdist>=1.31
13+
- psutil
14+
- pytest-asyncio>=0.17
15+
- boto3
16+
17+
# required dependencies
18+
- python-dateutil
19+
- numpy
920
- pytz
1021

22+
# optional dependencies
23+
- beautifulsoup4
24+
- blosc
25+
- brotlipy
26+
- bottleneck
27+
- fastparquet
28+
- fsspec
29+
- html5lib
30+
- hypothesis
31+
- gcsfs
32+
- jinja2
33+
- lxml
34+
- matplotlib
35+
- numba>=0.53.1
36+
- numexpr>=2.8.0 # pin for "Run checks on imported code" job
37+
- openpyxl
38+
- odfpy
39+
- pandas-gbq
40+
- psycopg2
41+
- pyarrow
42+
- pymysql
43+
- pyreadstat
44+
- pytables
45+
- python-snappy
46+
- pyxlsb
47+
- s3fs
48+
- scipy
49+
- sqlalchemy
50+
- tabulate
51+
- xarray
52+
- xlrd
53+
- xlsxwriter
54+
- xlwt
55+
- zstandard
56+
57+
# downstream packages
58+
- aiobotocore<2.0.0 # GH#44311 pinned to fix docbuild
59+
- botocore
60+
- cftime
61+
- dask
62+
- ipython
63+
- geopandas-base
64+
- seaborn
65+
- scikit-learn
66+
- statsmodels
67+
- coverage
68+
- pandas-datareader
69+
- pyyaml
70+
- py
71+
- pytorch
72+
73+
# local testing dependencies
74+
- moto
75+
- flask
76+
1177
# benchmarks
1278
- asv
1379

14-
# building
1580
# The compiler packages are meta-packages and install the correct compiler (activation) packages on the respective platforms.
1681
- c-compiler
1782
- cxx-compiler
18-
- cython>=0.29.30
1983

2084
# code checks
2185
- black=22.3.0
@@ -24,18 +88,19 @@ dependencies:
2488
- flake8-bugbear=21.3.2 # used by flake8, find likely bugs
2589
- flake8-comprehensions=3.7.0 # used by flake8, linting of unnecessary comprehensions
2690
- isort>=5.2.1 # check that imports are in the right order
27-
- mypy=0.930
28-
- pre-commit>=2.9.2
91+
- mypy=0.960
92+
- pre-commit>=2.15.0
2993
- pycodestyle # used by flake8
3094
- pyupgrade
3195

3296
# documentation
3397
- gitpython # obtain contributors from git for whatsnew
3498
- gitdb
35-
- numpydoc < 1.2 # 2021-02-09 1.2dev breaking CI
99+
- natsort # DataFrame.sort_values doctest
100+
- numpydoc
36101
- pandas-dev-flaker=0.4.0
37102
- pydata-sphinx-theme=0.8.0
38-
- pytest-cython
103+
- pytest-cython # doctest
39104
- sphinx
40105
- sphinx-panels
41106
- types-python-dateutil
@@ -47,77 +112,14 @@ dependencies:
47112
- nbconvert>=6.4.5
48113
- nbsphinx
49114
- pandoc
50-
51-
# Dask and its dependencies (that dont install with dask)
52-
- dask-core
53-
- toolz>=0.7.3
54-
- partd>=0.3.10
55-
- cloudpickle>=0.2.1
56-
57-
# web (jinja2 is also needed, but it's also an optional pandas dependency)
58-
- markdown
59-
- feedparser
60-
- pyyaml
61-
- requests
62-
63-
# testing
64-
- boto3
65-
- botocore>=1.11
66-
- hypothesis>=5.5.3
67-
- moto # mock S3
68-
- flask
69-
- pytest>=6.0
70-
- pytest-cov
71-
- pytest-xdist>=1.31
72-
- pytest-asyncio>=0.17
73-
- pytest-instafail
74-
75-
# downstream tests
76-
- seaborn
77-
- statsmodels
78-
79-
# unused (required indirectly may be?)
80115
- ipywidgets
81116
- nbformat
82117
- notebook>=6.0.3
83-
84-
# optional
85-
- blosc
86-
- bottleneck>=1.3.1
87118
- ipykernel
88-
- ipython>=7.11.1
89-
- jinja2 # pandas.Styler
90-
- matplotlib>=3.3.2 # pandas.plotting, Series.plot, DataFrame.plot
91-
- numexpr>=2.7.1
92-
- scipy>=1.4.1
93-
- numba>=0.50.1
94-
95-
# optional for io
96-
# ---------------
97-
# pd.read_html
98-
- beautifulsoup4>=4.8.2
99-
- html5lib
100-
- lxml
101-
102-
# pd.read_excel, DataFrame.to_excel, pd.ExcelWriter, pd.ExcelFile
103-
- openpyxl
104-
- xlrd
105-
- xlsxwriter
106-
- xlwt
107-
- odfpy
108-
109-
- fastparquet>=0.4.0 # pandas.read_parquet, DataFrame.to_parquet
110-
- pyarrow>2.0.1 # pandas.read_parquet, DataFrame.to_parquet, pandas.read_feather, DataFrame.to_feather
111-
- python-snappy # required by pyarrow
112119

113-
- pytables>=3.6.1 # pandas.read_hdf, DataFrame.to_hdf
114-
- s3fs>=0.4.0 # file IO when using 's3://...' path
115-
- aiobotocore<2.0.0 # GH#44311 pinned to fix docbuild
116-
- fsspec>=0.7.4 # for generic remote file operations
117-
- gcsfs>=0.6.0 # file IO when using 'gcs://...' path
118-
- sqlalchemy # pandas.read_sql, DataFrame.to_sql
119-
- xarray<0.19 # DataFrame.to_xarray
120-
- cftime # Needed for downstream xarray.CFTimeIndex test
121-
- pyreadstat # pandas.read_spss
122-
- tabulate>=0.8.3 # DataFrame.to_markdown
123-
- natsort # DataFrame.sort_values
120+
# web
121+
- jinja2 # in optional dependencies, but documented here as needed
122+
- markdown
123+
- feedparser
124+
- pyyaml
125+
- requests

pandas/core/algorithms.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,12 +1078,7 @@ def checked_add_with_arr(
10781078
elif arr_mask is not None:
10791079
not_nan = np.logical_not(arr_mask)
10801080
elif b_mask is not None:
1081-
# Argument 1 to "__call__" of "_UFunc_Nin1_Nout1" has incompatible type
1082-
# "Optional[ndarray[Any, dtype[bool_]]]"; expected
1083-
# "Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[An
1084-
# y]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool,
1085-
# int, float, complex, str, bytes]]]" [arg-type]
1086-
not_nan = np.logical_not(b2_mask) # type: ignore[arg-type]
1081+
not_nan = np.logical_not(b2_mask)
10871082
else:
10881083
not_nan = np.empty(arr.shape, dtype=bool)
10891084
not_nan.fill(True)

pandas/core/array_algos/quantile.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,5 +184,8 @@ def _nanpercentile(
184184
return result
185185
else:
186186
return np.percentile(
187-
values, qs, axis=1, **{np_percentile_argname: interpolation}
187+
values,
188+
qs,
189+
axis=1,
190+
**{np_percentile_argname: interpolation},
188191
)

pandas/core/arraylike.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,11 @@ def array_ufunc(self, ufunc: np.ufunc, method: str, *inputs: Any, **kwargs: Any)
265265
return result
266266

267267
# Determine if we should defer.
268-
no_defer = (np.ndarray.__array_ufunc__, cls.__array_ufunc__)
268+
# error: "Type[ndarray[Any, Any]]" has no attribute "__array_ufunc__"
269+
no_defer = (
270+
np.ndarray.__array_ufunc__, # type: ignore[attr-defined]
271+
cls.__array_ufunc__,
272+
)
269273

270274
for item in inputs:
271275
higher_priority = (

0 commit comments

Comments
 (0)