Skip to content

Commit

Permalink
adjust to use poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
krishanbhasin-gc committed Sep 20, 2023
1 parent c632e37 commit 97dcc87
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 168 deletions.
21 changes: 21 additions & 0 deletions runtimes/catboost/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[tool.poetry]
name = "mlserver-catboost"
version = "1.4.0.dev3"
description = "Catboost runtime for MLServer"
authors = ["Seldon Technologies Ltd. <[email protected]>"]
license = "Apache-2.0"
readme = "README.md"
packages = [{include = "mlserver_catboost"}]

[tool.poetry.dependencies]
python = "^3.8.1,<3.12"
scikit-learn = "*"
joblib = "*"
mlserver = "*"

[tool.poetry.group.dev.dependencies]
mlserver = {path = "../..", develop = true}

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
43 changes: 0 additions & 43 deletions runtimes/catboost/setup.py

This file was deleted.

11 changes: 11 additions & 0 deletions runtimes/catboost/tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[tox]
isolated_build = true

[testenv]
allowlist_externals = poetry
commands_pre =
poetry install --sync --no-root
poetry install -C {toxinidir}/../../
commands =
python -m pytest {posargs} \
{toxinidir}/tests
125 changes: 0 additions & 125 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,128 +16,3 @@ exclude =
./**/dist
./venv
./**/venv

[mypy]
ignore_missing_imports = True
plugins = pydantic.mypy

[tool:pytest]
asyncio_mode = auto

[tox:tox]
basepython = py3
envlist =
py3
all
sklearn
xgboost
lightgbm
catboost
mlflow
alibiexplain
alibidetect
all-runtimes

[testenv]
deps = -r{toxinidir}/requirements/dev.txt
commands = pytest {posargs} {toxinidir}/tests

[testenv:all]
deps =
-e{toxinidir}[all]
-r{toxinidir}/requirements/dev.txt
commands = pytest {posargs} {toxinidir}/tests

[testenv:sklearn]
deps =
-e{toxinidir}
-e{toxinidir}/runtimes/sklearn
-r{toxinidir}/requirements/dev.txt
commands = pytest {posargs} {toxinidir}/runtimes/sklearn

[testenv:xgboost]
deps =
-e{toxinidir}
-e{toxinidir}/runtimes/xgboost
-r{toxinidir}/requirements/dev.txt
commands = pytest {posargs} {toxinidir}/runtimes/xgboost

[testenv:lightgbm]
deps =
-e{toxinidir}
-e{toxinidir}/runtimes/lightgbm
-r{toxinidir}/requirements/dev.txt
commands = pytest {posargs} {toxinidir}/runtimes/lightgbm

[testenv:catboost]
deps =
-e{toxinidir}
-e{toxinidir}/runtimes/catboost
-r{toxinidir}/requirements/dev.txt
commands = pytest {posargs} {toxinidir}/runtimes/catboost

[testenv:mlflow]
deps =
-e{toxinidir}
-e{toxinidir}/runtimes/mlflow
-r{toxinidir}/requirements/dev.txt
-r{toxinidir}/runtimes/mlflow/requirements-dev.txt
commands = pytest {posargs} {toxinidir}/runtimes/mlflow

[testenv:alibiexplain]
deps =
-e{toxinidir}/runtimes/alibi-explain
-e{toxinidir}
-r{toxinidir}/requirements/dev.txt
-r{toxinidir}/runtimes/alibi-explain/requirements-dev.txt
commands = pytest {posargs} {toxinidir}/runtimes/alibi-explain

[testenv:alibidetect]
deps =
-e{toxinidir}/runtimes/alibi-detect
-e{toxinidir}
-r{toxinidir}/requirements/dev.txt
commands = pytest {posargs} {toxinidir}/runtimes/alibi-detect

[testenv:all-runtimes]
deps =
-e{toxinidir}/runtimes/alibi-explain
-e{toxinidir}/runtimes/alibi-detect
-e{toxinidir}/runtimes/sklearn
-e{toxinidir}/runtimes/xgboost
-e{toxinidir}/runtimes/mllib
-e{toxinidir}/runtimes/lightgbm
-e{toxinidir}/runtimes/catboost
-e{toxinidir}/runtimes/mlflow
-e{toxinidir}[all]
-r{toxinidir}/requirements/dev.txt
-r{toxinidir}/runtimes/mlflow/requirements-dev.txt
-r{toxinidir}/runtimes/alibi-explain/requirements-dev.txt
commands = pytest {posargs}

[testenv:licenses]
deps =
-e{toxinidir}[all]
-e{toxinidir}/runtimes/sklearn
-e{toxinidir}/runtimes/xgboost
-e{toxinidir}/runtimes/mllib
-e{toxinidir}/runtimes/lightgbm
-e{toxinidir}/runtimes/catboost
-e{toxinidir}/runtimes/mlflow
-e{toxinidir}/runtimes/alibi-explain
-e{toxinidir}/runtimes/alibi-detect
-r{toxinidir}/runtimes/mlflow/requirements-dev.txt
-r{toxinidir}/runtimes/alibi-explain/requirements-dev.txt
-r{toxinidir}/requirements/dev.txt
-r{toxinidir}/requirements/docker.txt
commands =
pip-licenses \
--from=mixed \
--format=csv \
--output-file=./licenses/license_info.csv
pip-licenses \
--from=mixed \
--format=plain-vertical \
--with-license-file \
--no-license-path \
--output-file=./licenses/license.txt

0 comments on commit 97dcc87

Please sign in to comment.