diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ebf89b2..838de40 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 --extra docs - 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..413ccc6 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 - 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..f0e95e5 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 --extra dev - name: pytest - run: pytest --cov=pyds + run: uv run pytest --cov=pyds wheels: runs-on: ${{ matrix.os }} diff --git a/README.md b/README.md index 0c8d000..e271e26 100644 --- a/README.md +++ b/README.md @@ -288,7 +288,7 @@ npm install npm run build # Build Python package -pip install -e ".[dev]" +uv sync --extra dev # Build C++ library cmake -B build diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 2c33b0b..5549eb3 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -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 sync --extra dev ``` ## C++ @@ -112,7 +112,7 @@ npm run build ### Python ```bash -pip install -e ".[dev]" +uv sync --extra dev ``` ### C++ @@ -135,8 +135,7 @@ npm test ### Python Tests ```bash -pip install pytest -pytest +uv run pytest ``` ### C++ Tests