Skip to content

Commit 59af567

Browse files
committed
Merge branch 'release/4.0.0rc1'
2 parents 98671dc + a0897ae commit 59af567

27 files changed

+1757
-2766
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
pyannote/pipeline/_version.py export-subst
21
doc/source/conf.py export-subst

.github/FUNDING.yml

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/doc.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Documentation
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
build-and-deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
persist-credentials: false
15+
fetch-depth: 0
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v5
18+
with:
19+
enable-cache: true
20+
cache-dependency-glob: uv.lock
21+
22+
- name: Install the project
23+
run: uv sync --extra doc
24+
25+
- name: Build documentation
26+
run: |
27+
make --directory=doc html
28+
touch ./doc/build/html/.nojekyll
29+
- name: Deploy
30+
uses: peaceiris/actions-gh-pages@v3
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
publish_dir: ./doc/build/html

.github/workflows/pypi.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
2+
3+
on: push
4+
5+
jobs:
6+
build:
7+
name: Build distribution 📦
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
persist-credentials: false
14+
fetch-depth: 0
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v5
17+
with:
18+
enable-cache: true
19+
cache-dependency-glob: uv.lock
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version-file: ".python-version"
24+
- name: Build
25+
run: uv build
26+
- name: Store the distribution packages
27+
uses: actions/upload-artifact@v4
28+
with:
29+
name: python-package-distributions
30+
path: dist/
31+
32+
publish-to-pypi:
33+
name: >-
34+
Publish Python 🐍 distribution 📦 to PyPI
35+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
36+
needs:
37+
- build
38+
runs-on: ubuntu-latest
39+
environment:
40+
name: pypi
41+
permissions:
42+
id-token: write
43+
steps:
44+
- name: Download all the dists
45+
uses: actions/download-artifact@v4
46+
with:
47+
name: python-package-distributions
48+
path: dist/
49+
- name: Install uv
50+
uses: astral-sh/setup-uv@v5
51+
with:
52+
enable-cache: true
53+
cache-dependency-glob: uv.lock
54+
- name: Publish distribution 📦 to PyPI
55+
run: uv publish --trusted-publishing always --publish-url https://upload.pypi.org/legacy/
56+
57+
58+
github-release:
59+
name: >-
60+
Sign the Python 🐍 distribution 📦 with Sigstore
61+
and upload them to GitHub Release
62+
needs:
63+
- publish-to-pypi
64+
runs-on: ubuntu-latest
65+
66+
permissions:
67+
contents: write # IMPORTANT: mandatory for making GitHub Releases
68+
id-token: write # IMPORTANT: mandatory for sigstore
69+
70+
steps:
71+
- name: Download all the dists
72+
uses: actions/download-artifact@v4
73+
with:
74+
name: python-package-distributions
75+
path: dist/
76+
- name: Sign the dists with Sigstore
77+
uses: sigstore/[email protected]
78+
with:
79+
inputs: >-
80+
./dist/*.tar.gz
81+
./dist/*.whl
82+
- name: Create GitHub Release
83+
env:
84+
GITHUB_TOKEN: ${{ github.token }}
85+
run: >-
86+
gh release create
87+
"$GITHUB_REF_NAME"
88+
--repo "$GITHUB_REPOSITORY"
89+
--notes ""
90+
- name: Upload artifact signatures to GitHub Release
91+
env:
92+
GITHUB_TOKEN: ${{ github.token }}
93+
# Upload to GitHub Release using the `gh` CLI.
94+
# `dist/` contains the built packages, and the
95+
# sigstore-produced signatures and certificates.
96+
run: >-
97+
gh release upload
98+
"$GITHUB_REF_NAME" dist/**
99+
--repo "$GITHUB_REPOSITORY"
100+
101+
# publish-to-testpypi:
102+
# name: Publish Python 🐍 distribution 📦 to TestPyPI
103+
# needs:
104+
# - build
105+
# runs-on: ubuntu-latest
106+
#
107+
# environment:
108+
# name: testpypi
109+
#
110+
# permissions:
111+
# id-token: write # IMPORTANT: mandatory for trusted publishing
112+
#
113+
# steps:
114+
# - name: Download all the dists
115+
# uses: actions/download-artifact@v4
116+
# with:
117+
# name: python-package-distributions
118+
# path: dist/
119+
# - name: Install uv
120+
# uses: astral-sh/setup-uv@v5
121+
# with:
122+
# enable-cache: true
123+
# cache-dependency-glob: uv.lock
124+
# - name: Publish distribution 📦 to PyPI
125+
# run: uv publish --trusted-publishing always --publish-url https://test.pypi.org/legacy/

.github/workflows/test.yml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,35 @@ name: Test
22

33
on:
44
pull_request:
5-
branches:
5+
branches:
66
- develop
77
push:
8-
branches:
8+
branches:
99
- develop
1010
- master
1111
- release/*
1212

13-
jobs:
14-
build:
1513

14+
jobs:
15+
test:
16+
name: Test
1617
runs-on: ubuntu-latest
1718
strategy:
18-
max-parallel: 4
1919
matrix:
20-
python-version: [3.8]
21-
20+
python-version:
21+
- "3.10"
22+
- "3.11"
23+
- "3.12"
24+
env:
25+
UV_PYTHON: ${{ matrix.python-version }}
2226
steps:
23-
- uses: actions/checkout@v2
24-
- name: Set up Python ${{ matrix.python-version }}
25-
uses: actions/setup-python@v2
26-
with:
27-
python-version: ${{ matrix.python-version }}
28-
- name: Install from source
29-
run: |
30-
python -m pip install --upgrade pip
31-
pip install .
32-
- name: Test with pytest
33-
run: |
34-
pip install pytest
35-
pytest tests/
27+
- uses: actions/checkout@v4
28+
29+
- name: Install uv
30+
uses: astral-sh/setup-uv@v5
31+
32+
- name: Install the project
33+
run: uv sync --extra test
34+
35+
- name: Run tests
36+
run: uv run pytest tests

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10

MANIFEST.in

Lines changed: 0 additions & 2 deletions
This file was deleted.

doc/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ BUILDDIR = build
1010

1111
# Put it first so that "make" without argument is like "make help".
1212
help:
13-
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
13+
uv run --extra doc $(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
1414

1515
.PHONY: help Makefile
1616

1717
# Catch-all target: route all unknown targets to Sphinx using the new
1818
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
1919
%: Makefile
20-
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
20+
uv run --extra doc $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

doc/source/changelog.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
Changelog
33
#########
44

5+
Version 4.0.0rc1 (2025-02-11)
6+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7+
8+
- BREAKING: drop support for `Python` < 3.10
9+
- BREAKING: switch to native namespace package
10+
- BREAKING: remove `pyannote.pipeline.blocks` submodule
11+
- setup: switch to `uv`
12+
513
Version 3.1.2 (2025-02-07)
614
~~~~~~~~~~~~~~~~~~~~~~~~~~
715

doc/source/conf.py

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
"sphinx.ext.mathjax",
4343
"sphinx.ext.viewcode",
4444
"sphinx.ext.githubpages",
45-
"matplotlib.sphinxext.plot_directive",
46-
"IPython.sphinxext.ipython_directive",
4745
]
4846

4947

@@ -68,15 +66,15 @@
6866
# You can specify multiple suffix as a list of string:
6967
#
7068
# source_suffix = ['.rst', '.md']
71-
source_suffix = ".rst"
69+
source_suffix = {".rst": "restructuredtext"}
7270

7371
# The master toctree document.
7472
master_doc = "index"
7573

7674
# General information about the project.
77-
project = u"pyannote.pipeline"
78-
copyright = u"2018, CNRS"
79-
author = u"Hervé Bredin"
75+
project = "pyannote.pipeline"
76+
copyright = "2017, CNRS"
77+
author = "Hervé Bredin"
8078

8179
# The version info for the project you're documenting, acts as replacement for
8280
# |version| and |release|, also used in various other places throughout the
@@ -94,7 +92,7 @@
9492
#
9593
# This is also used if you do content translation via gettext catalogs.
9694
# Usually you set "language" from the command line for these cases.
97-
language = None
95+
language = "en"
9896

9997
# List of patterns, relative to source directory, that match files and
10098
# directories to ignore when looking for source files.
@@ -113,10 +111,7 @@
113111
# The theme to use for HTML and HTML Help pages. See the documentation for
114112
# a list of builtin themes.
115113
#
116-
import sphinx_rtd_theme
117-
118114
html_theme = "sphinx_rtd_theme"
119-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
120115

121116
# Theme options are theme-specific and customize the look and feel of a theme
122117
# further. For a list of options available for each theme, see the
@@ -133,7 +128,7 @@
133128
# -- Options for HTMLHelp output ------------------------------------------
134129

135130
# Output file base name for HTML help builder.
136-
htmlhelp_basename = "pyannotecoredoc"
131+
htmlhelp_basename = "pyannotepipelinedoc"
137132

138133

139134
# -- Options for LaTeX output ---------------------------------------------
@@ -160,8 +155,8 @@
160155
(
161156
master_doc,
162157
"pyannotepipeline.tex",
163-
u"pyannote.pipeline Documentation",
164-
u"Hervé Bredin",
158+
"pyannote.pipeline Documentation",
159+
"Hervé Bredin",
165160
"manual",
166161
),
167162
]
@@ -172,7 +167,7 @@
172167
# One entry per manual page. List of tuples
173168
# (source start file, name, description, authors, manual section).
174169
man_pages = [
175-
(master_doc, "pyannotepipeline", u"pyannote.pipeline Documentation", [author], 1)
170+
(master_doc, "pyannotepipeline", "pyannote.pipeline Documentation", [author], 1)
176171
]
177172

178173

@@ -185,7 +180,7 @@
185180
(
186181
master_doc,
187182
"pyannotepipeline",
188-
u"pyannote.pipeline Documentation",
183+
"pyannote.pipeline Documentation",
189184
author,
190185
"pyannotepipeline",
191186
"One line description of project.",
@@ -194,7 +189,8 @@
194189
]
195190

196191
# Example configuration for intersphinx: refer to the Python standard library.
197-
intersphinx_mapping = {"https://docs.python.org/": None}
198-
199-
200-
ipython_savefig_dir = "../../build/html/_static"
192+
intersphinx_mapping = {
193+
"python": ("https://docs.python.org/", None),
194+
"pyannote.core": ("https://pyannote.github.io/pyannote-core", None),
195+
"pyannote.database": ("https://pyannote.github.io/pyannote-database", None),
196+
}

0 commit comments

Comments
 (0)