Generates network topologies, i.e., arrangements of nodes and edges using Python and exports the topologies for use in CiCL studies built on top of interactive-network-base.
Uses Python 3.10.13 and pip 23.3.1 with a virtual environment. To get started, first clone this repository:
git clone https://github.com/comanlab/gentopo.gitEverything in this repository is meant to run within a virtual environment, which is activated from the root of this repository.
TODO: If .python-version is already present, will skipping to mkvirtualenv gentopo successfully install and use 3.10.13 from pyenv?
Use Pyenv within the root directory of this project to use the desired Python version via
pyenv local 3.10.13After installing and setting the local directory's Python version, ensure pyenv local returns 3.10.13 to confirm the intended Python version is in use from those installed by pyenv on your local machine. (Note: For those bringing their own Python virtual environment manager, e.g. conda, this project is tested for Python >=3.10.)
mkvirtualenv gentopoThis will create and activate the virtual environment called gentopo.
To activate the virtual environment, run
workon gentopoIf already in the activated environment, the previous command should do nothing.
Check that the virtual environment has the expected Python version using
which python
# should result in: $HOME/.virtualenvs/gentopo/bin/pythonand
python --version
# should result in: Python 3.10.13 when using pyenvLocally, Then, install the package dependencies for this project via
pip install -r requirements.txtTo use a Jupyter notebook locally, install a new kernel for the virtual environment via
python -m ipykernel install --user --name=gentopoThen, start a JupyterLab instance with
jupyter labSelect the genetopo kernel to from the Launcher to start a new notebook. Or, select an existing file to work on from the File Browser.