Skip to content

Commit

Permalink
fix conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoestq committed Oct 18, 2023
1 parent 36e1324 commit 6beadd1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
from worker.config import AppConfig
from worker.job_runners.config.duckdb_index_size import ConfigDuckdbIndexSizeJobRunner

from ..utils import REVISION_NAME


@pytest.fixture(autouse=True)
def prepare_and_clean_mongo(app_config: AppConfig) -> None:
Expand Down Expand Up @@ -57,6 +59,7 @@ def _get_job_runner(
upsert_response(
kind="dataset-config-names",
dataset=dataset,
dataset_git_revision=REVISION_NAME,
content={"config_names": [{"dataset": dataset, "config": config}]},
http_status=HTTPStatus.OK,
)
Expand Down Expand Up @@ -184,13 +187,15 @@ def test_compute(
upsert_response(
kind="config-split-names-from-streaming",
dataset=dataset,
dataset_git_revision=REVISION_NAME,
config=config,
content={"splits": splits},
http_status=upstream_status,
)
upsert_response(
kind="config-info",
dataset=dataset,
dataset_git_revision=REVISION_NAME,
config=config,
content={},
http_status=upstream_status,
Expand All @@ -199,6 +204,7 @@ def test_compute(
upsert_response(
kind="split-duckdb-index",
dataset=dataset,
dataset_git_revision=REVISION_NAME,
config=config,
split=upstream_content.get("split", "train"),
content=upstream_content,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from worker.config import AppConfig
from worker.job_runners.dataset.duckdb_index_size import DatasetDuckdbIndexSizeJobRunner

from ..utils import UpstreamResponse
from ..utils import REVISION_NAME, UpstreamResponse


@pytest.fixture(autouse=True)
Expand Down Expand Up @@ -81,6 +81,7 @@ def _get_job_runner(
UpstreamResponse(
kind="dataset-config-names",
dataset="dataset_ok",
dataset_git_revision=REVISION_NAME,
config=None,
http_status=HTTPStatus.OK,
content={
Expand All @@ -93,6 +94,7 @@ def _get_job_runner(
UpstreamResponse(
kind="config-duckdb-index-size",
dataset="dataset_ok",
dataset_git_revision=REVISION_NAME,
config="config_1",
http_status=HTTPStatus.OK,
content={
Expand Down Expand Up @@ -129,6 +131,7 @@ def _get_job_runner(
UpstreamResponse(
kind="config-duckdb-index-size",
dataset="dataset_ok",
dataset_git_revision=REVISION_NAME,
config="config_2",
http_status=HTTPStatus.OK,
content={
Expand Down Expand Up @@ -219,6 +222,7 @@ def _get_job_runner(
UpstreamResponse(
kind="dataset-config-names",
dataset="status_error",
dataset_git_revision=REVISION_NAME,
config=None,
http_status=HTTPStatus.NOT_FOUND,
content={"error": "error"},
Expand All @@ -234,6 +238,7 @@ def _get_job_runner(
UpstreamResponse(
kind="dataset-config-names",
dataset="format_error",
dataset_git_revision=REVISION_NAME,
config=None,
http_status=HTTPStatus.OK,
content={"not_dataset_info": "wrong_format"},
Expand Down
4 changes: 4 additions & 0 deletions services/worker/tests/job_runners/split/test_duckdb_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ def _get_job_runner(
upsert_response(
kind="dataset-config-names",
dataset=dataset,
dataset_git_revision=REVISION_NAME,
content={"config_names": [{"dataset": dataset, "config": config}]},
http_status=HTTPStatus.OK,
)
Expand Down Expand Up @@ -255,6 +256,7 @@ def _get_job_runner(

upsert_response(
kind="dataset-config-names",
dataset_git_revision=REVISION_NAME,
dataset=dataset,
content={"config_names": [{"dataset": dataset, "config": config}]},
http_status=HTTPStatus.OK,
Expand Down Expand Up @@ -351,6 +353,7 @@ def test_compute(
upsert_response(
"config-parquet-and-info",
dataset=dataset,
dataset_git_revision=REVISION_NAME,
config=config,
http_status=HTTPStatus.OK,
content=config_parquet_and_info,
Expand Down Expand Up @@ -380,6 +383,7 @@ def test_compute(
upsert_response(
"config-parquet-metadata",
dataset=dataset,
dataset_git_revision=REVISION_NAME,
config=config,
http_status=HTTPStatus.OK,
content=config_parquet_metadata,
Expand Down

0 comments on commit 6beadd1

Please sign in to comment.