Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust software tests for CrateDB #10

Merged
merged 11 commits into from
Sep 12, 2023
5 changes: 4 additions & 1 deletion mlflow_cratedb/patch/mlflow/db_types.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
CRATEDB = "crate"


def patch_dbtypes():
"""
Register CrateDB as available database type.
"""
import mlflow.store.db.db_types as db_types

db_types.CRATEDB = "crate"
db_types.CRATEDB = CRATEDB

if db_types.CRATEDB not in db_types.DATABASE_ENGINES:
db_types.DATABASE_ENGINES.append(db_types.CRATEDB)
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ repository = "https://github.com/crate-workbench/mlflow-cratedb"
[tool.black]
line-length = 120

extend-exclude = "tests/test_tracking.py"

[tool.isort]
profile = "black"
skip_glob = "**/site-packages/**"
Expand Down Expand Up @@ -162,6 +164,10 @@ select = [
"RET",
]

extend-exclude = [
]


[tool.ruff.per-file-ignores]
"tests/*" = ["S101"] # Use of `assert` detected

Expand Down
3 changes: 3 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from mlflow_cratedb import patch_all

patch_all()
Loading