Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Feb 5, 2024
1 parent 178a7fc commit 1b81eb3
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/database/datasets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
""" Translation from https://github.com/openml/OpenML/blob/c19c9b99568c0fabb001e639ff6724b9a754bbc9/openml_OS/models/api/v1/Api_data.php#L707"""

import datetime
from collections import defaultdict
from typing import Iterable
Expand Down
1 change: 1 addition & 0 deletions src/routers/openml/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
We add separate endpoints for old-style JSON responses, so they don't clutter the schema of the
new API, and are easily removed later.
"""

import http.client
import re
from datetime import datetime
Expand Down
1 change: 1 addition & 0 deletions src/schemas/datasets/dcat.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
make public sector data better searchable across borders and sectors. This can be
achieved by the exchange of descriptions of data sets among data portals.
"""

import datetime
from abc import ABC
from typing import Literal, Union
Expand Down
11 changes: 6 additions & 5 deletions src/schemas/datasets/mldcat_ap.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
originally envisaged for the description of a machine learning process,
developed in collaboration with OpenML.
"""

from __future__ import annotations

from abc import ABC
Expand Down Expand Up @@ -77,9 +78,9 @@ class MD5Checksum(JsonLDObject):
"""

type_: Literal["Checksum"] = "Checksum"
algorithm: Literal[
algorithm: Literal["http://spdx.org/rdf/terms#checksumAlgorithm_md5"] = (
"http://spdx.org/rdf/terms#checksumAlgorithm_md5"
] = "http://spdx.org/rdf/terms#checksumAlgorithm_md5"
)
value: str = Field(serialization_alias="checksumValue")


Expand Down Expand Up @@ -216,9 +217,9 @@ class DataService(JsonLDObject):

class JsonLDGraph(BaseModel):
context: str | dict[str, HttpUrl] = Field(default_factory=dict, serialization_alias="@context")
graph: list[
Distribution | DataService | Dataset | Quality | Feature | Agent | MD5Checksum
] = Field(default_factory=list, serialization_alias="@graph")
graph: list[Distribution | DataService | Dataset | Quality | Feature | Agent | MD5Checksum] = (
Field(default_factory=list, serialization_alias="@graph")
)

model_config = {"populate_by_name": True, "extra": "forbid"}

Expand Down

0 comments on commit 1b81eb3

Please sign in to comment.