[MNT] Replace Live Server Calls with Mocks in Unit Tests
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- リファクタリング
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
- 領域
- testing-qa
調査の方向性
Start by inspecting the listed test files for the production_server and test_server markers, then read openml._api_calls._send_request and its requests.Session usage. Replace the remote calls with mocks or patches in a focused test-file subtask, and run the affected pytest tests to confirm they pass without contacting the live server.
索引モデルが issue の本文から書いたものです。
説明
Several tests currently rely on direct connections to the live server (production/test), which can cause race conditions, server overload, and sporadic failures (see https://github.com/openml/openml-python/issues/1586). To ensure these remain true unit tests, they should use mocks/patches instead of the remote server.
Steps:
- Identify tests using the remote server, e.g., marked with
"production_server"or"test_server". - Mock or patch
requests.Sessionin tests relying onopenml._api_calls._send_request. Alternatively, higher-level mocking can be used to simplify implementation.
Affected test files (can be separate sub-tasks/PRs):
- test_datasets/test_dataset_functions.py
- test_datasets/test_dataset.py
- test_evaluations/test_evaluation_functions.py
- test_flows/test_flow_functions.py
- test_flows/test_flow.py
- test_openml/test_api_calls.py
- test_runs/test_run_functions.py
- test_runs/test_run.py
- test_runs/test_trace.py
- test_setups/test_setup_functions.py
- test_study/test_study_functions.py
- test_tasks/test_classification_task.py
- test_tasks/test_clustering_task.py
- test_tasks/test_learning_curve_task.py
- test_tasks/test_regression_task.py
- test_tasks/test_supervised_task.py
- test_tasks/test_task_functions.py
- test_tasks/test_task_methods.py
- test_tasks/test_task.py
- test_utils/test_utils.py
- 主要言語
- Python
- スター
- 361
- フォーク
- 296
- 平均マージ
- 2日 20時間
- マージ済み PR(30日)
- 2
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
openml/openml-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
openml/openml-python#1753 ·
メンテナーはふだん 1 日以内に返信
-
[ENH] list_estimation_procedures() should include the procedure IDs対応中かも @Jayant-kernel が 4 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
openml/openml-python#1750 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
openml/openml-python#1749 ·
メンテナーはふだん 1 日以内に返信
-
Documentation Good First Issue
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
openml/openml-python#1708 · コメント 8 件 ·
メンテナーはふだん 1 日以内に返信
-
Good First Issue module:Run testing
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
openml/openml-python#1646 · コメント 8 件 · リアクション 3 件 ·
メンテナーはふだん 1 日以内に返信
openml/openml-python の issue をすべて見る
似ている issue
-
customer-reported
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
Azure/azure-cli#34150 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
community-request
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
NVIDIA-NeMo/Curator#2464 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
WeblateOrg/translation-finder#1099 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
trezor/trezor-firmware#7997 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信