# CDlib - Community Detection Library
[![codecov](https://codecov.io/gh/GiulioRossetti/cdlib/branch/master/graph/badge.svg?token=3YJOEVK02B)](https://codecov.io/gh/GiulioRossetti/cdlib)
[![Build](https://github.com/GiulioRossetti/cdlib/actions/workflows/python-package.yml/badge.svg)](https://github.com/GiulioRossetti/cdlib/actions/workflows/python-package.yml)
[![Documentation Status](https://readthedocs.org/projects/cdlib/badge/?version=latest)](http://cdlib.readthedocs.io/en/latest/?badge=latest)
[![CodeQL](https://github.com/GiulioRossetti/cdlib/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/GiulioRossetti/cdlib/actions/workflows/codeql-analysis.yml)
[![pyversions](https://img.shields.io/pypi/pyversions/cdlib.svg)](https://badge.fury.io/py/cdlib)
[![PyPI version](https://badge.fury.io/py/cdlib.svg)](https://badge.fury.io/py/cdlib)
[![Anaconda-Server Badge](https://anaconda.org/giuliorossetti/cdlib/badges/version.svg)](https://anaconda.org/giuliorossetti/cdlib)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Downloads](https://pepy.tech/badge/cdlib/month)](https://pepy.tech/project/cdlib)
[![Downloads](https://pepy.tech/badge/cdlib)](https://pepy.tech/project/cdlib)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4575156.svg)](https://doi.org/10.5281/zenodo.4575156)
[![SBD++](https://img.shields.io/badge/Available%20on-SoBigData%2B%2B-green)](https://sobigdata.d4science.org/group/sobigdata-gateway/explore?siteId=20371853)
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/_CDlib_.svg?style=social&label=Follow%20%40_CDlib_)](https://twitter.com/_CDlib_)
``CDlib`` is a meta-library for community detection in complex networks: it implements algorithms, clustering fitness functions as well as visualization facilities.
``CDlib`` is designed around the ``networkx`` python library: however, when needed, it takes care to automatically convert (from and to) ``igraph`` object so to provide an abstraction on specific algorithm implementations to the final user.
``CDlib`` provides a standardized input/output facilities for several Community Discovery algorithms: whenever possible, to guarantee literature coherent results, implementations of CD algorithms are inherited from their original projects (acknowledged on the [documentation](https://cdlib.readthedocs.io)).
If you use ``CDlib`` as support to your research consider citing:
> G. Rossetti, L. Milli, R. Cazabet.
> **CDlib: a Python Library to Extract, Compare and Evaluate Communities from Complex Networks.**
> Applied Network Science Journal. 2019.
> [DOI:10.1007/s41109-019-0165-9]()
## Tutorial and Online Environments
Check out the official [tutorial](https://colab.research.google.com/github/GiulioRossetti/cdlib/blob/master/docs/CDlib.ipynb) to get started!
If you would like to test ``CDlib`` functionalities without installing anything on your machine consider using the preconfigured Jupyter Hub instances offered by [SoBigData++](https://sobigdata.d4science.org/group/sobigdata-gateway/explore?siteId=20371853).
## Installation
``CDlib`` *requires* python>=3.8.
To install the latest version of our library just download (or clone) the current project, open a terminal and run the following commands:
```bash
pip install -r requirements.txt
pip install -r requirements_optional.txt # (Optional) this might not work in Windows systems due to C-based dependencies.
pip install .
```
Alternatively use pip
```bash
pip install cdlib
```
or conda
```bash
conda create -n cdlib python=3.9
conda config --add channels giuliorossetti
conda config --add channels conda-forge
conda install cdlib
```
### Optional Dependencies (pip package)
To simplify the installation process, the default installation does not include optional dependencies (e.g., ``graph-tool``). If you need them, you can install them manually or run the following command:
```bash
pip install cdlib[C]
```
This option, safe for *nix users, will install all those optional dependencies that require C code compilation.
```bash
pip install cdlib[pypi]
```
This option will install all those optional dependencies that are not available on conda/conda-forge.
```bash
pip install cdlib[all]
```
This option will install all optional dependencies accessible with the flag ``C`` and ``pypi``.
#### (Advanced)
Due to some strict requirements, the installation of a subset of optional dependencies is left outside the previous procedures.
##### graph-tool
``CDlib`` integrates the support for SBM models offered by ``graph-tool``.
To install it refer to the official [documentation](https://git.skewed.de/count0/graph-tool/wikis/installation-instructions) and install the conda-forge version of the package (or the deb version if in a *nix system).
##### ASLPAw
Since its 2.1.0 release ``ASLPAw`` relies on ``gmpy2`` whose installation through pip is not easy to automatize due to some C dependencies.
To address such issue test the following recipe:
```bash
conda install gmpy2
pip install shuffle_graph>=2.1.0 similarity-index-of-label-graph>=2.0.1 ASLPAw>=2.1.0
```
In case this does not solve the issue, please refer to the official ``gmpy2`` [installation](https://gmpy2.readthedocs.io/en/latest/intro.html#installation) instructions.
### Optional Dependencies (Conda package)
``CDlib`` relies on a few packages not available through conda: to install them please use pip.
```bash
pip install pycombo
pip install GraphRicciCurvature
conda install gmpy2
pip install shuffle_graph>=2.1.0 similarity-index-of-label-graph>=2.0.1 ASLPAw>=2.1.0
```
In case ASLPAw installation fails, please refer to the official ``gmpy2`` [installation](https://gmpy2.readthedocs.io/en/latest/intro.html#installation) instructions.
## Collaborate with us!
``CDlib`` is an active project, any contribution is welcome!
If you like to include your model in CDlib feel free to fork the project, open an issue and contact us.
### How to contribute to this project?
Contributing is good, doing it correctly is better! Check out our [rules](https://github.com/GiulioRossetti/cdlib/blob/master/.github/CONTRIBUTING.md), issue a proper [pull request](https://github.com/GiulioRossetti/cdlib/blob/master/.github/PULL_REQUEST_TEMPLATE.md) /[bug report](https://github.com/GiulioRossetti/cdlib/blob/master/.github/ISSUE_TEMPLATE/bug_report.md) / [feature request](https://github.com/GiulioRossetti/cdlib/blob/master/.github/ISSUE_TEMPLATE/feature_request.md).
We are a welcoming community... just follow the [Code of Conduct](https://github.com/GiulioRossetti/cdlib/blob/master/.github/CODE_OF_CONDUCT.md).
Raw data
{
"_id": null,
"home_page": "https://github.com/GiulioRossetti/cdlib",
"name": "cdlib",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "community-discovery node-clustering edge-clustering complex-networks",
"author": "Giulio Rossetti",
"author_email": "giulio.rossetti@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/58/63/22c6b3c3e8b7994a62f08505ec671e4d611148c88362d71e3be79de4327d/cdlib-0.3.0.tar.gz",
"platform": null,
"description": "# CDlib - Community Detection Library\n[![codecov](https://codecov.io/gh/GiulioRossetti/cdlib/branch/master/graph/badge.svg?token=3YJOEVK02B)](https://codecov.io/gh/GiulioRossetti/cdlib)\n[![Build](https://github.com/GiulioRossetti/cdlib/actions/workflows/python-package.yml/badge.svg)](https://github.com/GiulioRossetti/cdlib/actions/workflows/python-package.yml)\n[![Documentation Status](https://readthedocs.org/projects/cdlib/badge/?version=latest)](http://cdlib.readthedocs.io/en/latest/?badge=latest)\n[![CodeQL](https://github.com/GiulioRossetti/cdlib/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/GiulioRossetti/cdlib/actions/workflows/codeql-analysis.yml)\n[![pyversions](https://img.shields.io/pypi/pyversions/cdlib.svg)](https://badge.fury.io/py/cdlib)\n[![PyPI version](https://badge.fury.io/py/cdlib.svg)](https://badge.fury.io/py/cdlib)\n[![Anaconda-Server Badge](https://anaconda.org/giuliorossetti/cdlib/badges/version.svg)](https://anaconda.org/giuliorossetti/cdlib)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Downloads](https://pepy.tech/badge/cdlib/month)](https://pepy.tech/project/cdlib)\n[![Downloads](https://pepy.tech/badge/cdlib)](https://pepy.tech/project/cdlib)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4575156.svg)](https://doi.org/10.5281/zenodo.4575156)\n[![SBD++](https://img.shields.io/badge/Available%20on-SoBigData%2B%2B-green)](https://sobigdata.d4science.org/group/sobigdata-gateway/explore?siteId=20371853)\n\n\n[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/_CDlib_.svg?style=social&label=Follow%20%40_CDlib_)](https://twitter.com/_CDlib_)\n\n\n\n``CDlib`` is a meta-library for community detection in complex networks: it implements algorithms, clustering fitness functions as well as visualization facilities.\n\n\n``CDlib`` is designed around the ``networkx`` python library: however, when needed, it takes care to automatically convert (from and to) ``igraph`` object so to provide an abstraction on specific algorithm implementations to the final user.\n\n``CDlib`` provides a standardized input/output facilities for several Community Discovery algorithms: whenever possible, to guarantee literature coherent results, implementations of CD algorithms are inherited from their original projects (acknowledged on the [documentation](https://cdlib.readthedocs.io)).\n\n\nIf you use ``CDlib`` as support to your research consider citing:\n\n> G. Rossetti, L. Milli, R. Cazabet.\n> **CDlib: a Python Library to Extract, Compare and Evaluate Communities from Complex Networks.**\n> Applied Network Science Journal. 2019. \n> [DOI:10.1007/s41109-019-0165-9]()\n\n## Tutorial and Online Environments\n\nCheck out the official [tutorial](https://colab.research.google.com/github/GiulioRossetti/cdlib/blob/master/docs/CDlib.ipynb) to get started!\n\nIf you would like to test ``CDlib`` functionalities without installing anything on your machine consider using the preconfigured Jupyter Hub instances offered by [SoBigData++](https://sobigdata.d4science.org/group/sobigdata-gateway/explore?siteId=20371853).\n\n## Installation\n\n``CDlib`` *requires* python>=3.8.\n\nTo install the latest version of our library just download (or clone) the current project, open a terminal and run the following commands:\n\n```bash\npip install -r requirements.txt\npip install -r requirements_optional.txt # (Optional) this might not work in Windows systems due to C-based dependencies.\npip install .\n```\n\nAlternatively use pip\n```bash\npip install cdlib\n```\n\nor conda\n```bash\nconda create -n cdlib python=3.9\nconda config --add channels giuliorossetti\nconda config --add channels conda-forge\nconda install cdlib\n```\n\n### Optional Dependencies (pip package)\nTo simplify the installation process, the default installation does not include optional dependencies (e.g., ``graph-tool``). If you need them, you can install them manually or run the following command:\n\n```bash\npip install cdlib[C]\n```\n\nThis option, safe for *nix users, will install all those optional dependencies that require C code compilation.\n\n```bash\npip install cdlib[pypi]\n```\n\nThis option will install all those optional dependencies that are not available on conda/conda-forge.\n\n```bash\npip install cdlib[all]\n```\n\nThis option will install all optional dependencies accessible with the flag ``C`` and ``pypi``.\n\n#### (Advanced) \n\nDue to some strict requirements, the installation of a subset of optional dependencies is left outside the previous procedures.\n\n##### graph-tool\n``CDlib`` integrates the support for SBM models offered by ``graph-tool``.\nTo install it refer to the official [documentation](https://git.skewed.de/count0/graph-tool/wikis/installation-instructions) and install the conda-forge version of the package (or the deb version if in a *nix system).\n\n##### ASLPAw\n\nSince its 2.1.0 release ``ASLPAw`` relies on ``gmpy2`` whose installation through pip is not easy to automatize due to some C dependencies.\nTo address such issue test the following recipe:\n\n```bash\nconda install gmpy2 \npip install shuffle_graph>=2.1.0 similarity-index-of-label-graph>=2.0.1 ASLPAw>=2.1.0\n```\n\nIn case this does not solve the issue, please refer to the official ``gmpy2`` [installation](https://gmpy2.readthedocs.io/en/latest/intro.html#installation) instructions.\n\n### Optional Dependencies (Conda package)\n\n``CDlib`` relies on a few packages not available through conda: to install them please use pip.\n\n```bash\npip install pycombo\npip install GraphRicciCurvature\n\nconda install gmpy2 \npip install shuffle_graph>=2.1.0 similarity-index-of-label-graph>=2.0.1 ASLPAw>=2.1.0\n```\n\nIn case ASLPAw installation fails, please refer to the official ``gmpy2`` [installation](https://gmpy2.readthedocs.io/en/latest/intro.html#installation) instructions.\n\n\n## Collaborate with us!\n\n``CDlib`` is an active project, any contribution is welcome!\n\nIf you like to include your model in CDlib feel free to fork the project, open an issue and contact us.\n\n### How to contribute to this project?\n\nContributing is good, doing it correctly is better! Check out our [rules](https://github.com/GiulioRossetti/cdlib/blob/master/.github/CONTRIBUTING.md), issue a proper [pull request](https://github.com/GiulioRossetti/cdlib/blob/master/.github/PULL_REQUEST_TEMPLATE.md) /[bug report](https://github.com/GiulioRossetti/cdlib/blob/master/.github/ISSUE_TEMPLATE/bug_report.md) / [feature request](https://github.com/GiulioRossetti/cdlib/blob/master/.github/ISSUE_TEMPLATE/feature_request.md).\n\nWe are a welcoming community... just follow the [Code of Conduct](https://github.com/GiulioRossetti/cdlib/blob/master/.github/CODE_OF_CONDUCT.md).\n",
"bugtrack_url": null,
"license": "BSD-Clause-2",
"summary": "Community Discovery Library",
"version": "0.3.0",
"project_urls": {
"Homepage": "https://github.com/GiulioRossetti/cdlib"
},
"split_keywords": [
"community-discovery",
"node-clustering",
"edge-clustering",
"complex-networks"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c86333f17b7da53502e29d9476b538b9ae5eb05c47d060800caa730f781a8e93",
"md5": "666b162b340d47a90c2faadc26595f27",
"sha256": "a0caf928e83a124421f1b02ac0aed4b0f8583e5518ad1481ab39bd9193c3c9e1"
},
"downloads": -1,
"filename": "cdlib-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "666b162b340d47a90c2faadc26595f27",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 230254,
"upload_time": "2023-06-08T09:24:01",
"upload_time_iso_8601": "2023-06-08T09:24:01.191967Z",
"url": "https://files.pythonhosted.org/packages/c8/63/33f17b7da53502e29d9476b538b9ae5eb05c47d060800caa730f781a8e93/cdlib-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "586322c6b3c3e8b7994a62f08505ec671e4d611148c88362d71e3be79de4327d",
"md5": "517e0edcc7b2c6188d2d00b8d4322da0",
"sha256": "31623d498c29e5b079a24ebff48098d8f28e372e829dfeea4af41285db7e9065"
},
"downloads": -1,
"filename": "cdlib-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "517e0edcc7b2c6188d2d00b8d4322da0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 196755,
"upload_time": "2023-06-08T09:24:03",
"upload_time_iso_8601": "2023-06-08T09:24:03.047479Z",
"url": "https://files.pythonhosted.org/packages/58/63/22c6b3c3e8b7994a62f08505ec671e4d611148c88362d71e3be79de4327d/cdlib-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-08 09:24:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "GiulioRossetti",
"github_project": "cdlib",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [
{
"name": "numpy",
"specs": []
},
{
"name": "matplotlib",
"specs": []
},
{
"name": "scikit-learn",
"specs": []
},
{
"name": "tqdm",
"specs": []
},
{
"name": "networkx",
"specs": [
[
">=",
"3.0"
]
]
},
{
"name": "demon",
"specs": []
},
{
"name": "python-louvain",
"specs": [
[
">=",
"0.16"
]
]
},
{
"name": "nf1",
"specs": []
},
{
"name": "scipy",
"specs": []
},
{
"name": "pulp",
"specs": []
},
{
"name": "seaborn",
"specs": []
},
{
"name": "pandas",
"specs": []
},
{
"name": "eva_lcd",
"specs": []
},
{
"name": "bimlpa",
"specs": []
},
{
"name": "markov_clustering",
"specs": []
},
{
"name": "python-igraph",
"specs": [
[
">=",
"0.10"
]
]
},
{
"name": "angelcommunity",
"specs": []
},
{
"name": "pooch",
"specs": []
},
{
"name": "dynetx",
"specs": []
},
{
"name": "thresholdclustering",
"specs": []
},
{
"name": "python-Levenshtein",
"specs": []
}
],
"lcname": "cdlib"
}