From 221f1eba10b6032436a39be0cfef5e070b8b9cb4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 27 Nov 2025 06:16:33 +0000 Subject: [PATCH 1/7] Initial plan From 4dd00880231ea152db4122c254a7681aa87aff3b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 27 Nov 2025 06:19:22 +0000 Subject: [PATCH 2/7] Replace pip with uv in documentation and workflows Co-authored-by: hzhangxyz <11623447+hzhangxyz@users.noreply.github.com> --- .github/workflows/docs.yml | 10 +++++----- .github/workflows/example.yml | 8 ++++---- .github/workflows/pytest.yml | 16 ++++++++-------- README.md | 6 +++--- docs/examples/basic.md | 2 +- docs/getting-started/installation.md | 14 +++++++------- 6 files changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ebf89b2..6cdd3db 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,13 +17,13 @@ jobs: - name: recovery tag information run: git fetch --tags --force - - uses: actions/setup-python@v6 + - uses: astral-sh/setup-uv@v7 with: python-version: '3.14' - cache: 'pip' + enable-cache: true - name: install dependencies - run: pip install '.[docs]' + run: uv sync --locked --all-extras --dev - name: configure git run: | @@ -31,7 +31,7 @@ jobs: git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" - name: build docs - run: mike deploy --push --update-aliases --alias-type=redirect ${GITHUB_REF#refs/tags/} latest + run: uv run mike deploy --push --update-aliases --alias-type=redirect ${GITHUB_REF#refs/tags/} latest - name: set default - run: mike set-default --push latest + run: uv run mike set-default --push latest diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml index 55aa703..d3f5c0a 100644 --- a/.github/workflows/example.yml +++ b/.github/workflows/example.yml @@ -42,16 +42,16 @@ jobs: steps: - uses: actions/checkout@v6 - - uses: actions/setup-python@v6 + - uses: astral-sh/setup-uv@v7 with: python-version: ${{ matrix.python-version }} - cache: 'pip' + enable-cache: true - name: build - run: pip install . + run: uv sync --locked --all-extras --dev - name: run - run: python examples/main.py + run: uv run python examples/main.py javascript: runs-on: ubuntu-latest diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 8a2cb40..903d115 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -21,16 +21,16 @@ jobs: steps: - uses: actions/checkout@v6 - - uses: actions/setup-python@v6 + - uses: astral-sh/setup-uv@v7 with: python-version: ${{ matrix.python-version }} - cache: 'pip' + enable-cache: true - name: dependencies - run: pip install '.[dev]' + run: uv sync --locked --all-extras --dev - name: pytest - run: pytest --cov=pyds + run: uv run pytest --cov=pyds wheels: runs-on: ${{ matrix.os }} @@ -49,16 +49,16 @@ jobs: - name: recovery tag information run: git fetch --tags --force - - uses: actions/setup-python@v6 + - uses: astral-sh/setup-uv@v7 with: python-version: ${{ env.PYTHON_LATEST_VERSION }} - cache: 'pip' + enable-cache: true - name: install cibuildwheel - run: pip install cibuildwheel + run: uv pip install cibuildwheel - name: build wheels - run: python -m cibuildwheel + run: uv run cibuildwheel - uses: actions/upload-artifact@v5 with: diff --git a/README.md b/README.md index 0c8d000..251aee6 100644 --- a/README.md +++ b/README.md @@ -30,12 +30,12 @@ npm install atsds The package includes WebAssembly binaries and TypeScript type definitions. -### Python (pip) +### Python (uv) The Python package wraps the C++ core via pybind11. ```bash -pip install apyds +uv pip install apyds ``` Requires Python 3.10-3.14. @@ -288,7 +288,7 @@ npm install npm run build # Build Python package -pip install -e ".[dev]" +uv pip install -e ".[dev]" # Build C++ library cmake -B build diff --git a/docs/examples/basic.md b/docs/examples/basic.md index 64960d5..ed19bba 100644 --- a/docs/examples/basic.md +++ b/docs/examples/basic.md @@ -146,7 +146,7 @@ Example files are provided in the repository under `examples/`: ### Python ```bash -pip install apyds +uv pip install apyds python examples/main.py ``` diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 2c33b0b..a4b377c 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -38,7 +38,7 @@ The package works in browsers that support WebAssembly: The Python package `apyds` wraps the C++ core via pybind11. ```bash -pip install apyds +uv pip install apyds ``` ### Requirements @@ -51,9 +51,9 @@ pip install apyds It's recommended to use a virtual environment: ```bash -python -m venv venv -source venv/bin/activate # On Windows: venv\Scripts\activate -pip install apyds +uv venv +source .venv/bin/activate # On Windows: .venv\Scripts\activate +uv pip install apyds ``` ### Development Installation @@ -63,7 +63,7 @@ To install from source with development dependencies: ```bash git clone https://github.com/USTC-KnowledgeComputingLab/ds.git cd ds -pip install -e ".[dev]" +uv pip install -e ".[dev]" ``` ## C++ @@ -112,7 +112,7 @@ npm run build ### Python ```bash -pip install -e ".[dev]" +uv pip install -e ".[dev]" ``` ### C++ @@ -135,7 +135,7 @@ npm test ### Python Tests ```bash -pip install pytest +uv pip install pytest pytest ``` From 1838e38ddd3e1f1dd07de702d837c1be272681f9 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 27 Nov 2025 06:20:34 +0000 Subject: [PATCH 3/7] Optimize uv sync commands for specific workflow needs Co-authored-by: hzhangxyz <11623447+hzhangxyz@users.noreply.github.com> --- .github/workflows/docs.yml | 2 +- .github/workflows/example.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 6cdd3db..838de40 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -23,7 +23,7 @@ jobs: enable-cache: true - name: install dependencies - run: uv sync --locked --all-extras --dev + run: uv sync --locked --extra docs - name: configure git run: | diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml index d3f5c0a..413ccc6 100644 --- a/.github/workflows/example.yml +++ b/.github/workflows/example.yml @@ -48,7 +48,7 @@ jobs: enable-cache: true - name: build - run: uv sync --locked --all-extras --dev + run: uv sync --locked - name: run run: uv run python examples/main.py From f2163de4d4ab9bde0ec0a4b5312f064c48d41cc5 Mon Sep 17 00:00:00 2001 From: Hao Zhang Date: Thu, 27 Nov 2025 16:01:32 +0800 Subject: [PATCH 4/7] Update README.md. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 251aee6..e271e26 100644 --- a/README.md +++ b/README.md @@ -30,12 +30,12 @@ npm install atsds The package includes WebAssembly binaries and TypeScript type definitions. -### Python (uv) +### Python (pip) The Python package wraps the C++ core via pybind11. ```bash -uv pip install apyds +pip install apyds ``` Requires Python 3.10-3.14. @@ -288,7 +288,7 @@ npm install npm run build # Build Python package -uv pip install -e ".[dev]" +uv sync --extra dev # Build C++ library cmake -B build From 1378a42537e5dcd4b585004a51d086ec2a23ffe4 Mon Sep 17 00:00:00 2001 From: Hao Zhang Date: Thu, 27 Nov 2025 16:05:18 +0800 Subject: [PATCH 5/7] Update basic.md. --- docs/examples/basic.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/examples/basic.md b/docs/examples/basic.md index ed19bba..64960d5 100644 --- a/docs/examples/basic.md +++ b/docs/examples/basic.md @@ -146,7 +146,7 @@ Example files are provided in the repository under `examples/`: ### Python ```bash -uv pip install apyds +pip install apyds python examples/main.py ``` From b6ed6e1ddb7a7dd08b21ddbbfb7bee38158e5558 Mon Sep 17 00:00:00 2001 From: Hao Zhang Date: Thu, 27 Nov 2025 16:06:24 +0800 Subject: [PATCH 6/7] Update installation.md. --- docs/getting-started/installation.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index a4b377c..5549eb3 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -38,7 +38,7 @@ The package works in browsers that support WebAssembly: The Python package `apyds` wraps the C++ core via pybind11. ```bash -uv pip install apyds +pip install apyds ``` ### Requirements @@ -51,9 +51,9 @@ uv pip install apyds It's recommended to use a virtual environment: ```bash -uv venv -source .venv/bin/activate # On Windows: .venv\Scripts\activate -uv pip install apyds +python -m venv venv +source venv/bin/activate # On Windows: venv\Scripts\activate +pip install apyds ``` ### Development Installation @@ -63,7 +63,7 @@ To install from source with development dependencies: ```bash git clone https://github.com/USTC-KnowledgeComputingLab/ds.git cd ds -uv pip install -e ".[dev]" +uv sync --extra dev ``` ## C++ @@ -112,7 +112,7 @@ npm run build ### Python ```bash -uv pip install -e ".[dev]" +uv sync --extra dev ``` ### C++ @@ -135,8 +135,7 @@ npm test ### Python Tests ```bash -uv pip install pytest -pytest +uv run pytest ``` ### C++ Tests From dde51eee7e7c1378443ee20b8b34dfaa7315a92e Mon Sep 17 00:00:00 2001 From: Hao Zhang Date: Thu, 27 Nov 2025 16:18:35 +0800 Subject: [PATCH 7/7] Update actions. --- .github/workflows/pytest.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 903d115..f0e95e5 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -27,7 +27,7 @@ jobs: enable-cache: true - name: dependencies - run: uv sync --locked --all-extras --dev + run: uv sync --locked --extra dev - name: pytest run: uv run pytest --cov=pyds @@ -49,16 +49,16 @@ jobs: - name: recovery tag information run: git fetch --tags --force - - uses: astral-sh/setup-uv@v7 + - uses: actions/setup-python@v6 with: python-version: ${{ env.PYTHON_LATEST_VERSION }} - enable-cache: true + cache: 'pip' - name: install cibuildwheel - run: uv pip install cibuildwheel + run: pip install cibuildwheel - name: build wheels - run: uv run cibuildwheel + run: python -m cibuildwheel - uses: actions/upload-artifact@v5 with: