Installation ============ Prerequisites ------------- * Python 3.10.7 * pip (modern version) Installation ------------ Standard Installation ~~~~~~~~~~~~~~~~~~~~~ Dyn-Benchmark is available from a dedicated package repository. You can install it using pip: .. code:: bash pip install dyn-benchmark[pretty] For enhanced visualization capabilities, we recommend installing `dyn-viz``: .. code:: bash # Install dyn-viz for visualization features pip install dyn-viz Installation from Source ~~~~~~~~~~~~~~~~~~~~~~~~ For users who want to access the latest development version or contribute to the project, you can install directly from the source repository: .. code:: bash # Clone the repository (SSH) git clone git@gitlab.com:decide.imt-atlantique/dyn/benchmark.git # Or using HTTPS git clone https://gitlab.com/decide.imt-atlantique/dyn/benchmark.git # Install in development mode pip install -e /path/to/dyn_benchmark Using Virtual Environments ~~~~~~~~~~~~~~~~~~~~~~~~~~ We recommend using virtual environments for installing Dyn-Benchmark to avoid conflicts with other packages. Using `venv `_: .. code:: bash python -m venv dyn-env source dyn-env/bin/activate # On Windows: dyn-env\Scripts\activate # Then install the package as described above Using pyenv with `virtualenv `_: .. code:: bash pyenv install 3.10.7 pyenv virtualenv 3.10.7 dyn-env pyenv local dyn-env # Then install the package as described above Using `conda `_: .. code:: bash conda create -n dyn-env python=[3.10] conda activate dyn-env # Then install the package as described above Verification ------------ To verify your installation is working correctly, run the following Python code: .. code:: python try: # Import the necessary components from dyn.benchmark.generator.groundtruth_generator import GroundtruthGenerator print("āœ“ Successfully imported the package") # Create a simple generator with minimal parameters generator = GroundtruthGenerator(seed=42) print("āœ“ Successfully created a generator") # Generate a very small benchmark (this will take a few seconds) print("Generating a small benchmark (this may take a few seconds)...") groundtruth = generator.generate() # If we reach this point, generation was successful print("āœ“ Successfully generated a benchmark with:") print(f" - {len(groundtruth.graphs)} snapshots") print(f" - {sum(len(g.nodes) for g in groundtruth.graphs.values())} total nodes across all snapshots") print(f" - {sum(len(g.edges) for g in groundtruth.graphs.values())} total edges across all snapshots") print(f" - {len(set(row.static_community_id for row in groundtruth.tcommlist))} static communities") print(f" - {len(groundtruth.events)} community events") print("\nInstallation verified successfully!") except Exception as e: print(f"\nāŒ Verification failed: {type(e).__name__}: {e}") print("Please check the troubleshooting section or report this issue.") Troubleshooting --------------- If you encounter issues during installation: 1. Ensure you're using a compatible Python version 2. Check that you have the necessary permissions to install packages 3. If behind a proxy, configure pip appropriately 4. For further assistance, please consult the troubleshoots document or create an issue on our GitLab repository