Skip to content

Commit

Permalink
Merge branch 'master' into 0.4.X
Browse files Browse the repository at this point in the history
  • Loading branch information
ulupo committed Aug 24, 2022
2 parents 02dcf26 + ae2bc7f commit c46c1d9
Show file tree
Hide file tree
Showing 16 changed files with 198 additions and 304 deletions.
3 changes: 0 additions & 3 deletions .azure-ci/build_manylinux2010.sh

This file was deleted.

31 changes: 0 additions & 31 deletions .azure-ci/docker_scripts.sh

This file was deleted.

74 changes: 74 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build package on different OSs and Python versions

on : [push, pull_request]

jobs:

build_package:
name: Build ${{ github.event.repository.name }} on ${{ matrix.os }} for Python-${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.7, 3.8, 3.9, '3.10']
include:
- os: ubuntu-latest
path: ~/.cache/pip
- os: macos-latest
path: ~/Library/Caches/pip
- os: windows-latest
path: ~\AppData\Local\pip\Cache

steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
name: Install Python-${{ matrix.python-version }}
with:
python-version: ${{ matrix.python-version }}

- name: Activating Python cache
uses: actions/cache@v2
id: cache_python
continue-on-error: true
with:
path: ${{ matrix.path }}
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/requirements.txt') }}

- name: Build ${{ github.event.repository.name }}
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -e ".[doc, tests]"
- name: Install and run flake8 on Mac
if: ${{ runner.os == 'macOS' }}
run: |
flake8
- name: Run test on Mac with coverage generated
if: ${{ runner.os == 'macOS' }}
run: |
pytest --cov pyflagser --cov-report xml
- name: Run test on Linux and Windows with no coverage generated
if: ${{ runner.os != 'macOS' }}
run: |
python -m pytest --no-cov --no-coverage-upload
- name: Build sphinx doc on Linux
if: ${{ runner.os == 'Linux' }}
run: |
cd doc
python -m pip install -r requirements.txt
sphinx-build -b html . build
- name: Upload built documentation and coverage as artifacts
uses: actions/upload-artifact@v2
with:
name: ArtifactsCI
if-no-files-found: ignore
path: |
doc/build
coverage.xml
htmlcov
39 changes: 39 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build Wheels

on : workflow_dispatch

jobs:

