![]() |
aqnwb 0.1.0
|
AqNWB
uses ctest
and CATCH2
for unit testing. Relevant files for the unit tests are located at:
/tests
: Sources of the unit tests/tests/examples
: Sources of example code used in the docs. The examples are implemented like regular unit tests but their purpose is to provide examples for the docs (rather than testing specific cases) and as such commonly include Doxygen section markers to allow inclusion of sections of code in the Doxygen docs.If you built AqNWB with the dev
mode preset, then simply call:
Alternatively go to your build directory and run ctest
directly, e.g.:
AqNWB uses GitHub Actions defined in the .github/workflows folder to automatically run all unit tests, spellchecks, linter, etc. on all pull requests.
main
). This allows the CI to test the combined code without actually merging it. These temporary merge commits are not part of the repository's history and exist only in the context of the CI job. That is, if you are experiencing errors in the CI but the indicated lines of code do not match the code in the PR, then this is likely due the PR being out-of-sync with the target branch of the PR.AqNWB uses codespell
to check the code for spelling errors. You can run the spellchecker via:
To automatically fix spelling errors you can run codespell via the spell-fix
target instead:
codespell
uses a relatively small dictionary of common misspellings and their corrections. For more comprehensive spellchecking (in particular of the documentation) additional spellchecking via more detailed spellcheckers (e.g., aspell
) is recommended.AqNWB uses clang-format
for linting the code. You can run the linter via:
To automatically fix formatting errors you can run the linter via the format-fix
target instead: