{"id":20618328,"url":"https://github.com/tddschn/easygraph-test","last_synced_at":"2026-04-21T06:32:56.105Z","repository":{"id":41509432,"uuid":"509932013","full_name":"tddschn/easygraph-test","owner":"tddschn","description":"Testing code for https://github.com/easy-graph/Easy-Graph","archived":false,"fork":false,"pushed_at":"2023-02-11T01:51:44.000Z","size":1325,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-17T04:47:54.802Z","etag":null,"topics":["cpp","easygraph","pytest","python","test"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tddschn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-03T05:31:47.000Z","updated_at":"2023-05-04T11:52:48.000Z","dependencies_parsed_at":"2025-01-17T04:46:52.707Z","dependency_job_id":"c3674ce0-3059-4271-b79b-3e9715012305","html_url":"https://github.com/tddschn/easygraph-test","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tddschn%2Feasygraph-test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tddschn%2Feasygraph-test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tddschn%2Feasygraph-test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tddschn%2Feasygraph-test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tddschn","download_url":"https://codeload.github.com/tddschn/easygraph-test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242277653,"owners_count":20101536,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","easygraph","pytest","python","test"],"created_at":"2024-11-16T12:07:59.238Z","updated_at":"2026-04-21T06:32:51.088Z","avatar_url":"https://github.com/tddschn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EasyGraph Testing codes\n\nThis repository contains testing codes for [EasyGraph](https://github.com/easy-graph/Easy-Graph).\n\nThis is a work in progress, and we work closely with the EasyGraph developers to solve the problems we encounter.\n\n- [EasyGraph Testing codes](#easygraph-testing-codes)\n  - [Methodology](#methodology)\n    - [Overview](#overview)\n    - [Technical details](#technical-details)\n  - [Setup](#setup)\n  - [Run tests](#run-tests)\n  - [Issues with the C bindings as per easygraph v0.2a38](#issues-with-the-c-bindings-as-per-easygraph-v02a38)\n\n## Methodology\n\n### Overview\n- The result from [NetworkX](https://networkx.org) is used as the source of truth, if they both provide an API to do the same thing. E.g., `nx.constraint(nx.Graph)` and `eg.constraint(eg.Graph)`.\n- 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](https://github.com/easy-graph/Easy-Graph). \n\n- 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.\n\n### Technical details\n- Testing framework: pytest\n- `float` result are compared with `pytest.approx()`\n- Testing dataset: see [datasets](./datasets/).\n  - The project is focusing on testing the C bindings at the moment, and the `eg.GraphC` class has limited methods for loading data, so\n  - The only dataset in used currently is the [`Karate Club undirected graph`](http://vlado.fmf.uni-lj.si/pub/networks/data/Ucinet/UciData.htm) dataset, and I've convert the data to edgelist [here](./data/karateclub.edgelist).\n\n## Setup\n\n```bash\ngit clone https://github.com/tddschn/easygraph-test.git\ncd easygraph-test\n\n# install pinned dependencies\n# CPython \u003e=3.9,\u003c3.10 is required\npoetry install # install poetry first: https://python-poetry.org/\n# activate venv\npoetry shell\n```\n\n## Run tests\n\n```bash\npoetry run pytest\n```\n\n## Issues with the C bindings as per easygraph v0.2a38\n\n- Only the undirected graph class `eg.GraphC` is implemented, \n  - It lacks many attributes (e.g. `._adj`, `__dict__`), methods (especially the dunder ones like `__iter__`) and functionalities compared the its pure Python counterpart `eg.Graph`.\n  - Hangs or throws seg faults when you run the [example codes](https://easy-graph.github.io/tutorial.html) on the class.\n  - It uses different data structures for storing, and it could bite you if you expect them to behave like `eg.Graph`.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftddschn%2Feasygraph-test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftddschn%2Feasygraph-test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftddschn%2Feasygraph-test/lists"}