From 9966bef260930b6276db1974ccb43dc6bbe9f486 Mon Sep 17 00:00:00 2001 From: maxbalrog Date: Mon, 9 Feb 2026 14:30:23 +0100 Subject: [PATCH 1/3] add more package dependencies to pyproject.ml --- pyproject.toml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cd377fc..7a29fd1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,6 +6,7 @@ build-backend = "setuptools.build_meta" name = "quvac" version = "0.1.1" dependencies = [ + "pip>=25.0", "numpy", "scipy", "numexpr", @@ -42,13 +43,25 @@ optimization = [ ] plot = [ "matplotlib>=3.10.1", + "jupyterlab>=4.5.3", ] test = [ "pytest>=8.3.5", "pytest-cov>=6.1.0", ] +docs = [ + "astroid==3.3.8", + "sphinx>=8.2.1", + "jinja2>=3.1.0", + "furo==2024.8.6", + "sphinx-autoapi==3.6.0", + "sphinx-copybutton==0.5.2", +] +light = [ + "quvac[test,plot,docs]", +] all = [ - "quvac[test,plot,optimization]", + "quvac[test,plot,optimization,docs]", ] [project.urls] From 76959d6268aa735e6e904abe61537a9328292389 Mon Sep 17 00:00:00 2001 From: maxbalrog Date: Mon, 9 Feb 2026 14:49:42 +0100 Subject: [PATCH 2/3] update docs to include uv installation instructions --- README.md | 32 +++++++++++++++++++++++++++++++- docs/source/installation.rst | 36 +++++++++++++++++++++++++++++++++--- 2 files changed, 64 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c31cdb8..4bc9bda 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,10 @@ micromamba create -n quvac python=3.12 After cloning the git repository and entering it, choose relevant optional dependencies - `[test]` allows to run tests -- `[plot]` installs `matplotlib` +- `[plot]` installs `matplotlib` and `jupyterlab` +- `[docs]` installs `sphinx` and everything necessary for documentation generation - `[optimization]` installs Bayesian optimization package +- `[light]` is a shorthand for `[test,plot,docs]` To install all dependencies, run @@ -46,6 +48,34 @@ successfull (it takes some time). pytest ``` +### Using `uv` + +If you prefer using `uv` package manager then the installation follows similar steps. After cloning the git repository and entering +it, create the environment and install `quvac` + +```bash +uv venv +uv pip install .[light] +``` + +You can test the installation with + +```bash +uv run pytest +``` + +Launch the jupyterlab (e.g. tutorial notebooks) with + +```bash +uv run jupyter lab +``` + +Generate the documentation with + +```bash +uv run python -m sphinx -b html docs/source docs/build/html +``` + ## Contribution If you noticed a bug or have a feature request, open a new [issue](https://github.com/maxbalrog/quvac/issues). diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 2e7f732..e22ee3f 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -10,8 +10,10 @@ Is is recommended to create a separate Python environment for this package, e.g. After cloning the git repository and entering it, choose relevant optional dependencies - ``[test]`` allows to run tests -- ``[plot]`` installs ``matplotlib`` +- ``[plot]`` installs ``matplotlib`` and ``jupyterlab`` +- ``[docs]`` installs ``sphinx`` and everything necessary for documentation generation - ``[optimization]`` installs Bayesian optimization package +- ``[light]`` is a shorthand for ``[test,plot,docs]`` To install all dependencies, run @@ -26,7 +28,7 @@ To install all dependencies, run pip install .[test,plot] -After successfull installation with ``[all]`` or ``[test]`` option, run ``pytest`` to make sure the installation was +After successfull installation with ``[all]``, ``[light]`` or ``[test]`` options, run ``pytest`` to make sure the installation was successfull (it takes some time). .. code-block:: bash @@ -38,4 +40,32 @@ successfull (it takes some time). For minimal physics benchmarking run ``pytest -m 'not slow' -m 'benchmark'`` (files ``tests/bench_*.py``). - Benchmarks have a couple of time-demanding tests, they could be launched with ``pytest -m 'slow' -m 'benchmark'``. \ No newline at end of file + Benchmarks have a couple of time-demanding tests, they could be launched with ``pytest -m 'slow' -m 'benchmark'``. + + +Using ``uv`` +------------ + +If you prefer using ``uv`` package manager then the installation follows similar steps. After cloning the git repository and entering +it, create the environment and install ``quvac`` + +.. code-block:: bash + uv venv + uv pip install .[light] + +You can test the installation with + +.. code-block:: bash + uv run pytest + +Launch the jupyterlab (e.g. tutorial notebooks) with + +.. code-block:: bash + uv run jupyter lab + +Generate the documentation with + +.. code-block:: bash + uv run python -m sphinx -b html docs/source docs/build/html + + From e7ee7417782aed73892c9ee75ec1de5719f83e06 Mon Sep 17 00:00:00 2001 From: maxbalrog Date: Mon, 9 Feb 2026 14:53:12 +0100 Subject: [PATCH 3/3] correct spacing in code-blocks --- docs/source/installation.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/source/installation.rst b/docs/source/installation.rst index e22ee3f..b82347d 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -50,22 +50,26 @@ If you prefer using ``uv`` package manager then the installation follows similar it, create the environment and install ``quvac`` .. code-block:: bash + uv venv uv pip install .[light] You can test the installation with .. code-block:: bash + uv run pytest Launch the jupyterlab (e.g. tutorial notebooks) with .. code-block:: bash + uv run jupyter lab Generate the documentation with .. code-block:: bash + uv run python -m sphinx -b html docs/source docs/build/html