This repository contains testing codes for EasyGraph.
This is a work in progress, and we work closely with the EasyGraph developers to solve the problems we encounter.
-
The result from NetworkX is used as the source of truth, if they both provide an API to do the same thing. E.g.,
nx.constraint(nx.Graph)
andeg.constraint(eg.Graph)
. -
If NetworkX doesn't have a functionality we want to test, the testing code for that functionality will be placed right inside of the EasyGraph repository.
-
EasyGraph and NetworkX have many overlapping functionalities, while the former provide low-level C++ bindings for compute-intensive work, and have both the pure Python API and the encapsulated C++ API for some of its functionalities, and we will also compare the result from both interfaces for them.
- Testing framework: pytest
float
result are compared withpytest.approx()
- Testing dataset: see datasets.
- The project is focusing on testing the C bindings at the moment, and the
eg.GraphC
class has limited methods for loading data, so - The only dataset in used currently is the
Karate Club undirected graph
dataset, and I've convert the data to edgelist here.
- The project is focusing on testing the C bindings at the moment, and the
git clone https://github.com/tddschn/easygraph-test.git
cd easygraph-test
# install pinned dependencies
# CPython >=3.9,<3.10 is required
poetry install # install poetry first: https://python-poetry.org/
# activate venv
poetry shell
poetry run pytest
- Only the undirected graph class
eg.GraphC
is implemented,- It lacks many attributes (e.g.
._adj
,__dict__
), methods (especially the dunder ones like__iter__
) and functionalities compared the its pure Python counterparteg.Graph
. - Hangs or throws seg faults when you run the example codes on the class.
- It uses different data structures for storing, and it could bite you if you expect them to behave like
eg.Graph
.
- It lacks many attributes (e.g.