build_wheels:
name: Build wheels on ${{ matrix.os }} for ${{ github.event.repository.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v2

- name: Build wheels
uses: pypa/cibuildwheel@v2.3.1
env:
# Specify which Python versions to build wheels
# https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip
CIBW_BUILD: "cp37-* cp38-* cp39-* cp310-*"
# Skip 32 bit architectures, musllinux, and i686, and macOS x86_64 wheels for CP3.8 -- CP3.10
CIBW_SKIP: "*-win32 *-musllinux_x86_64 *_i686 cp38-macosx_x86_64 cp39-macosx_x86_64 cp310-macosx_x86_64"
CIBW_BEFORE_BUILD_WINDOWS: python -m pip install cmake && python -m pip install --upgrade pip setuptools && sed -i $'s/\r$//' README.rst && python -m pip install delvewheel
CIBW_BEFORE_BUILD_LINUX: python -m pip install cmake && python -m pip install --upgrade pip setuptools
CIBW_BEFORE_BUILD_MACOS: python -m pip install cmake && python -m pip install --upgrade pip setuptools
CIBW_TEST_COMMAND: python -m pyflagser.tests --webdl
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "delvewheel repair -vv -w {dest_dir} {wheel}"
CIBW_TEST_REQUIRES: pytest hypothesis
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
# Should generate universal2 wheels for CP3.8 -- CP3.10
CIBW_ARCHS_MACOS: x86_64 universal2

- uses: actions/upload-artifact@v2
name: Upload wheels
with:
path: ./wheelhouse/*.whl
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,10 @@ venv.bak/

# Pybind11
pybind11

# macOS
*.DS_Store

# IDEs
.idea/*
.vscode/*
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ set(BINDINGS_DIR "src")
# flagser
pybind11_add_module(flagser_pybind "${BINDINGS_DIR}/flagser_bindings.cpp")

target_compile_definitions(flagser_pybind PRIVATE RETRIEVE_PERSISTENCE=1)
target_compile_definitions(flagser_pybind PRIVATE RETRIEVE_PERSISTENCE=1 MANY_VERTICES=1)
target_include_directories(flagser_pybind PRIVATE .)

if(MSVC)
Expand All @@ -24,7 +24,7 @@ endif()
# flagser with USE_COEFFICIENTS
pybind11_add_module(flagser_coeff_pybind "${BINDINGS_DIR}/flagser_bindings.cpp")

target_compile_definitions(flagser_coeff_pybind PRIVATE RETRIEVE_PERSISTENCE=1 USE_COEFFICIENTS=1)
target_compile_definitions(flagser_coeff_pybind PRIVATE RETRIEVE_PERSISTENCE=1 USE_COEFFICIENTS=1 MANY_VERTICES=1)
target_include_directories(flagser_coeff_pybind PRIVATE .)

if(MSVC)
Expand All @@ -40,6 +40,7 @@ endif()
pybind11_add_module(flagser_count_pybind "${BINDINGS_DIR}/flagser_count_bindings.cpp")

target_include_directories(flagser_count_pybind PRIVATE .)
target_compile_definitions(flagser_count_pybind PRIVATE MANY_VERTICES=1)

if(MSVC)
target_compile_options(flagser_count_pybind PUBLIC $<$<CONFIG:RELEASE>: /Wall /O2>)
Expand Down
20 changes: 8 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
.. image:: https://raw.githubusercontent.com/giotto-ai/pyflagser/master/doc/images/Giotto_logo_RGB.svg
:width: 590

|Azure|_ |Azure-cov|_ |Azure-test|_
|wheels|_ |ci|_ |Twitter-follow|_ |Slack-join|_

.. |Azure| image:: https://dev.azure.com/maintainers/Giotto/_apis/build/status/giotto-ai.pyflagser?branchName=master
.. _Azure: https://dev.azure.com/maintainers/Giotto/_build?definitionId=5&_a=summary&repositoryFilter=5&branchFilter=116&requestedForFilter=ae4334d8-48e3-4663-af95-cb6c654474ea
.. |wheels| image:: https://github.com/giotto-ai/pyflagser/actions/workflows/wheels.yml/badge.svg
.. _wheels:

.. |Azure-cov| image:: https://img.shields.io/azure-devops/coverage/maintainers/Giotto/5/master
.. _Azure-cov:

.. |Azure-test| image:: https://img.shields.io/azure-devops/tests/maintainers/Giotto/5/master
.. _Azure-test:
.. |ci| image:: https://github.com/giotto-ai/pyflagser/actions/workflows/ci.yml/badge.svg
.. _ci:

.. |Twitter-follow| image:: https://img.shields.io/twitter/follow/giotto_ai?label=Follow%20%40giotto_ai&style=social
.. _Twitter-follow: https://twitter.com/intent/follow?screen_name=giotto_ai

.. |Slack-join| image:: https://img.shields.io/badge/Slack-Join-yellow
.. _Slack-join: https://slack.giotto.ai/

=========
pyflagser
=========


``pyflagser`` is a python API for the flagser C++ library by Daniel Lütgehetmann which computes the homology of directed flag complexes. Please check out the original `luetge/flagser <https://github.com/luetge/flagser>`_ GitHub repository for more information.

Project genesis
Expand All @@ -37,7 +34,7 @@ Dependencies

``pyflagser`` requires:

- Python (>= 3.6)
- Python (>= 3.7)
- NumPy (>= 1.17.0)
- SciPy (>= 0.17.0)

Expand Down Expand Up @@ -66,7 +63,6 @@ C++ dependencies:

- C++14 compatible compiler
- CMake >= 3.9
- Boost >= 1.56

Source code
'''''''''''
Expand All @@ -88,7 +84,7 @@ From the cloned repository's root directory, run
This way, you can pull the library's latest changes and make them immediately available on your machine.

Testing
~~~~~~~
'''''''

After installation, you can launch the test suite from outside the source directory::

Expand Down
30 changes: 30 additions & 0 deletions RELEASE.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
Release 0.4.5
=============

Major Features and Improvements
-------------------------------

- Wheels for Python 3.10 are now available (`#70 <https://github.com/giotto-ai/pyflagser/pull/70>`_).
- Wheels for Apple Silicon are now available for Python versions 3.8, 3.9 and 3.10 (`#70 <https://github.com/giotto-ai/pyflagser/pull/70>`_).
- A ``MANY_VERTICES`` compilation flag has been added to enable computations on graphs with more than 2^16 vertices (Florian Unger, `#68 <https://github.com/giotto-ai/pyflagser/pull/68>`_).

Bug Fixes
---------

- A bug in ``save_unweighted_flag`` has been fixed (Florian Unger, `#69 <https://github.com/giotto-ai/pyflagser/pull/69>`_).

Backwards-Incompatible Changes
------------------------------

Python 3.6 is no longer supported, and the manylinux standard has been bumped from ``manylinux2010`` to ``manylinux2014`` (`#70 <https://github.com/giotto-ai/pyflagser/pull/70>`_).

Thanks to our Contributors
--------------------------

This release contains contributions from:

Julian Burella Pérez, Umberto Lupo, and Florian Unger.

We are also grateful to all who filed issues or helped resolve them, asked and answered questions, and were part of inspiring discussions.


Release 0.4.4
=============

Expand Down
Loading

0 comments on commit c46c1d9

Please sign in to comment.