Skip to content

Bump version to 0.2.0 to reflect recent updates and improvements.#2

Merged
regmibijay merged 1 commit intomasterfrom
feat/cpu-only-instructions
Sep 21, 2025
Merged

Bump version to 0.2.0 to reflect recent updates and improvements.#2
regmibijay merged 1 commit intomasterfrom
feat/cpu-only-instructions

Conversation

@regmibijay
Copy link
Owner

  • add cpu only flag
  • update documentation to reflect these changes
  • update workflow checks

@regmibijay regmibijay requested a review from Copilot September 21, 2025 09:33
@regmibijay regmibijay added documentation Improvements or additions to documentation enhancement New feature or request labels Sep 21, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Bumps the package version to 0.2.0, introduces a CPU-only install option, and migrates installation/docs/CI workflows from pip to uv.

  • Add a [project.optional-dependencies] cpu extra and uv index config for PyTorch CPU wheels
  • Update installation docs and README to prefer uv and document CPU-only installation
  • Switch CI workflows to use uv for builds/docs; raise coverage threshold

Reviewed Changes

Copilot reviewed 9 out of 10 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
yarp/init.py Version bumped to 0.2.0 to reflect new features/docs/workflow changes
pyproject.toml Adds cpu extra, uv index settings, tweaks dependencies and coverage threshold
docs/source/installation.rst Migrates install instructions to uv; adds CPU-only section
docs/source/index.rst Updates quick install snippet to uv
docs/README.md Updates docs build instructions to uv
README.md Migrates install/dev workflow examples to uv; adds CPU-only guidance
CONTRIBUTING.md Updates contribution workflow to uv; clarifies pip as legacy
.github/workflows/pip_package.yml Uses uv build instead of python -m build
.github/workflows/docs.yml Builds docs via uv and uv-run

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +40 to +48
cpu = [
"markupsafe==2.1.5",
"torch==2.8.0+cpu",
"annoy>=1.17.3",
"levenshtein>=0.27.1",
"numpy<=1.26.4",
"pydantic>=2.11.9",
"sentence-transformers>=5.1.0",
]
Copy link

Copilot AI Sep 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pinning torch to a +cpu local build will fail on platforms where that wheel is not published (e.g., macOS typically ships CPU-only wheels without a +cpu local tag). Use platform markers to select the appropriate variant and avoid installation failures.

Copilot uses AI. Check for mistakes.
Comment on lines +41 to +47
"markupsafe==2.1.5",
"torch==2.8.0+cpu",
"annoy>=1.17.3",
"levenshtein>=0.27.1",
"numpy<=1.26.4",
"pydantic>=2.11.9",
"sentence-transformers>=5.1.0",
Copy link

Copilot AI Sep 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cpu extra duplicates the base dependencies, which increases drift risk and can create conflicting constraints. Keep the extra minimal by only adding the torch CPU constraint, letting the base [project.dependencies] supply the rest.

Suggested change
"markupsafe==2.1.5",
"torch==2.8.0+cpu",
"annoy>=1.17.3",
"levenshtein>=0.27.1",
"numpy<=1.26.4",
"pydantic>=2.11.9",
"sentence-transformers>=5.1.0",
"torch==2.8.0+cpu",

Copilot uses AI. Check for mistakes.
python -m pip install --upgrade pip
pip install -e .
pip install sphinx>=7.1.0 sphinx-rtd-theme>=2.0.0
uv sync --group docs
Copy link

Copilot AI Sep 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uv sync --group docs installs a dependency group, but no dependency-groups.docs is defined. If docs are declared under [project.optional-dependencies], use uv sync --extra docs (or define [tool.uv.dependency-groups.docs]).

Suggested change
uv sync --group docs
uv sync --extra docs

Copilot uses AI. Check for mistakes.

```bash
pip install -e .[docs]
uv sync --group docs
Copy link

Copilot AI Sep 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should target the extras defined under [project.optional-dependencies]. Replace with uv sync --extra docs (unless you define a dependency group named docs).

Suggested change
uv sync --group docs
uv sync --extra docs

Copilot uses AI. Check for mistakes.
uv sync --dev

# For CPU-only development environments (optional)
# uv sync --dev --group cpu
Copy link

Copilot AI Sep 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flag --group targets dependency groups, not extras. To install the cpu extra during dev, use uv sync --dev --extra cpu (or define a dependency group named cpu explicitly).

Suggested change
# uv sync --dev --group cpu
# uv sync --dev --extra cpu

Copilot uses AI. Check for mistakes.
Comment on lines +25 to +29
uv add python-yarp[cpu]

This option is ideal for:

* CPU-only environments
Copy link

Copilot AI Sep 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installing the +cpu PyTorch wheels typically requires the PyTorch CPU index. Update the example to include the extra index (or document configuring it in the user's project), e.g.: uv add --extra-index-url https://download.pytorch.org/whl/cpu python-yarp[cpu]. Also note platform nuances (macOS wheels usually don't use a +cpu local tag).

Suggested change
uv add python-yarp[cpu]
This option is ideal for:
* CPU-only environments
uv add --extra-index-url https://download.pytorch.org/whl/cpu python-yarp[cpu]
.. note::
On macOS, the extra index is usually not required; you can use ``uv add python-yarp[cpu]``. On Linux and Windows, the extra index ensures the correct PyTorch CPU-only wheel is installed.
This option is ideal for:

Copilot uses AI. Check for mistakes.
@regmibijay regmibijay merged commit 495d75f into master Sep 21, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant