Skip to content

Commit 49789a7

Browse files
committed
merged latest changes related to testing
2 parents 5d229c7 + fab1a15 commit 49789a7

59 files changed

Lines changed: 1669 additions & 2019 deletions

Some content is hidden

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

.github/workflows/test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ jobs:
114114
fi
115115
116116
if [ "${{ matrix.sklearn-only }}" = "true" ]; then
117-
marks="sklearn and not production and not uses_test_server"
117+
marks="sklearn and not production_server and not test_server"
118118
else
119-
marks="not production and not uses_test_server"
119+
marks="not production_server and not test_server"
120120
fi
121121
122122
pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
@@ -131,9 +131,9 @@ jobs:
131131
fi
132132
133133
if [ "${{ matrix.sklearn-only }}" = "true" ]; then
134-
marks="sklearn and production and not uses_test_server"
134+
marks="sklearn and production_server and not test_server"
135135
else
136-
marks="production and not uses_test_server"
136+
marks="production_server and not test_server"
137137
fi
138138
139139
pytest -n 4 --durations=20 --dist load -sv $codecov -o log_cli=true -m "$marks"
@@ -143,7 +143,7 @@ jobs:
143143
env:
144144
OPENML_TEST_SERVER_ADMIN_KEY: ${{ secrets.OPENML_TEST_SERVER_ADMIN_KEY }}
145145
run: | # we need a separate step because of the bash-specific if-statement in the previous one.
146-
pytest -n 4 --durations=20 --dist load -sv --reruns 5 --reruns-delay 1 -m "not uses_test_server"
146+
pytest -n 4 --durations=20 --dist load -sv --reruns 5 --reruns-delay 1 -m "not test_server"
147147
148148
- name: Check for files left behind by test
149149
if: matrix.os != 'windows-latest' && always()

docs/developer_setup.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ The OpenML Python SDK utilizes `pytest` markers to categorize tests based on dep
170170
| Marker | Description |
171171
|-------------------|-----------------------------------------------------------------------------|
172172
| `sklearn` | Tests requiring `scikit-learn`. Skipped if the library is missing. |
173-
| `production` | Tests that interact with the live OpenML server (real API calls). |
174-
| `uses_test_server` | Tests requiring the OpenML test server environment. |
173+
| `production_server`| Tests that interact with the live OpenML server (real API calls). |
174+
| `test_server` | Tests requiring the OpenML test server environment. |
175175

176176
### Execution Examples
177177

@@ -190,7 +190,7 @@ pytest -m sklearn
190190
Exclude production tests (local only):
191191

192192
```bash
193-
pytest -m "not production"
193+
pytest -m "not production_server"
194194
```
195195

196196
### Admin Privilege Tests

openml/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
# License: BSD 3-Clause
1919
from __future__ import annotations
2020

21+
from typing import TYPE_CHECKING
22+
2123
from . import (
2224
_api_calls,
23-
config,
25+
_config as _config_module,
2426
datasets,
2527
evaluations,
2628
exceptions,
@@ -50,6 +52,11 @@
5052
OpenMLTask,
5153
)
5254

55+
if TYPE_CHECKING:
56+
from ._config import OpenMLConfigManager
57+
58+
config: OpenMLConfigManager = _config_module.__config
59+
5360

5461
def populate_cache(
5562
task_ids: list[int] | None = None,

openml/_api/__init__.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,13 @@
4040
from .setup import (
4141
APIBackend,
4242
APIBackendBuilder,
43-
APIConfig,
44-
Config,
45-
ConnectionConfig,
4643
_backend,
4744
)
4845

4946
__all__ = [
5047
"API_REGISTRY",
5148
"APIBackend",
5249
"APIBackendBuilder",
53-
"APIConfig",
54-
"Config",
55-
"ConnectionConfig",
5650
"DatasetAPI",
5751
"DatasetV1API",
5852
"DatasetV2API",
@@ -66,15 +60,13 @@
6660
"EvaluationV1API",
6761
"EvaluationV2API",
6862
"FallbackProxy",
69-
"FallbackProxy",
7063
"FlowAPI",
7164
"FlowV1API",
7265
"FlowV2API",
7366
"HTTPCache",
7467
"HTTPClient",
7568
"MinIOClient",
7669
"ResourceAPI",
77-
"ResourceAPI",
7870
"ResourceV1API",
7971
"ResourceV2API",
8072
"RunAPI",

0 commit comments

Comments
 (0)