The aim of this project is to provide a vortex lattice solver, which can handle all kinds of open and closed meshes. It aims to be highly performant on a single machine and allow for easy adaptation to different specific applications.
TODO:
- add a cool image
- link wiki/pages
Table of Contents:
This section describes how to install the package from source. This includes instructions on how to get a user version, as well as how to install the package for development.
The first step is installing the dependencies. In order to be able to build the package, you will need:
CMake,- Your system's C compiler (on Linux it's
gccand on Windows it ismsvc), - Support for OpenMP 3.0 (
msvcwill usellvmto support it), - Python 3.10 or newer.
To install the PyVL package in the active Python environment. Assuming that you cloned
the repository to the directory pyvl, simply use pip like so:
python -m pip install pyvlThis will build the package and install it.
If you instead want to work on the package, you can specify dev and/or docs as
optional dependencies for the package. You also probably want to then install the package
as editable:
python -m pip install -e pyvl[dev,docs]This section outlines guidelines on how to contribute to the project. While all of these steps are not necessary, they makes other peoples' lives easier. These steps are all assuming you have installed the development version of the package.
Using pre-commit
This package uses pre-commit in order to run
git hooks prior to allowing
you to make a commit. These include Python type checking, C and Python formatting, and
spellchecking.
After you clone the repository, you must then initialize these by running the following command in your development environment:
pre-commit installNote that this needs to be done only once pre commit.
There are three groups of test which are included in the package:
- C tests, which check the low-level mathematical functions (stored in sub-directories
of
testdirectory). - Python tests, which check the rest of the module, from the C types, to the pure Python
code (stored in
test/pytests). - Python doctests, which are in the docstrings of the Python types/functions. These
are in docstrings of more important types in the
python/pyvldirectory.
The Python tests can be run automatically by calling pytest. To run C tests, you can
use CMake.
Documentation for pyvl is written with
Sphinx. As such, you can build it by going
to the doc directory, then executing make html, which should work both on Linux and
Windows.
Using nox
To automatically test building, code tests, and building the documentation in clean
environment, nox can be used. To display
the list of available nox sessions:
nox --listIf you just want to run all the default sessions, you can also just run:
nox