Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,37 +0,0 @@
name: PR tests
on:
pull_request:
workflow_dispatch:


jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ]
steps:
- uses: actions/checkout@v4
- run: pipx install poetry
- run: poetry check
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: poetry

- run: poetry install --all-extras
- run: poetry run pytest
continue-on-error: true
check-docs-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install poetry
- run: poetry check
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: poetry
- run: make
- run: make doc
23 changes: 14 additions & 9 deletions .github/workflows/code-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,24 @@ on:
pull_request:
workflow_dispatch:
jobs:
lint:
name: Code Check
pre-commit-hooks:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- run: pipx install poetry
- uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
cache: poetry


- run: make
enable-cache: true
- run: uv python install 3.12
- run: make check

typecheck:
name: Types Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- run: uv python install 3.12
- run: make mypy
10 changes: 4 additions & 6 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ on:
workflow_dispatch:
jobs:
upload-coverage-report:
name: Upload Report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install poetry
- uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v6
with:
python-version: '3.11'
cache: poetry

- run: make
enable-cache: true
- run: uv python install 3.12
- run: make coverage
- uses: codecov/codecov-action@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ jobs:
with:
enable-cache: true
- run: uv python install 3.11
- run: uv sync --all-extras --all-groups --frozen
- run: make
16 changes: 6 additions & 10 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Publish docs
name: Doc-Test
on:
release:
types: [ published ]
pull_request:
workflow_dispatch:

permissions:
Expand All @@ -16,14 +15,11 @@ jobs:

steps:
- uses: actions/checkout@v4
- run: pipx install poetry
- run: poetry check
- uses: actions/setup-python@v5
- uses: astral-sh/setup-uv@v6
with:
python-version: '3.11'
cache: poetry

- run: make
enable-cache: true
- run: uv python install 3.12
- run: make install-docs
- run: make doc

- name: Deploy
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install poetry
- uses: actions/setup-python@v5
- run: poetry install --all-extras
- run: poetry run pytest
- run: poetry version ${{ github.ref_name }}
- run: poetry build
- run: poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }}
- run: poetry publish
- uses: astral-sh/setup-uv@v6
- run: uv python install 3.11
- run: make
- run: make test
- run: uv build
- run: uv publish --token ${{ secrets.PYPI_API_TOKEN }}
41 changes: 27 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,35 @@
default: install

install:
poetry install --all-extras --all-groups
# poetry run pre-commit autoupdate
poetry run pre-commit install
uv sync --all-extras --all-groups --frozen
uvx pre-commit install

test:
poetry run pytest
coverage:
poetry run pytest --cov=ml_orchestrator --cov-report=xml --junitxml=junit.xml -o junit_family=legacy
update:
uv lock
uvx pre-commit autoupdate
$(MAKE) install

cov:
poetry run pytest --cov=ml_orchestrator --cov-report=term-missing
test: install
uv run pytest

check:
poetry run pre-commit run --all-files
mypy:
poetry run mypy ml_orchestrator --config-file pyproject.toml
coverage: install
uv run pytest --cov=ml_orchestrator --cov-report=xml --junitxml=junit.xml -o junit_family=legacy

cov: install
uv run pytest --cov=ml_orchestrator --cov-report=term-missing

check: install
uvx pre-commit run --all-files

mypy: install
uv run mypy ml_orchestrator --config-file pyproject.toml

doctest: install-docs doc

install-docs:
uv sync --group docs --frozen --no-group dev

doc:
poetry run sphinx-build -M html docs/source docs/build/
uv run --no-sync sphinx-build -M html docs/source docs/build/ -W --keep-going --fresh-env

check-all: check test mypy doc
78 changes: 45 additions & 33 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
[tool.poetry]
[project]
name = "ml-orchestrator"
version = "0.1.0"
dynamic = ["version"]
description = "kubeflow extension"
authors = ["DanielAvdar <66269169+DanielAvdar@users.noreply.github.com>"]
license = "MIT"
authors = [
{ name = "DanielAvdar", email = "66269169+DanielAvdar@users.noreply.github.com" },
]
license = { text = "MIT" }
readme = "README.md"
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
Expand All @@ -15,42 +18,51 @@ classifiers = [
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Intended Audience :: Developers",
]
readme = "README.md"
packages = [
{ include = "ml_orchestrator", from = "." },
]

[tool.poetry.dependencies]
python = ">=3.9,<=3.13"
kfp = { version = ">=2.7.0", optional = true }
requires-python = ">=3.9,<3.14"

[tool.poetry.dev-dependencies]
pytest = ">=7.1.2"
hypothesis = ">=6.23.3"
pre-commit = ">=2.20.0"
pytest-cov = ">=4.0.0"
mypy = ">=0.991"
ruff = ">=0.3.1"
kfp = ">=2.7.0"
#sybil[pytest] ="*"
sybil = { version = ">=1.4.0", extras = ["pytest"] }
keywords = [
"python",
"machine learning",
"kubeflow"
]
dependencies = [
"kfp>=2.7.0",
]

[tool.poetry.extras]
editor = ["kfp"]
[dependency-groups]
dev = [
"pytest>=7.1.2",
"hypothesis>=6.23.3",
"pre-commit>=2.20.0",
"pytest-cov>=4.0.0",
"mypy>=0.991",
"ruff>=0.3.1",
"kfp>=2.7.0",
"sybil[pytest]>=1.4.0",
]
docs = [
"sphinx>=8.2.0; python_version >= '3.11'",
"sphinx>=7.0.0; python_version < '3.11'",
"sphinx-rtd-theme>=3.0.2",
]

[tool.hatch.build.targets.sdist]
only-include = ["ml_orchestrator", ]
source = "."

[tool.poetry.group.docs.dependencies]
#sphinx = ">=7.0.0"
sphinx = [
{ version = ">=8.2.0", markers = "python_version >= '3.11'" },
{ version = ">=7.0.0", markers = "python_version < '3.11'" }
]
[tool.hatch.build.targets.wheel]
only-include = ["ml_orchestrator", ]
source = "."

sphinx-rtd-theme = "^3.0.2"
[project.optional-dependencies]
editor = ["kfp>=2.7.0"]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
requires = ["hatchling", "uv-dynamic-versioning"]
build-backend = "hatchling.build"

[tool.hatch.version]
source = "uv-dynamic-versioning"

[tool.ruff]
line-length = 120
Expand Down
Loading
Loading