Skip to content

Commit db313f2

Browse files
authored
Revert "BLD: Add pyproject.toml to wheels" (#52154)
* Revert "BLD: Add pyproject.toml to wheels (#50330)" This reverts commit 8023225. * don't revert test fixes * fix whitespace * more accidental whitespace
1 parent 4bf60ac commit db313f2

File tree

6 files changed

+12
-25
lines changed

6 files changed

+12
-25
lines changed

.github/workflows/wheels.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ jobs:
173173
pip install hypothesis>=6.34.2 pytest>=7.0.0 pytest-xdist>=2.2.0 pytest-asyncio>=0.17
174174
cd .. # Not a good idea to test within the src tree
175175
python -c "import pandas; print(pandas.__version__);
176-
pandas.test(extra_args=['-m not clipboard and not single_cpu and not slow and not network and not db', '-n 2', '--no-strict-data-files']);
177-
pandas.test(extra_args=['-m not clipboard and single_cpu and not slow and not network and not db', '--no-strict-data-files'])"
176+
pandas.test(extra_args=['-m not clipboard and not single_cpu and not slow and not network and not db', '-n 2']);
177+
pandas.test(extra_args=['-m not clipboard and single_cpu and not slow and not network and not db'])"
178178
- uses: actions/upload-artifact@v3
179179
with:
180180
name: sdist

ci/test_wheels.py

-2
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,10 @@
4141
multi_args = [
4242
"-m not clipboard and not single_cpu and not slow and not network and not db",
4343
"-n 2",
44-
"--no-strict-data-files",
4544
]
4645
pd.test(extra_args=multi_args)
4746
pd.test(
4847
extra_args=[
4948
"-m not clipboard and single_cpu and not slow and not network and not db",
50-
"--no-strict-data-files",
5149
]
5250
)

ci/test_wheels_windows.bat

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set test_command=import pandas as pd; print(pd.__version__); ^
2-
pd.test(extra_args=['-m not clipboard and not single_cpu and not slow and not network and not db', '--no-strict-data-files', '-n=2']); ^
3-
pd.test(extra_args=['-m not clipboard and single_cpu and not slow and not network and not db', '--no-strict-data-files'])
2+
pd.test(extra_args=['-m not clipboard and not single_cpu and not slow and not network and not db', '-n 2']); ^
3+
pd.test(extra_args=['-m not clipboard and single_cpu and not slow and not network and not db'])
44

55
python --version
66
pip install pytz six numpy python-dateutil tzdata>=2022.1

pandas/conftest.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@
103103

104104
def pytest_addoption(parser) -> None:
105105
parser.addoption(
106-
"--no-strict-data-files",
107-
action="store_false",
108-
help="Don't fail if a test is skipped for missing data file.",
106+
"--strict-data-files",
107+
action="store_true",
108+
help="Fail if a test is skipped for missing data file.",
109109
)
110110

111111

@@ -1135,9 +1135,9 @@ def all_numeric_accumulations(request):
11351135
@pytest.fixture
11361136
def strict_data_files(pytestconfig):
11371137
"""
1138-
Returns the configuration for the test setting `--no-strict-data-files`.
1138+
Returns the configuration for the test setting `--strict-data-files`.
11391139
"""
1140-
return pytestconfig.getoption("--no-strict-data-files")
1140+
return pytestconfig.getoption("--strict-data-files")
11411141

11421142

11431143
@pytest.fixture
@@ -1157,7 +1157,7 @@ def datapath(strict_data_files: str) -> Callable[..., str]:
11571157
Raises
11581158
------
11591159
ValueError
1160-
If the path doesn't exist and the --no-strict-data-files option is not set.
1160+
If the path doesn't exist and the --strict-data-files option is set.
11611161
"""
11621162
BASE_PATH = os.path.join(os.path.dirname(__file__), "tests")
11631163

@@ -1166,7 +1166,7 @@ def deco(*args):
11661166
if not os.path.exists(path):
11671167
if strict_data_files:
11681168
raise ValueError(
1169-
f"Could not find file {path} and --no-strict-data-files is not set."
1169+
f"Could not find file {path} and --strict-data-files is set."
11701170
)
11711171
pytest.skip(f"Could not find {path}.")
11721172
return path

pandas/tests/test_common.py

-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import collections
22
from functools import partial
3-
import os
43
import string
54

65
import numpy as np
@@ -175,12 +174,6 @@ def test_version_tag():
175174
)
176175

177176

178-
def test_pyproject_present():
179-
# Check pyproject.toml is present(relevant for wheels)
180-
pyproject_loc = os.path.join(os.path.dirname(__file__), "../../pyproject.toml")
181-
assert os.path.exists(pyproject_loc)
182-
183-
184177
@pytest.mark.parametrize(
185178
"obj", [(obj,) for obj in pd.__dict__.values() if callable(obj)]
186179
)

pyproject.toml

+1-5
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,6 @@ include-package-data = true
125125
include = ["pandas", "pandas.*"]
126126
namespaces = false
127127

128-
[tool.setuptools.package-data]
129-
pandas = ["../pyproject.toml"]
130-
131128
[tool.setuptools.exclude-package-data]
132129
"*" = ["*.c", "*.h"]
133130

@@ -407,7 +404,7 @@ disable = [
407404
[tool.pytest.ini_options]
408405
# sync minversion with pyproject.toml & install.rst
409406
minversion = "7.0"
410-
addopts = "--strict-markers --strict-config --capture=no --durations=30 --junitxml=test-data.xml"
407+
addopts = "--strict-data-files --strict-markers --strict-config --capture=no --durations=30 --junitxml=test-data.xml"
411408
empty_parameter_set_mark = "fail_at_collect"
412409
xfail_strict = true
413410
testpaths = "pandas"
@@ -417,7 +414,6 @@ doctest_optionflags = [
417414
"ELLIPSIS",
418415
]
419416
filterwarnings = [
420-
"error::_pytest.warning_types.PytestUnknownMarkWarning",
421417
"error:::pandas",
422418
"error::ResourceWarning",
423419
"error::pytest.PytestUnraisableExceptionWarning",

0 commit comments

Comments
 (0)