Skip to content

Commit

Permalink
Db/add runs (#138)
Browse files Browse the repository at this point in the history
* Fix wrong call - there should be one or more descriptions

* Accommodate new test database state

* Also print images
  • Loading branch information
PGijsbers authored Jan 8, 2024
1 parent 99b5376 commit 7b4d9f6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- run: |
{ docker compose build python-api; docker compose up -d python-api; } &
docker compose up -d --wait php-api
- run: docker container ls
- run: docker container ls && docker image ls
- run: docker exec python-api python -m pytest -xv -m "php"
python:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion src/database/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def get_latest_dataset_description(
),
parameters={"dataset_id": dataset_id},
)
return row.one_or_none()
return row.first()


def get_latest_status_update(dataset_id: int, connection: Connection) -> Row | None:
Expand Down
2 changes: 1 addition & 1 deletion tests/routers/openml/datasets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_get_dataset(py_api: TestClient) -> None:
"visibility": "public",
"minio_url": "https://openml1.win.tue.nl/dataset1/dataset_1.pq",
"status": "in_preparation",
"processing_date": "2023-10-12T09:08:38",
"processing_date": "2024-01-04T10:13:59",
"md5_checksum": "4eaed8b6ec9d8211024b6c089b064761",
"row_id_attribute": [],
"ignore_attribute": [],
Expand Down
4 changes: 3 additions & 1 deletion tests/routers/openml/qualities_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import http.client

import deepdiff
import httpx
import pytest
from sqlalchemy import Connection, text
Expand Down Expand Up @@ -274,7 +275,8 @@ def test_get_quality(py_api: TestClient) -> None:
{"name": "kNN1NErrRate", "value": 0.06347438752783964},
{"name": "kNN1NKappa", "value": 0.8261102938928316},
]
assert response.json() == expected
difference = deepdiff.DeepDiff(expected, response.json(), ignore_order=True)
assert not difference


@pytest.mark.php()
Expand Down

0 comments on commit 7b4d9f6

Please sign in to comment.