Skip to content

Commit 1dce1ce

Browse files
authored
Update code cov (#210)
* Bump action versions * Suppress no array bound warnings on windows * Only get test coverage for source files * Skipping py314 free-threaded builds for now * Update CI to use ruff instead of flake8 * Update README * Update dependabot message prefix * Update changelog * Explicitly add macos14 for testing * Fix incorrect specification for os in test-conda job * try removing libpython for conda tests for windows * drop py3.14 for conda; sklearn not supp yet * Add plotting test
1 parent f0e3c99 commit 1dce1ce

24 files changed

+441
-356
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ updates:
77
schedule:
88
# Check for updates to GitHub Actions every week
99
interval: "weekly"
10+
commit-message:
11+
prefix: "chore(deps): "

.github/workflows/build_and_deploy.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
ubuntu-24.04-arm,
2020
windows-latest,
2121
macos-13,
22+
macos-14,
2223
macos-latest,
2324
]
2425

@@ -38,7 +39,7 @@ jobs:
3839
CIBW_TEST_COMMAND: "pytest {project}/tests"
3940
CIBW_TEST_SKIP: "*win32 *musllinux* cp314t-*"
4041

41-
- uses: actions/upload-artifact@v4
42+
- uses: actions/upload-artifact@v5
4243
with:
4344
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
4445
path: ./wheelhouse/*.whl
@@ -56,7 +57,7 @@ jobs:
5657
- name: Build sdist
5758
run: pipx run build --sdist
5859

59-
- uses: actions/upload-artifact@v4
60+
- uses: actions/upload-artifact@v5
6061
with:
6162
name: cibw-sdist
6263
path: dist/*.tar.gz
@@ -72,7 +73,7 @@ jobs:
7273
id-token: write
7374
if: github.event_name == 'release' && github.event.action == 'published'
7475
steps:
75-
- uses: actions/download-artifact@v5
76+
- uses: actions/download-artifact@v6
7677
with:
7778
# unpacks all CIBW artifacts into dist/
7879
pattern: cibw-*

.github/workflows/python-tests.yml

Lines changed: 42 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,30 @@ on:
1111
workflow_dispatch:
1212

1313
jobs:
14+
lint_and_format_check_with_ruff:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v5
19+
20+
- name: Set up Python 3.12
21+
uses: actions/setup-python@v6
22+
with:
23+
python-version: "3.12"
24+
25+
- uses: astral-sh/ruff-action@v3
26+
with:
27+
args: "format --check"
28+
29+
- uses: astral-sh/ruff-action@v3
30+
with:
31+
args: "check"
32+
1433
test:
1534
strategy:
1635
matrix:
17-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
18-
os: ["ubuntu-latest", "macos-latest"]
36+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
37+
os: ["ubuntu-latest", "macos-latest", "macos-14"]
1938
runs-on: ${{ matrix.os }}
2039

2140
steps:
@@ -30,45 +49,49 @@ jobs:
3049
python -m pip install --upgrade pip
3150
pip install flake8 pytest-cov Cython
3251
pip install -e ".[testing]"
33-
- name: Lint with flake8
34-
run: |
35-
# stop the build if there are Python syntax errors or undefined names
36-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
37-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
38-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
52+
3953
- name: Test with pytest
4054
run: |
4155
pytest --cov-report=xml --cov-report=term --cov=src/ripser
56+
4257
- name: Upload coverage results
4358
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
4459
uses: codecov/codecov-action@v5
45-
env:
46-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
4760
with:
61+
token: ${{ secrets.CODECOV_TOKEN }}
4862
name: ripser
4963
verbose: true
50-
fail_ci_if_error: true
64+
fail_ci_if_error: false
5165

5266
test-conda:
53-
runs-on: macos-latest
5467
strategy:
5568
fail-fast: false
5669
matrix:
57-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
70+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] # 3.14 not supported by conda yet
71+
os: ["macos-latest", "macos-14"]
72+
runs-on: ${{ matrix.os }}
5873

5974
steps:
6075
- uses: actions/checkout@v5
61-
- uses: conda-incubator/setup-miniconda@v3
76+
77+
- name: Set up miniconda
78+
uses: conda-incubator/setup-miniconda@v3
6279
with:
6380
auto-update-conda: true
6481
python-version: ${{ matrix.python-version }}
6582
activate-environment: test
66-
- name: Set up conda
83+
84+
- name: Install conda dependencies
6785
shell: bash -l {0}
6886
run: |
69-
conda install git numpy pandas scipy matplotlib pytest cython
87+
conda install numpy scipy scikit-learn matplotlib pytest cython
7088
git clone https://github.com/martinus/robin-hood-hashing ripser/robinhood
71-
python -m pip install .
89+
90+
- name: Install ripser with pip in conda environment
91+
shell: bash -l {0}
92+
run: |
93+
pip install -e ".[testing]"
94+
7295
- name: Test with pytest
7396
shell: bash -l {0}
7497
run: |
@@ -79,7 +102,7 @@ jobs:
79102
strategy:
80103
fail-fast: false
81104
matrix:
82-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
105+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
83106

84107
steps:
85108
- uses: actions/checkout@v5
@@ -92,7 +115,7 @@ jobs:
92115
shell: bash -l {0}
93116
run: |
94117
echo -e "[build]\ncompiler=msvc\n" >> setup.cfg
95-
conda install git numpy pandas scipy matplotlib pytest libpython cython
118+
conda install git numpy pandas scipy matplotlib pytest cython
96119
git clone https://github.com/martinus/robin-hood-hashing ripser/robinhood
97120
python -m pip install .
98121
- name: Test with pytest

CHANGELOG.md

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,126 +1,140 @@
1-
# 0.6.11
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.6.13] - 2025-11-26
9+
10+
### Fixed
11+
12+
- Fix broken wheel and conda builds for macos. Include python 3.14. Use ruff for linting and formatting. Update CI actions.
13+
- No code changes.
14+
15+
## [0.6.11]
216

317
- Update cocycle notebook (fix #83).
418

5-
# 0.6.10
19+
## [0.6.10]
620

721
- Update build process to include python code and wheels. No code change.
822

9-
# 0.6.9
23+
## [0.6.9]
1024

1125
- Convert package to `src` style.
1226
- Fix build command not including python source files.
1327

14-
# 0.6.8
28+
## [0.6.8]
1529

1630
- Update CD commands for newer build system.
1731

18-
# 0.6.7
32+
## [0.6.7]
1933

2034
- Failed to build wheels. This version does not exist.
2135

22-
# 0.6.6
36+
## [0.6.6]
2337

2438
- Failed to build wheels. This version does not exist.
2539

26-
# 0.6.5
40+
## [0.6.5]
2741

2842
- Bugfix for lower star filtrations with edges that come in at exactly 0 (courtesy of Riccardo Ceccaroni)
2943

30-
# 0.6.4
44+
## [0.6.4]
3145

3246
- Add some includes to ripser.cpp for newer Ubuntu/C++ environments
3347

34-
# 0.6.3
48+
## [0.6.3]
3549

3650
- Update numpy header
3751

38-
# 0.6.2
52+
## [0.6.2]
3953

4054
- Prevent simplex assembly in last dimension for improved memory usage (courtesy of Umberto Lupo)
4155

42-
# 0.6.1
56+
## [0.6.1]
4357

4458
- Lazy import plotting dependencies
4559

46-
# 0.6.0
60+
## [0.6.0]
4761

4862
- Update C++ backend to commit 286d369 of [ripser](https://github.com/Ripser/ripser) but keeping same functionalities
4963
- Add support to robinhood hashmap into the C++ Backend
5064
- Update CI in order to compile C++ with robinhood enable
5165
- Enable Enclosing radius when threshold is set to infinity
5266

53-
# 0.5.5
67+
## [0.5.5]
5468

5569
- Updating CI/CD pipeline.
5670

57-
# 0.5.4
71+
## [0.5.4]
5872

5973
- Fixing issue with inconsistent answers from different scipy.sparse formats, courtesy of Umberto Lupo
6074

61-
# 0.5.3
75+
## [0.5.3]
6276

6377
- Adding link to ripser++ GPU version by Simon Zhang
6478

65-
# 0.5.2:
79+
## [0.5.2]2]
6680

6781
- Cocycle indices now correspond to point cloud indices, even
6882
when a greedy permutation is in use
6983

70-
# 0.4.1:
84+
## [0.4.1]
7185

7286
- Fixed packing so C++ is MSVC compatible.
7387

74-
# 0.4.0:
88+
## [0.4.0]
7589

7690
- Added license to distributed packages.
7791

78-
# 0.3.2:
92+
## [0.3.2]2]
7993

8094
- Added support for greedy permutations.
8195
- Outsourced plotting to persim.
8296
- Outsourced data construction in examples to tadasets.
8397
- Revamped documentation.
8498

85-
# 0.3.0:
99+
## [0.3.0]
86100

87101
- Completed JOSS review, thanks @lmcinnes and @arokem!!
88102
- Documentation details updated.
89103

90-
# 0.2.7:
104+
## [0.2.7]
91105

92106
- Updating home url
93107

94-
# 0.2.6:
108+
## [0.2.6]6]
95109

96110
- Update license to MIT.
97111

98-
# 0.2.5:
112+
## [0.2.5]
99113

100114
- Docs and notebooks revamp.
101115
- Support for Windows.
102116

103-
# 0.2.4:
117+
## [0.2.4]
104118

105119
- Interface redesign
106120

107-
# 0.2.3:
121+
## [0.2.3]
108122

109123
- Support for lower star filtrations
110124
- Notebook on lower star filtrations
111125

112-
# 0.2.1:
126+
## [0.2.1]1]
113127

114128
- Sparse distance matrix support
115129
- Two additional notebooks about sparsity
116130
- Language agnostic bindings support
117131
- Bug fixes (filtrations with low number of points)
118132

119-
# 0.2.0:
133+
## [0.2.0]
120134

121135
- Bug fixes (int rounding error for small magnitude threshold)
122136

123-
# 0.1.7:
137+
## [0.1.7]
124138

125139
- Generation of cocycles.
126140
- Handle inf in C code and in plotting.

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
[![Build status](https://ci.appveyor.com/api/projects/status/020nrvrq2rdg2iu1?svg=true)](https://ci.appveyor.com/project/sauln/ripser-py)
88
[![codecov](https://codecov.io/gh/scikit-tda/ripser.py/branch/master/graph/badge.svg)](https://codecov.io/gh/scikit-tda/ripser.py)
99
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10+
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
1011

1112
# Ripser.py
1213

@@ -111,10 +112,16 @@ rips.plot(diagrams)
111112

112113
# Contributions
113114

114-
We welcome all kinds of contributions! Please get in touch if you would like to help out. Everything from code to notebooks to examples and documentation are all equally valuable so please don't feel you can't contribute. To contribute please fork the project make your changes and submit a pull request. We will do our best to work through any issues with you and get your code merged into the main branch.
115+
We welcome all kinds of contributions! Please get in touch if you would like to
116+
help out. Everything from code to notebooks to examples and documentation are
117+
all equally valuable so please don't feel you can't contribute.
118+
To contribute please fork the project make your changes and submit a pull request. See scikit-tda's
119+
[contributing docs](https://github.com/scikit-tda/scikit-tda/blob/master/CONTRIBUTING.md) for more
120+
detailed information. We will do our best to work through any issues with you and get your code merged into the main branch.
115121

116122
If you found a bug, have questions, or are just having trouble with the library, please open an issue in our [issue tracker](https://github.com/scikit-tda/ripser.py/issues/new) and we'll try to help resolve the concern.
117123

124+
118125
# License
119126

120127
Ripser.py is available under an MIT license! The core C++ code is derived from Ripser, which is also available under an MIT license and copyright to Ulrich Bauer. The modifications, Python code, and documentation is copyright to Christopher Tralie and Nathaniel Saul.

docs/conf.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,29 @@
11
# -*- coding: utf-8 -*-
22
import os
33
import sys
4-
sys.path.insert(0, os.path.abspath('.'))
4+
5+
sys.path.insert(0, os.path.abspath("."))
56
from ripser import __version__
67
from sktda_docs_config import *
78

8-
project = u'Ripser.py'
9-
copyright = u'2019, Christopher Tralie and Nathaniel Saul'
10-
author = u'Christopher Tralie and Nathaniel Saul'
9+
project = "Ripser.py"
10+
copyright = "2019, Christopher Tralie and Nathaniel Saul"
11+
author = "Christopher Tralie and Nathaniel Saul"
1112
version = __version__
1213
release = __version__
13-
language = 'en'
14+
language = "en"
1415

15-
html_theme_options.update({
16-
# Google Analytics info
17-
'ga_ua': 'UA-124965309-2',
18-
'ga_domain': '',
19-
'gh_url': 'scikit-tda/ripser.py'
20-
})
16+
html_theme_options.update(
17+
{
18+
# Google Analytics info
19+
"ga_ua": "UA-124965309-2",
20+
"ga_domain": "",
21+
"gh_url": "scikit-tda/ripser.py",
22+
}
23+
)
2124

2225
html_short_title = project
23-
htmlhelp_basename = 'ripserdoc'
26+
htmlhelp_basename = "ripserdoc"
2427

2528
# Set canonical URL from the Read the Docs Domain
2629
html_baseurl = os.environ.get("READTHEDOCS_CANONICAL_URL", "")

0 commit comments

Comments
 (0)