Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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).
Expand Down
40 changes: 37 additions & 3 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -38,4 +40,36 @@ 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'``.
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


15 changes: 14 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ build-backend = "setuptools.build_meta"
name = "quvac"
version = "0.1.1"
dependencies = [
"pip>=25.0",
"numpy",
"scipy",
"numexpr",
Expand Down Expand Up @@ -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]
Expand Down
Loading