diff --git a/.github/workflows/common_steps.yml b/.github/workflows/common_steps.yml deleted file mode 100644 index b27fbeb4..00000000 --- a/.github/workflows/common_steps.yml +++ /dev/null @@ -1,44 +0,0 @@ - -# Common step definitions to be included by other workflows -# This way we can centralize the package manager-specific steps - -# Poetry setup steps -poetry-setup: - - name: Install poetry - uses: abatilo/actions-poetry@v2 - - name: Setup a local virtual environment (if no poetry.toml file) - run: | - poetry config virtualenvs.create true --local - poetry config virtualenvs.in-project true --local - - uses: actions/cache@v3 - name: Define a cache for the virtual environment based on the dependencies lock file - with: - path: ./.venv - key: venv-${{ hashFiles('poetry.lock') }} - - name: Install the project dependencies - run: | - poetry install --with dev - -# UV setup steps -uv-setup: - - name: Install uv - run: pip install uv - - uses: actions/cache@v3 - name: Cache dependencies - with: - path: ~/.cache/uv - key: uv-${{ hashFiles('pyproject.toml') }} - - name: Install dependencies - run: | - uv venv - uv pip install -e ".[dev]" - -# Pixi setup steps -pixi-setup: - - name: Install pixi - uses: prefix-dev/setup-pixi@v0.4.1 - with: - pixi-version: v0.7.0 - - name: Install dependencies - run: pixi install - \ No newline at end of file diff --git a/.github/workflows/lint_and_docs.yaml b/.github/workflows/lint_and_docs.yaml index 100f82a1..03cdad94 100644 --- a/.github/workflows/lint_and_docs.yaml +++ b/.github/workflows/lint_and_docs.yaml @@ -1,6 +1,7 @@ name: Linting, Types and Docs Check -on: [push, pull_request] +on: + workflow_dispatch: # Manual trigger only - workflow disabled from auto-running jobs: check: @@ -11,10 +12,6 @@ jobs: actions: write contents: read steps: - - name: Cancel previous run - uses: styfle/cancel-workflow-action@0.11.0 - with: - access_token: ${{ github.token }} - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 @@ -40,8 +37,6 @@ jobs: run: uv run poe type-check - name: Docs run: uv run poe doc-build - - - name: Upload artifact uses: actions/upload-pages-artifact@v2 with: diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 5a3bd022..1b036c3f 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -10,10 +10,6 @@ jobs: matrix: python-version: ["3.11"] steps: - - name: Cancel previous run - uses: styfle/cancel-workflow-action@0.11.0 - with: - access_token: ${{ github.token }} - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 @@ -22,14 +18,14 @@ jobs: # Include the appropriate package manager steps based on the selection - - name: Setup and install dependencies with UV - uses: ./.github/workflows/common_steps.yml - with: - steps: uv-setup + - name: Install uv + run: curl -LsSf https://astral.sh/uv/install.sh | sh + - name: Create virtual environment + run: uv venv + - name: Install dependencies + run: uv pip install -e ".[dev]" - name: Test with pytest run: uv run poe test - - - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: diff --git a/.github/workflows/windows_mac_test.yml b/.github/workflows/windows_mac_test.yml deleted file mode 100644 index 0e20885e..00000000 --- a/.github/workflows/windows_mac_test.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Tests on Windows and MacOS - -on: [push, pull_request] - -jobs: - cpu-extra: - runs-on: ${{ matrix.os }} - if: "!contains(github.event.head_commit.message, 'ci skip')" - strategy: - matrix: - os: [macos-latest, windows-latest] - python-version: [3.11] - steps: - - name: Cancel previous run - uses: styfle/cancel-workflow-action@0.11.0 - with: - access_token: ${{ github.token }} - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - - # use uv package manager - - name: Install uv - run: pip install uv - - uses: actions/cache@v3 - name: Cache dependencies - with: - path: ~/.cache/uv - key: uv-${{ hashFiles('pyproject.toml') }} - - name: Install dependencies - run: | - uv venv - uv pip install -e ".[dev]" - - name: Test with pytest - run: uv run poe test-subset - diff --git a/pyproject.toml b/pyproject.toml index f1d20608..5b99a834 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,6 +27,7 @@ dependencies = [ "mcp>=1.5.0", "fastmcp>=0.4.1", "sensai-utils>=1.4.0", + "pydantic>=2.10.6", ] [project.license] diff --git a/test/serena/test_text_utils.py b/test/serena/test_text_utils.py index 763b711e..373e95ba 100644 --- a/test/serena/test_text_utils.py +++ b/test/serena/test_text_utils.py @@ -1,7 +1,8 @@ import re import pytest -from autobob.utils.text_utils import LineType, search_text + +from serena.text_utils import LineType, search_text class TestTextUtils: diff --git a/uv.lock b/uv.lock index f0623ecd..c4bfca3f 100644 --- a/uv.lock +++ b/uv.lock @@ -1271,11 +1271,11 @@ wheels = [ [[package]] name = "narwhals" -version = "1.31.0" +version = "1.32.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/36/fa/c2b6a4d5dbc4af15aa58c86920d5275a9c65142318179b246685069f57da/narwhals-1.31.0.tar.gz", hash = "sha256:333472e2562343dfdd27407ec9b5114a07c81d0416794e4ac6b703dd925c6a1a", size = 253463 } +sdist = { url = "https://files.pythonhosted.org/packages/c1/e5/aa97891440bf6bc4239e9b918d89fea58eb87dff1d8d14a69b45ef677e66/narwhals-1.32.0.tar.gz", hash = "sha256:bd0aa41434737adb4b26f8593f3559abc7d938730ece010fe727b58bc363580d", size = 258915 } wheels = [ - { url = "https://files.pythonhosted.org/packages/f9/c0/fb39bd876ea2fd9509343d643690cd2f9715e6a77271e7c7b26f1eea70c1/narwhals-1.31.0-py3-none-any.whl", hash = "sha256:2a7b79bb5f511055c4c0142121fc0d4171ea171458e12d44dbd9c8fc6488e997", size = 313124 }, + { url = "https://files.pythonhosted.org/packages/e9/96/79a6168dc7a5098066e097c01a45d01608c8df6552dfb92a2676ce623186/narwhals-1.32.0-py3-none-any.whl", hash = "sha256:8bdbf3f76155887412eea04b0b06303856ac1aa3d9e8bda5b5e54612855fa560", size = 320073 }, ] [[package]] @@ -2082,6 +2082,7 @@ dependencies = [ { name = "overrides" }, { name = "pandas" }, { name = "plotly" }, + { name = "pydantic" }, { name = "pyright" }, { name = "python-dotenv" }, { name = "requests" }, @@ -2132,6 +2133,7 @@ requires-dist = [ { name = "plotly", specifier = ">=5.19.0" }, { name = "poethepoet", marker = "extra == 'dev'", specifier = ">=0.20.0" }, { name = "pre-commit", marker = "extra == 'dev'", specifier = ">=3.3.3" }, + { name = "pydantic", specifier = ">=2.10.6" }, { name = "pyright", specifier = ">=1.1.396,<2" }, { name = "pytest", marker = "extra == 'dev'", specifier = ">=8.0.2" }, { name = "pytest-cov", marker = "extra == 'dev'" }, @@ -2154,11 +2156,11 @@ provides-extras = ["dev"] [[package]] name = "setuptools" -version = "77.0.3" +version = "78.0.1" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/81/ed/7101d53811fd359333583330ff976e5177c5e871ca8b909d1d6c30553aa3/setuptools-77.0.3.tar.gz", hash = "sha256:583b361c8da8de57403743e756609670de6fb2345920e36dc5c2d914c319c945", size = 1367236 } +sdist = { url = "https://files.pythonhosted.org/packages/47/42/55a8f24bd1287676b23e56a6d94e416be390ca6e0ee30fa46a782d038f80/setuptools-78.0.1.tar.gz", hash = "sha256:4321d2dc2157b976dee03e1037c9f2bc5fea503c0c47d3c9458e0e8e49e659ce", size = 1367415 } wheels = [ - { url = "https://files.pythonhosted.org/packages/a9/07/99f2cefae815c66eb23148f15d79ec055429c38fa8986edcc712ab5f3223/setuptools-77.0.3-py3-none-any.whl", hash = "sha256:67122e78221da5cf550ddd04cf8742c8fe12094483749a792d56cd669d6cf58c", size = 1255678 }, + { url = "https://files.pythonhosted.org/packages/42/c8/3faed884acdb2c1f2eb353cbacdd1ee4943de89a199d1f622ebefb6170e5/setuptools-78.0.1-py3-none-any.whl", hash = "sha256:1cc9b32ee94f93224d6c80193cbb768004667aa2f2732a473d6949b0236c1d4e", size = 1255630 }, ] [[package]]