Updating gravis for newer Python3 versions
Hi Robert,
Thank you so much for developing this awesome package!
It seems some libraries/dependencies will be getting deprecated soon, like use of pkg_resources API, and I have tried to make changes to the code (largely using an AI agent) to get it updated for newer Python3 versions.
While some tests were slightly amended during the process, they largely pass:
(/Users/raufs/Coding/gravis_update/conda_env) [email protected]:~/Coding/gravis_update/gravis$ python3 -m pytest -v --tb=short
================================================================================================ test session starts =================================================================================================
platform darwin -- Python 3.10.18, pytest-8.4.1, pluggy-1.6.0 -- /Users/raufs/Coding/gravis_update/conda_env/bin/python3
cachedir: .pytest_cache
rootdir: /Users/raufs/Coding/gravis_update/gravis
configfile: pyproject.toml
testpaths: tests
plugins: timeout-2.4.0, cov-6.2.1
collected 24 items
tests/test_external_graph_libraries.py::test_graph_library_conversion_and_result_equivalence SKIPPED (SNAP not available) [ 4%]
tests/test_external_graph_libraries.py::test_graph_library_conversion_with_multiple_graphs PASSED [ 8%]
tests/test_external_graph_libraries.py::test_graph_library_networkit_with_metadata_via_list_with_dicts PASSED [ 12%]
tests/test_image_conversion.py::test_url PASSED [ 16%]
tests/test_image_conversion.py::test_file_with_valid_extension PASSED [ 20%]
tests/test_image_conversion.py::test_file_with_invalid_extension PASSED [ 25%]
tests/test_image_conversion.py::test_optional_arguments PASSED [ 29%]
tests/test_image_conversion.py::test_base64_corner_cases PASSED [ 33%]
tests/test_image_conversion.py::test_exceptions PASSED [ 37%]
tests/test_input_data.py::test_input_single_gjgf PASSED [ 41%]
tests/test_input_data.py::test_input_single_gjgf_from_file PASSED [ 45%]
tests/test_input_data.py::test_input_single_graph PASSED [ 50%]
tests/test_input_data.py::test_input_multiple_gjgf PASSED [ 54%]
tests/test_input_data.py::test_input_multiple_gjgf_from_file PASSED [ 58%]
tests/test_input_data.py::test_input_multiple_graph_and_gjgf PASSED [ 62%]
tests/test_input_data.py::test_input_larger_gjgf PASSED [ 66%]
tests/test_input_data.py::test_input_larger_graph PASSED [ 70%]
tests/test_input_data.py::test_input_fail_on_invalid_data PASSED [ 75%]
tests/test_input_data.py::test_fail_on_invalid_graph_object PASSED [ 79%]
tests/test_input_data.py::test_os PASSED [ 83%]
tests/test_plotting_options.py::test_plotting_fig PASSED [ 87%]
tests/test_plotting_options.py::test_plotting_fig_and_exporting_static_image PASSED [ 91%]
tests/test_plotting_options.py::test_plotting_with_each_keyword_argument PASSED [ 95%]
tests/test_plotting_options.py::test_plotting_with_each_graph_data_property PASSED [100%]
===================================================================================== 23 passed, 1 skipped in 119.92s (0:01:59) ======================================================================================
I tested using a conda environment on a m4 macbook with specs of the conda env attached here (used Python 3.10). The one test that gets skipped is due to difficulties with SNAP installation for newer Python3 versions. Networkit installation via conda is also currently limited to Python3.10/11 it seems, but overall seems to mostly work and pass all but 2 tests with Python 3.13. I also tried Python 3.8 - where pyproject.toml formatting requirements are differentially more strict, so you might want to relax/update some of the fields there if you wish to have it work for python versions <3.10 still.
Hope this is helpful, Rauf
Any chance someone will pick up on this package ? It seems @robert-haas isn't actively maintaining (?).