--- last_review: "2025-01-01" last_reviewer: "-" documented_code: [ ] --- ```{tags} how-to ``` # Getting started :::{note} This page has been migrated from the old documentation, and has not yet been fully revised. There might be inconsistencies or errors when using with current LinkAhead versions. ::: % TODO: Issue: https://gitlab.indiscale.com/caosdb/src/linkahead-docs/-/issues/93 % TODO: Split into README, Tutorial, and How-To % TODO: Why does this claim google style docstrings, don't we use numpy everywhere else? % TODO: This is a README page from the caosdb-advanced-user-tools repository, see [here](https://docs.indiscale.com/caosdb-advanced-user-tools/README_SETUP.html). % TODO: The README should be rewritten to be a minimal setup and usage guide, with a link to this % TODO: documentation page for further information. ## 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 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.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 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 - [Google Style Python Docstrings](https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html) - [Google Style Python Docstrings 2nd reference](https://github.com/google/styleguide/blob/gh-pages/pyguide.md#38-comments-and-docstrings) - [References to other documentation](https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#role-external)