- Docker
- Python 3.10.12
- Install EnergiBridge
- Build the pynguin docker container:
docker build -t pynguin-cli . - Use
./pynguin.shor everywhere instead of the normalpynguincommand - In case of write permission errors, you may need to give permissions to the Docker
appuser:sudo chown -R 10001:10001 ./tests/ - Set up the Python environment using venv or uv
note: make sure to use Python 3.10.12
- Create a python virtual environment:
python -m venv .venv- Activate the virtual environment:
source .venv/bin/activate- Install requirements:
pip install -r requirements.txt- Done, run the experiment
- Generate a venv:
uv venv --seed- Install dependencies:
uv pip install -r requirements.txt- Rename
pyenergibridge_config.json.exampletopyenergibridge_config.json:
mv pyenergibridge_config.json{.example,}- Update the binary path in
pyenergibridge_config.jsonto the installation path of the EnergiBridge binary - Create experiment configs in
pynguing_configs.json, passing a config name and the pynguin CLI parameters. For example:
-
Run the
main.pyscript:- with
uv:
uv run python main.py --allowed-projects codetiming_local,docstring_parser_local --iterations 10
- with
uvfrom the zen script on macos:
./run_zen.sh
- from
.venv:
.venv/bin/python main.py --allowed-projects codetiming_local,docstring_parser_local --iterations 10
- with
For more information on available command-line options:
python main.py --helpTo collect the results from the json files and run the analysis, use:
python analysis.py
[ //... { "name": "dynamosa-42", "params": { "seed": 42, "algorithm": "DYNAMOSA" } } //... ]