Skip to content

Revert "BLD: Add pyproject.toml to wheels" #52154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ jobs:
pip install hypothesis>=6.34.2 pytest>=7.0.0 pytest-xdist>=2.2.0 pytest-asyncio>=0.17
cd .. # Not a good idea to test within the src tree
python -c "import pandas; print(pandas.__version__);
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']);
pandas.test(extra_args=['-m not clipboard and single_cpu and not slow and not network and not db', '--no-strict-data-files'])"
pandas.test(extra_args=['-m not clipboard and not single_cpu and not slow and not network and not db', '-n 2']);
pandas.test(extra_args=['-m not clipboard and single_cpu and not slow and not network and not db'])"
- uses: actions/upload-artifact@v3
with:
name: sdist
Expand Down
2 changes: 0 additions & 2 deletions ci/test_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,10 @@
multi_args = [
"-m not clipboard and not single_cpu and not slow and not network and not db",
"-n 2",
"--no-strict-data-files",
]
pd.test(extra_args=multi_args)
pd.test(
extra_args=[
"-m not clipboard and single_cpu and not slow and not network and not db",
"--no-strict-data-files",
]
)
4 changes: 2 additions & 2 deletions ci/test_wheels_windows.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set test_command=import pandas as pd; print(pd.__version__); ^
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']); ^
pd.test(extra_args=['-m not clipboard and single_cpu and not slow and not network and not db', '--no-strict-data-files'])
pd.test(extra_args=['-m not clipboard and not single_cpu and not slow and not network and not db', '-n 2']); ^
pd.test(extra_args=['-m not clipboard and single_cpu and not slow and not network and not db'])

python --version
pip install pytz six numpy python-dateutil tzdata>=2022.1
Expand Down
14 changes: 7 additions & 7 deletions pandas/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@

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


Expand Down Expand Up @@ -1112,9 +1112,9 @@ def all_numeric_accumulations(request):
@pytest.fixture
def strict_data_files(pytestconfig):
"""
Returns the configuration for the test setting `--no-strict-data-files`.
Returns the configuration for the test setting `--strict-data-files`.
"""
return pytestconfig.getoption("--no-strict-data-files")
return pytestconfig.getoption("--strict-data-files")


@pytest.fixture
Expand All @@ -1134,7 +1134,7 @@ def datapath(strict_data_files: str) -> Callable[..., str]:
Raises
------
ValueError
If the path doesn't exist and the --no-strict-data-files option is not set.
If the path doesn't exist and the --strict-data-files option is set.
"""
BASE_PATH = os.path.join(os.path.dirname(__file__), "tests")

Expand All @@ -1143,7 +1143,7 @@ def deco(*args):
if not os.path.exists(path):
if strict_data_files:
raise ValueError(
f"Could not find file {path} and --no-strict-data-files is not set."
f"Could not find file {path} and --strict-data-files is set."
)
pytest.skip(f"Could not find {path}.")
return path
Expand Down
7 changes: 0 additions & 7 deletions pandas/tests/test_common.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import collections
from functools import partial
import os
import string

import numpy as np
Expand Down Expand Up @@ -175,12 +174,6 @@ def test_version_tag():
)


def test_pyproject_present():
# Check pyproject.toml is present(relevant for wheels)
pyproject_loc = os.path.join(os.path.dirname(__file__), "../../pyproject.toml")
assert os.path.exists(pyproject_loc)


@pytest.mark.parametrize(
"obj", [(obj,) for obj in pd.__dict__.values() if callable(obj)]
)
Expand Down
6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ include-package-data = true
include = ["pandas", "pandas.*"]
namespaces = false

[tool.setuptools.package-data]
pandas = ["../pyproject.toml"]

[tool.setuptools.exclude-package-data]
"*" = ["*.c", "*.h"]

Expand Down Expand Up @@ -409,7 +406,7 @@ disable = [
[tool.pytest.ini_options]
# sync minversion with pyproject.toml & install.rst
minversion = "7.0"
addopts = "--strict-markers --strict-config --capture=no --durations=30 --junitxml=test-data.xml"
addopts = "--strict-data-files --strict-markers --strict-config --capture=no --durations=30 --junitxml=test-data.xml"
empty_parameter_set_mark = "fail_at_collect"
xfail_strict = true
testpaths = "pandas"
Expand All @@ -419,7 +416,6 @@ doctest_optionflags = [
"ELLIPSIS",
]
filterwarnings = [
"error::_pytest.warning_types.PytestUnknownMarkWarning",
"error:::pandas",
"error::ResourceWarning",
"error::pytest.PytestUnraisableExceptionWarning",
Expand Down