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 pytest

  • doc for building the documentation

  • dev for code formatting

  • h5 for the h5-crawler

  • all 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.pys 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 test pytest unittests/test_myusecase.py -k expression

Run Integration Tests Locally

  1. Start LinkAhead using the profile in integrationtests/test_profile/profile.yaml

  2. Change directory to integrationtests/.

  3. Run test.sh. Note that this may modify content of the integrationtest/extroot/ directory.

  4. Alternatively, run single tests: pyest integrationtest/test_foo.py

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.

How to contribute