diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 08557bd16..2192d7c72 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,19 +22,19 @@ jobs: fetch-depth: 0 - name: Build wheels (manylinux) - uses: pypa/cibuildwheel@v3.2.1 + uses: pypa/cibuildwheel@v3.3.0 env: CIBW_BEFORE_BUILD: "yum install -y flex bison libxml2-devel zlib-devel cairo-devel && pip install -U cmake pip setuptools wheel && python setup.py build_c_core" CIBW_BUILD: "*-manylinux_x86_64" - name: Build wheels (musllinux) - uses: pypa/cibuildwheel@v3.2.1 + uses: pypa/cibuildwheel@v3.3.0 env: CIBW_BEFORE_BUILD: "apk add flex bison libxml2-dev zlib-dev cairo-dev && pip install -U cmake pip setuptools wheel && python setup.py build_c_core" CIBW_BUILD: "*-musllinux_x86_64" CIBW_TEST_COMMAND: "cd {project} && pip install --prefer-binary '.[test-musl]' && python -m pytest -v tests" - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: wheels-linux-x86_64 path: ./wheelhouse/*.whl @@ -49,13 +49,13 @@ jobs: fetch-depth: 0 - name: Build wheels (manylinux) - uses: pypa/cibuildwheel@v3.2.1 + uses: pypa/cibuildwheel@v3.3.0 env: CIBW_BEFORE_BUILD: "yum install -y flex bison libxml2-devel zlib-devel cairo-devel && pip install -U cmake pip setuptools wheel && python setup.py build_c_core" CIBW_ARCHS_LINUX: aarch64 CIBW_BUILD: "*-manylinux_aarch64" - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: wheels-linux-aarch64-manylinux path: ./wheelhouse/*.whl @@ -70,14 +70,14 @@ jobs: fetch-depth: 0 - name: Build wheels (musllinux) - uses: pypa/cibuildwheel@v3.2.1 + uses: pypa/cibuildwheel@v3.3.0 env: CIBW_BEFORE_BUILD: "apk add flex bison libxml2-dev zlib-dev cairo-dev && pip install -U cmake pip setuptools wheel && python setup.py build_c_core" CIBW_ARCHS_LINUX: aarch64 CIBW_BUILD: "*-musllinux_aarch64" CIBW_TEST_COMMAND: "cd {project} && pip install --prefer-binary '.[test-musl]' && python -m pytest -v tests" - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: wheels-linux-aarch64-musllinux path: ./wheelhouse/*.whl @@ -105,14 +105,14 @@ jobs: - name: Cache installed C core id: cache-c-core - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: vendor/install key: C-core-cache-${{ runner.os }}-${{ matrix.cmake_arch }}-llvm${{ env.LLVM_VERSION }}-${{ hashFiles('.git/modules/**/HEAD') }} - name: Cache C core dependencies id: cache-c-deps - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: ~/local key: deps-cache-v2-${{ runner.os }}-${{ matrix.cmake_arch }}-llvm${{ env.LLVM_VERSION }} @@ -133,14 +133,14 @@ jobs: cmake --install . - name: Build wheels - uses: pypa/cibuildwheel@v3.2.1 + uses: pypa/cibuildwheel@v3.3.0 env: CIBW_ARCHS_MACOS: "${{ matrix.wheel_arch }}" CIBW_BEFORE_BUILD: "pip install -U setuptools && python setup.py build_c_core" CIBW_ENVIRONMENT: "LDFLAGS=-L$HOME/local/lib" IGRAPH_CMAKE_EXTRA_ARGS: -DCMAKE_OSX_ARCHITECTURES=${{ matrix.cmake_arch }} ${{ matrix.cmake_extra_args }} -DCMAKE_PREFIX_PATH=$HOME/local - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: wheels-macos-${{ matrix.wheel_arch }} path: ./wheelhouse/*.whl @@ -181,7 +181,7 @@ jobs: limit-access-to-actor: true wait-timeout-minutes: 5 - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: wheels-wasm path: ./dist/*.whl @@ -216,13 +216,13 @@ jobs: - name: Cache installed C core id: cache-c-core - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: vendor/install key: C-core-cache-${{ runner.os }}-${{ matrix.cmake_arch }}-${{ hashFiles('.git/modules/**/HEAD') }} - name: Cache VCPKG - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: C:/vcpkg/installed/ key: vcpkg-${{ runner.os }}-${{ matrix.vcpkg_arch }} @@ -238,7 +238,7 @@ jobs: shell: cmd - name: Build wheels - uses: pypa/cibuildwheel@v3.2.1 + uses: pypa/cibuildwheel@v3.3.0 env: CIBW_BEFORE_BUILD: "pip install -U setuptools && python setup.py build_c_core" CIBW_BUILD: "*-${{ matrix.wheel_arch }}" @@ -252,7 +252,7 @@ jobs: IGRAPH_EXTRA_LIBRARIES: libxml2,lzma,zlib,iconv,charset,bcrypt IGRAPH_EXTRA_DYNAMIC_LIBRARIES: wsock32,ws2_32 - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: wheels-win-${{ matrix.wheel_arch }} path: ./wheelhouse/*.whl @@ -268,7 +268,7 @@ jobs: - name: Cache installed C core id: cache-c-core - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | vendor/install @@ -294,7 +294,7 @@ jobs: pip install '.[test]' python -m pytest -v tests - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: sdist path: dist/*.tar.gz @@ -314,7 +314,7 @@ jobs: - name: Cache installed C core id: cache-c-core - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: | vendor/build diff --git a/CHANGELOG.md b/CHANGELOG.md index 387957cd3..f2424f4fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,40 @@ # igraph Python interface changelog -## [main] +## 1.0.1 - 2025-12-26 + +### Changed + +- The C core of igraph was updated to version 1.0.1. + +## [1.0.0] - 2025-10-23 + +### Added + +- Added `Graph.Nearest_Neighbor_Graph()`. + +- Added `node_in_weights` argument to `Graph.community_leiden()`. + +- Added `align_layout()` to align the principal axes of a layout nicely + with screen dimensions. + +- Added `Graph.commnity_voronoi()`. + +- Added `Graph.commnity_fluid_communities()`. + +### Changed + +- The C core of igraph was updated to version 1.0.0. + +- Most layouts are now auto-aligned using `align_layout()`. + +- Dropped support for PyPy 3.9 and PyPy 3.10 as they are now EOL. + +### Miscellaneous + +- Documentation improvements. + +- This is the last version that supports Python 3.9 as it will reach its + end of life at the end of October 2025. ## [0.11.9] - 2025-06-11 @@ -727,7 +761,7 @@ Please refer to the commit logs at for a list of changes affecting versions up to 0.8.3. Notable changes after 0.8.3 are documented above. -[main]: https://github.com/igraph/python-igraph/compare/0.11.9...main +[1.0.0]: https://github.com/igraph/python-igraph/compare/0.11.9...1.0.0 [0.11.9]: https://github.com/igraph/python-igraph/compare/0.11.8...0.11.9 [0.11.8]: https://github.com/igraph/python-igraph/compare/0.11.7...0.11.8 [0.11.7]: https://github.com/igraph/python-igraph/compare/0.11.6...0.11.7 diff --git a/scripts/mkdoc.sh b/scripts/mkdoc.sh index 1d94d3c32..9309987f6 100755 --- a/scripts/mkdoc.sh +++ b/scripts/mkdoc.sh @@ -54,18 +54,18 @@ if [ ! -d ".venv" ]; then echo "Creating virtualenv..." ${PYTHON:-python3} -m venv .venv - # Install sphinx, matplotlib, pandas, scipy, wheel and pydoctor into the venv. + # Install documentation dependencies into the venv. # doc2dash is optional; it will be installed when -d is given - .venv/bin/pip install -q -U pip wheel sphinx==7.4.7 matplotlib pandas scipy pydoctor sphinx-rtd-theme + .venv/bin/pip install -q -U pip wheel sphinx==7.4.7 matplotlib pandas scipy pydoctor sphinx-rtd-theme iplotx else # Upgrade pip in the virtualenv echo "Upgrading pip in virtualenv..." .venv/bin/pip install -q -U pip wheel fi -# Make sure that Sphinx, PyDoctor (and maybe doc2dash) are up-to-date in the virtualenv +# Make sure that documentation dependencies are up-to-date in the virtualenv echo "Making sure that all dependencies are up-to-date..." -.venv/bin/pip install -q -U sphinx==7.4.7 pydoctor sphinx-gallery sphinxcontrib-jquery sphinx-rtd-theme +.venv/bin/pip install -q -U sphinx==7.4.7 pydoctor sphinx-gallery sphinxcontrib-jquery sphinx-rtd-theme iplotx if [ x$DOC2DASH = x1 ]; then .venv/bin/pip install -U doc2dash fi diff --git a/src/igraph/adjacency.py b/src/igraph/adjacency.py index f941ec822..3d42b0bb2 100644 --- a/src/igraph/adjacency.py +++ b/src/igraph/adjacency.py @@ -113,7 +113,8 @@ def _get_adjacency_sparse(self, attribute=None): weights = self.es[attribute] N = self.vcount() - mtx = sparse.csr_matrix((weights, list(zip(*edges))), shape=(N, N)) + r, c = zip(*edges) if edges else ([], []) + mtx = sparse.csr_matrix((weights, (r, c)), shape=(N, N)) if not self.is_directed(): mtx = mtx + sparse.triu(mtx, 1).T + sparse.tril(mtx, -1).T diff --git a/src/igraph/version.py b/src/igraph/version.py index fbd1c8748..b69224ddc 100644 --- a/src/igraph/version.py +++ b/src/igraph/version.py @@ -1,2 +1,2 @@ -__version_info__ = (0, 11, 9) +__version_info__ = (1, 0, 0) __version__ = ".".join("{0}".format(x) for x in __version_info__) diff --git a/vendor/source/igraph b/vendor/source/igraph index b9b573902..7b4ae766c 160000 --- a/vendor/source/igraph +++ b/vendor/source/igraph @@ -1 +1 @@ -Subproject commit b9b573902ccbe393a78252ab5e94c7876ed92597 +Subproject commit 7b4ae766cbdee6b2017aa5b76752457db2a2972f