Skip to content

Commit a29719d

Browse files
authored
Merge branch 'master' into styler_tooltips_feature
2 parents eb7fe68 + cca4901 commit a29719d

File tree

265 files changed

+4499
-1572
lines changed

Some content is hidden

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

265 files changed

+4499
-1572
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,22 @@ jobs:
132132
- name: Upload dev docs
133133
run: rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
134134
if: github.event_name == 'push'
135+
136+
data_manager:
137+
name: Test experimental data manager
138+
runs-on: ubuntu-latest
139+
steps:
140+
141+
- name: Setting conda path
142+
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH
143+
144+
- name: Checkout
145+
uses: actions/checkout@v1
146+
147+
- name: Setup environment and build pandas
148+
run: ci/setup_env.sh
149+
150+
- name: Run tests
151+
run: |
152+
source activate pandas-dev
153+
pytest pandas/tests/frame/methods --array-manager

.pre-commit-config.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@ repos:
2020
types: [text]
2121
args: [--append-config=flake8/cython-template.cfg]
2222
- repo: https://github.com/PyCQA/isort
23-
rev: 5.6.4
23+
rev: 5.7.0
2424
hooks:
2525
- id: isort
26-
types: [text] # overwrite upstream `types: [python]`
27-
types_or: [python, cython]
2826
- repo: https://github.com/asottile/pyupgrade
2927
rev: v2.7.4
3028
hooks:
@@ -128,7 +126,7 @@ repos:
128126
entry: python scripts/validate_unwanted_patterns.py --validation-type="bare_pytest_raises"
129127
types: [python]
130128
files: ^pandas/tests/
131-
exclude: ^pandas/tests/(computation|extension|io)/
129+
exclude: ^pandas/tests/extension/
132130
- id: inconsistent-namespace-usage
133131
name: 'Check for inconsistent use of pandas namespace in tests'
134132
entry: python scripts/check_for_inconsistent_pandas_namespace.py
@@ -154,6 +152,11 @@ repos:
154152
\#\ type:\s?ignore(?!\[)
155153
language: pygrep
156154
types: [python]
155+
- id: np-bool
156+
name: Check for use of np.bool instead of np.bool_
157+
entry: np\.bool[^_8]
158+
language: pygrep
159+
types_or: [python, cython, rst]
157160
- id: no-os-remove
158161
name: Check code for instances of os.remove
159162
entry: os\.remove

asv_bench/benchmarks/groupby.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ class TransformBools:
627627
def setup(self):
628628
N = 120000
629629
transition_points = np.sort(np.random.choice(np.arange(N), 1400))
630-
transitions = np.zeros(N, dtype=np.bool)
630+
transitions = np.zeros(N, dtype=np.bool_)
631631
transitions[transition_points] = True
632632
self.g = transitions.cumsum()
633633
self.df = DataFrame({"signal": np.random.rand(N)})

asv_bench/benchmarks/io/excel.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class ReadExcel:
4343
params = ["xlrd", "openpyxl", "odf"]
4444
param_names = ["engine"]
4545
fname_excel = "spreadsheet.xlsx"
46+
fname_excel_xls = "spreadsheet.xls"
4647
fname_odf = "spreadsheet.ods"
4748

4849
def _create_odf(self):
@@ -63,10 +64,16 @@ def setup_cache(self):
6364
self.df = _generate_dataframe()
6465

6566
self.df.to_excel(self.fname_excel, sheet_name="Sheet1")
67+
self.df.to_excel(self.fname_excel_xls, sheet_name="Sheet1")
6668
self._create_odf()
6769

6870
def time_read_excel(self, engine):
69-
fname = self.fname_odf if engine == "odf" else self.fname_excel
71+
if engine == "xlrd":
72+
fname = self.fname_excel_xls
73+
elif engine == "odf":
74+
fname = self.fname_odf
75+
else:
76+
fname = self.fname_excel
7077
read_excel(fname, engine=engine)
7178

7279

ci/deps/actions-37-locale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ dependencies:
3030
- openpyxl
3131
- pandas-gbq
3232
- google-cloud-bigquery>=1.27.2 # GH 36436
33-
- pyarrow>=0.17
33+
- pyarrow=0.17 # GH 38803
3434
- pytables>=3.5.1
3535
- scipy
3636
- xarray=0.12.3

ci/deps/azure-37-slow.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ dependencies:
3636
- xlwt
3737
- moto
3838
- flask
39+
- numba

ci/deps/azure-38-slow.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ dependencies:
3434
- xlwt
3535
- moto
3636
- flask
37+
- numba

doc/make.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def __init__(
4646
warnings_are_errors=False,
4747
):
4848
self.num_jobs = num_jobs
49+
self.include_api = include_api
4950
self.verbosity = verbosity
5051
self.warnings_are_errors = warnings_are_errors
5152

@@ -188,7 +189,14 @@ def _add_redirects(self):
188189
if not row or row[0].strip().startswith("#"):
189190
continue
190191

191-
path = os.path.join(BUILD_PATH, "html", *row[0].split("/")) + ".html"
192+
html_path = os.path.join(BUILD_PATH, "html")
193+
path = os.path.join(html_path, *row[0].split("/")) + ".html"
194+
195+
if not self.include_api and (
196+
os.path.join(html_path, "reference") in path
197+
or os.path.join(html_path, "generated") in path
198+
):
199+
continue
192200

193201
try:
194202
title = self._get_page_title(row[1])
@@ -198,11 +206,6 @@ def _add_redirects(self):
198206
# sphinx specific stuff
199207
title = "this page"
200208

201-
if os.path.exists(path):
202-
raise RuntimeError(
203-
f"Redirection would overwrite an existing file: {path}"
204-
)
205-
206209
with open(path, "w") as moved_page_fd:
207210
html = f"""\
208211
<html>
Loading
238 KB
Loading

0 commit comments

Comments
 (0)