diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 737ebdd7..e59919c9 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -24,12 +24,19 @@ jobs: with: python-version: "3.12" - - name: install uv - run: curl -LsSf https://astral.sh/uv/install.sh | sh - - - name: Build and publish to PyPI - env: - UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }} + - name: Install build dependencies run: | - uv build - uv publish + python -m pip install --upgrade pip + pip install build twine + + - name: Build package + run: python -m build + + - name: Check package with twine + run: twine check dist/* + + - name: Publish to PyPI + env: + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + run: twine upload dist/* diff --git a/cli/__init__.py b/cli/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/cli/pyproject.toml b/cli/pyproject.toml index 882453c6..a1c488c1 100644 --- a/cli/pyproject.toml +++ b/cli/pyproject.toml @@ -33,3 +33,8 @@ packages = ["planoai"] [tool.pytest.ini_options] addopts = ["-v"] + +[tool.uv] +dev-dependencies = [ + "pytest>=8.4.2", +] diff --git a/cli/test/test_config_generator.py b/cli/test/test_config_generator.py index 420987b5..037f499d 100644 --- a/cli/test/test_config_generator.py +++ b/cli/test/test_config_generator.py @@ -1,16 +1,8 @@ import json import pytest from unittest import mock -import sys from planoai.config_generator import validate_and_render_schema -# Patch sys.path to allow import from cli/ -import os - -sys.path.insert( - 0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "cli")) -) - @pytest.fixture(autouse=True) def cleanup_env(monkeypatch): diff --git a/cli/uv.lock b/cli/uv.lock index b14eae1a..7cc4147f 100644 --- a/cli/uv.lock +++ b/cli/uv.lock @@ -257,6 +257,11 @@ dev = [ { name = "pytest" }, ] +[package.dev-dependencies] +dev = [ + { name = "pytest" }, +] + [package.metadata] requires-dist = [ { name = "click", specifier = "<9.0.0,>=8.1.7" }, @@ -267,6 +272,9 @@ requires-dist = [ { name = "requests", specifier = "<3.0.0,>=2.31.0" }, ] +[package.metadata.requires-dev] +dev = [{ name = "pytest", specifier = ">=8.4.2" }] + [[package]] name = "pluggy" version = "1.6.0"