diff --git a/README.md b/README.md index 9738a347..870bbfb4 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ So far **linopy** is available on the PyPI repository ```bash -pip install linopy +uv pip install linopy ``` or on conda-forge @@ -159,10 +159,8 @@ Note that these do have to be installed by the user separately. To set up a local development environment for linopy and to run the same tests that are run in the CI, you can run: ```sh -python -m venv venv -source venv/bin/activate -pip install uv -uv pip install -e .[dev,solvers] +uv sync --extra dev --extra solvers +source .venv/bin/activate pytest ``` diff --git a/doc/contributing.rst b/doc/contributing.rst index 4bb9b60a..3b0ab94d 100644 --- a/doc/contributing.rst +++ b/doc/contributing.rst @@ -16,10 +16,8 @@ Development Setup For linting and formatting, we use `ruff `_ and run it via `pre-commit `_: -1. Installation ``conda install -c conda-forge pre-commit`` or ``pip install pre-commit`` -2. Usage: - * To automatically activate ``pre-commit`` on every ``git commit``: Run ``pre-commit install`` - * To manually run it: ``pre-commit run --all-files`` +* Install the git hook (once): ``pre-commit install`` +* Run manually: ``pre-commit run --all-files`` Running Tests ============= @@ -34,7 +32,7 @@ To run the test suite: .. code-block:: bash # Install development dependencies - pip install -e .[dev,solvers] + uv sync --extra dev --extra solvers # Run all tests pytest @@ -75,7 +73,7 @@ When working on performance-sensitive code, use the internal benchmark suite in .. code-block:: bash # Install benchmark dependencies - pip install -e ".[benchmarks]" + uv sync --extra benchmarks # Quick timing benchmarks pytest benchmarks/ --quick diff --git a/doc/gpu-acceleration.rst b/doc/gpu-acceleration.rst index a9048973..2498993a 100644 --- a/doc/gpu-acceleration.rst +++ b/doc/gpu-acceleration.rst @@ -24,7 +24,7 @@ To install it, you have to have the `CUDA Toolkit =0.1.2 + uv pip install "cupdlpx>=0.1.2" **Features:** diff --git a/doc/prerequisites.rst b/doc/prerequisites.rst index afb0e8a7..7a9e83bd 100644 --- a/doc/prerequisites.rst +++ b/doc/prerequisites.rst @@ -12,11 +12,11 @@ Before you start, make sure you have the following: Install Linopy -------------- -You can install Linopy using pip or conda. Here are the commands for each method: +You can install Linopy using uv or conda. Here are the commands for each method: .. code-block:: bash - pip install linopy + uv pip install linopy or @@ -51,15 +51,12 @@ required: .. code:: bash - pip install linopy[solvers] + uv pip install "linopy[solvers]" -We recommend installing the HiGHS solver, which is free, open source, and -fast across a wide range of problem sizes: - -.. code:: bash - - pip install highspy +We recommend the HiGHS solver, which is free, open source, and fast +across a wide range of problem sizes. It is included in both the +``solvers`` and ``dev`` extras. GPU-accelerated solvers @@ -73,7 +70,7 @@ For large-scale optimization problems, GPU-accelerated solvers can provide signi .. code:: bash - pip install cupdlpx + uv pip install cupdlpx For most of the other solvers, please click on the links to get further installation information. diff --git a/examples/solve-on-remote.ipynb b/examples/solve-on-remote.ipynb index 659cf9d6..73e6346b 100644 --- a/examples/solve-on-remote.ipynb +++ b/examples/solve-on-remote.ipynb @@ -22,7 +22,7 @@ "\n", "## What you need for SSH remote solving\n", "\n", - "* A running installation of paramiko on your local machine (`pip install paramiko`)\n", + "* The `remote` extra installed on your local machine (`uv pip install \"linopy[remote]\"`), which pulls in `paramiko`\n", "* A remote server with a working installation of linopy (e.g., in a conda environment)\n", "* SSH access to that machine\n", "\n", diff --git a/pyproject.toml b/pyproject.toml index f5fa135a..6ab66c94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,9 @@ oetc = [ "google-cloud-storage", "requests", ] +remote = [ + "paramiko", +] docs = [ "ipython==8.26.0", "numpydoc==1.7.0",