Getting started
Installation
To install the advancedtools package, you can run:pip install caosadvancedtools
Additional dependencies
To test using tox, you also need to install tox:pip install tox
To install dependencies used by optional functionality, the following pip extras keywords are defined:
test
for testing with pytestdoc
for building the documentationdev
for code formattingh5
for the h5-crawlerall
to install all optional dependencies
These extras can be installed using: pip install .[KEYWORD]
A current list of the dependencies installed with this program as well as those installed with
the keywords can be found in setup.py
s setup_package()
method, in the metadata
dictionary
entries install_requires
and extras_require
.
Run Unit Tests
All tests:
tox
One specific test with tox:
tox -- unittests/test_myusecase.py -k expression
Using only pytest:
pytest unittests
or for running only one testpytest unittests/test_myusecase.py -k expression
Run Integration Tests Locally
Change directory to
integrationtests/
.Mount
extroot
to the folder that will be used as extroot. E.g.sudo mount -o bind extroot ../../caosdb-deploy/profiles/debug/paths/extroot
(or whatever path the extroot of the empty profile to be used is located at).Start (or restart) an empty (!) CaosDB instance (with the mounted extroot). The database will be cleared during testing, so it’s important to use an empty instance. Make sure your configuration for the python caosdb module is correct and allows to connect to the server.
Run
test.sh
. Note that this may modify content of theintegrationtest/extroot/
directory.
Code Formatting
make style
Documentation
We use sphinx to create the documentation. Docstrings in the code should comply with the Googly style (see link below).
Build documentation in build/
with make doc
.