Skip to content
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 .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ default_language_version:
python: python3
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.17.1
rev: v0.17.3
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --no-cache]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v2.4.0
rev: v2.4.1
hooks:
- id: mypy
additional_dependencies:
Expand Down
19 changes: 13 additions & 6 deletions tests/test_datasets/test_dataset_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,7 @@ def test__retrieve_class_labels(self):
labels = custom_ds.retrieve_class_labels(target_name=custom_ds.features[31].name)
assert labels == ["COIL", "SHEET"]

@pytest.mark.skip(reason="URL upload disabled since PHP API v1.3.2")
@pytest.mark.test_server
def test_upload_dataset_with_url(self):
dataset = OpenMLDataset(
Expand Down Expand Up @@ -594,19 +595,25 @@ def _assert_status_of_dataset(self, *, did: int, status: str):
not os.environ.get(openml.config.OPENML_TEST_SERVER_ADMIN_KEY_ENV_VAR),
reason="Test requires admin key. Set OPENML_TEST_SERVER_ADMIN_KEY environment variable.",
)
@pytest.mark.flaky
@pytest.mark.test_server
def test_data_status(self):
arff_file_path = (
self.static_cache_dir / "org" / "openml" / "test" / "datasets" / "2" / "dataset.arff"
)
dataset = OpenMLDataset(
f"{self._get_sentinel()}-UploadTestWithURL",
"anneal",
"test",
"ARFF",
data_format="arff",
version=1,
url="https://www.openml.org/data/download/61/dataset_61_iris.arff",
licence="public",
default_target_attribute="class",
data_file=arff_file_path,
)
dataset.publish()
TestBase._mark_entity_for_removal("data", dataset.id)
TestBase.logger.info(f"collected from {__file__.split('/')[-1]}: {dataset.id}")
TestBase._mark_entity_for_removal("data", dataset.dataset_id)
TestBase.logger.info(
f"collected from {__file__.split('/')[-1]}: {dataset.dataset_id}",
)
did = dataset.id

# admin key for test server (only admins can activate datasets.
Expand Down
Loading