FAQ - Frequency Asked Questions
The following Frequency Answer Questions are general and not operating system specific.
Configure PyCharm to auto-complete Basilisk commands and provide module variables, see the PyCharm Support web page.
How do I run
pytest
to ensure all unit and integrated tests still passThe following response assumes you have the Basilisk source code. You ensure the python utility
pytest
. It is installed in the setup process usingrequirements_dev.txt
. Next, navigate to the folderBasilisk\src
and runpytest
from there.How can I run
pytest
faster?One can distribute python tests across multiple processes. This is achieved with the
pytest-xdist
package using:pip3 install pytest-xdist
After installing this package you can now pytest such that it distribute tests across multi-processes.
pytest
for 8 processes using:python3 -m pytest -n 8
or replace 8 with either the number of processors (virtual or otherwise) of your host machine, or “auto” to use all available processors.
How can I use
pytest
to generate a Basilisk validation HTML report?You will need to install
pytest-html
package which is installed in the setup process usingrequirements_dev.txt
. Then you can do this with:python3 -m pytest --report
This generates an HTML report in a local
tests/report
folder.How do I perform a clean build of Basilisk?
IDE’s like X-Code provide a “clean” function. This will remove some compiled code, but in Basilisk it does not get rid of all the SWIG’d code, and there can be compiler warnings related to the last CMAKE settings used.
To do a basic clean build that will cover most odd cases, you can do this manually by
delete the folder of
dist3
ordist
and create a new folder with that namefollow the regular configure and build instruction in Building the Software Framework
You can also use the
clean
flag in the instruction at Building the Software Framework to do a clean and configure all in one.To really have a clean clean build you want to get rid of the .conan file that stores the dependencies for Basilisk. To do this you
delete the
.conan
folder in your home directoryfollow the regular build instructions in Building the Software Framework using the
clean
flag