Notes for developers
Make sure to work in a suitable virtual environment. See Using a Python virtual environment for more information.
Running tests
ViPErLEED comes with a suite of tests and uses
pytest for testing.
The TensErLEED source code should be available on the testing machine
(repository viperleed-tensorleed
) and the VIPERLEED_TENSORLEED
environment variable should be set. See also Tensor-LEED source code.
Also make sure to have compiled the EEASiSSS source code.
ViPErLEED should also be installed with optional development dependencies as
python -m pip install viperleed[dev]
To execute tests, navigate to your local copy of the ViPErLEED repository, then run
python -m pytest .
If you also would like to produce coverage reports, install coverage via
python -m pip install coverage
then, in your local copy of the viperleed
repository, run
python -m coverage run -m pytest .
python -m coverage html
Using editable installations
ViPErLEED is installed from source using the code in the ViPErLEED
GitHub repository. It
uses the pyproject.toml
file. To install an
editable version,
navigate to your copy of the viperleed
repository, and use
python -m pip install -e .[<options>]
Editable installations from pyproject.toml
files
require pip>=21.3
. Update your pip
with
python -m pip install --upgrade pip
Building this documentation
Install ViPErLEED from source using the code in the ViPErLEED GitHub repository including the documentation dependencies by running
python -m pip install .[doc]
in your local copy of the viperleed
repository. Note that
the documentation can only be built with Python ≥3.9 because of
dependency-resolution issues.
Navigate to the doc
subfolder of viperleed
, then
make html
or
make latexpdf
make.bat html
or
make.bat latexpdf
Producing the PDF documentation requires a working LaTeX installation on your system.