Skip to content

Commit 491d72c

Browse files
committed
Merge branch 'main' into pre-commit-ci-update-config
2 parents 55f46e6 + 4d14187 commit 491d72c

47 files changed

Lines changed: 157 additions & 104 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.cursor/worktrees.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"setup-worktree": [
3+
"make init"
4+
]
5+
}

.github/workflows/check-release-notes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
timeout-minutes: 1
2424
steps:
25-
- uses: actions/checkout@v5
25+
- uses: actions/checkout@v6
2626

2727
- name: Default MISSING_CHANGELOG_ENTRY to 1
2828
run: echo 'MISSING_CHANGELOG_ENTRY=1' >> "$GITHUB_ENV"

.github/workflows/ci.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
timeout-minutes: 6
2424
steps:
25-
- uses: actions/checkout@v5
25+
- uses: actions/checkout@v6
2626
- uses: ./.github/actions/setup-python
2727
with:
2828
python-version: "3.10"
@@ -64,9 +64,11 @@ jobs:
6464
# - windows-latest
6565
fail-fast: true
6666
runs-on: ${{ matrix.os }}
67+
env:
68+
DIFF_AGAINST: HEAD
6769
timeout-minutes: 8
6870
steps:
69-
- uses: actions/checkout@v5
71+
- uses: actions/checkout@v6
7072
with:
7173
# TODO: This can be very expensive for large repos. Is there a better way to do this?
7274
# Fetch all history and tags for setuptools_scm to work
@@ -84,28 +86,20 @@ jobs:
8486
- name: Run unit tests
8587
shell: bash
8688
run: tox -e tests-unit
87-
env:
88-
DIFF_AGAINST: HEAD
8989

9090
- name: Run E2E tests
9191
shell: bash
9292
run: tox -e tests-e2e
93-
env:
94-
DIFF_AGAINST: HEAD
9593

9694
- name: Test the CI/CD utilities
9795
shell: bash
9896
run: tox -e tests-cicd_utils
99-
env:
100-
DIFF_AGAINST: HEAD
10197

10298
# Combine coverage reports from all test suites
10399

104100
- name: Combine coverage reports
105101
shell: bash
106102
run: tox -e coverage-combine
107-
env:
108-
DIFF_AGAINST: HEAD
109103

110104
# Upload coverage reports to Codecov
111105

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
# actions: read
3030
# contents: read
3131
steps:
32-
- uses: actions/checkout@v5
32+
- uses: actions/checkout@v6
3333

3434
- uses: github/codeql-action/init@v4
3535
with:

.github/workflows/release.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
runs-on: ubuntu-latest
3333
timeout-minutes: 6
3434
steps:
35-
- uses: actions/checkout@v5
35+
- uses: actions/checkout@v6
3636
with:
3737
# TODO: This can be very expensive for large repos. Is there a better way to do this?
3838
# Fetch all history and tags for setuptools_scm to work
@@ -43,7 +43,7 @@ jobs:
4343
requirements: tox
4444
- name: Build source (sdist) and binary (wheel) distributions
4545
run: tox -e build-dists
46-
- uses: actions/upload-artifact@v5
46+
- uses: actions/upload-artifact@v6
4747
with:
4848
name: python-package-distributions
4949
path: dist/
@@ -61,7 +61,7 @@ jobs:
6161
permissions:
6262
id-token: write # IMPORTANT: mandatory for trusted publishing
6363
steps:
64-
- uses: actions/download-artifact@v6
64+
- uses: actions/download-artifact@v7
6565
with:
6666
name: python-package-distributions
6767
path: dist/
@@ -84,7 +84,7 @@ jobs:
8484
permissions:
8585
id-token: write # IMPORTANT: mandatory for trusted publishing
8686
steps:
87-
- uses: actions/download-artifact@v6
87+
- uses: actions/download-artifact@v7
8888
with:
8989
name: python-package-distributions
9090
path: dist/
@@ -105,7 +105,7 @@ jobs:
105105
steps:
106106

107107
# Generate the release notes
108-
- uses: actions/checkout@v5
108+
- uses: actions/checkout@v6
109109
with:
110110
# TODO: This can be very expensive for large repos. Is there a better way to do this?
111111
# Fetch all history and tags for setuptools_scm to work
@@ -119,7 +119,7 @@ jobs:
119119

120120
# Sign the package distributions with Sigstore
121121
# https://github.com/marketplace/actions/gh-action-sigstore-python
122-
- uses: actions/download-artifact@v6
122+
- uses: actions/download-artifact@v7
123123
with:
124124
name: python-package-distributions
125125
path: dist/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# ============================================================================
44

55
docs/_static/charts/*.html
6+
docs/_static/js/plotly.min.js
67
docs/api/autogen
78
docs/api/public
89

MANIFEST.in

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,25 @@ include docs/Makefile
2121
include docs/make.bat
2222
include docs/robots.txt
2323
include docs/_static/favicon.ico
24+
exclude docs/_static/js/plotly.min.js
2425
recursive-include docs *.md *.py *.rst
2526
recursive-include docs/_static/charts *.webp
2627
recursive-include docs/_static/css *.css
27-
recursive-include docs/_static/img *.png *.webp *.svg *.gif *.jpg
28+
recursive-include docs/_static/img *.png *.webp *.svg *.gif *.jpeg
2829
recursive-include docs/_static/js *.js
2930
recursive-include docs/_templates *.html
3031
prune docs/_build
3132
prune docs/api/autogen
3233
prune docs/api/public
3334

3435
# Misc
36+
recursive-include .cursor *.json
3537
recursive-include .github *.yml *.yaml
3638
recursive-include cicd_utils README.md *.py *.sh
3739
recursive-include misc *.py *.ipynb *.txt *.png
3840
recursive-include requirements *.txt
3941
recursive-include tests *.py
40-
recursive-include tests/e2e/artifacts *.jpeg *.json
42+
recursive-include tests/e2e/artifacts *.json
4143

4244
# Globally excluded patterns
4345
recursive-exclude * *.py[cod] *.egg-info __pycache__ .ipynb_checkpoints/*

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ clean-docs: ## remove documentation build artifacts
9696
@echo "==> Removing documentation build artifacts..."
9797
@rm -fr docs/_build/ docs/api/autogen/ docs/api/public/
9898
@find . -wholename 'docs/_static/charts/*.html' -exec rm -fr {} +
99+
@rm -f docs/_static/js/plotly.min.js
99100

100101

101102
.PHONY: clean-build

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ The full official documentation can be found at: https://ridgeplot.readthedocs.i
4646

4747
### Basic example
4848

49-
For those in a hurry, here's a very basic example on how to quickly get started with [ridgeplot()](https://ridgeplot.readthedocs.io/en/stable/api/public/ridgeplot.ridgeplot.html) function.
49+
For those in a hurry, here's a very basic example on how to quickly get started with the [ridgeplot()](https://ridgeplot.readthedocs.io/en/stable/api/public/ridgeplot.ridgeplot.html) function.
5050

5151
```python
5252
import numpy as np
5353
from ridgeplot import ridgeplot
5454

55-
my_samples = [np.random.normal(n / 1.2, size=600) for n in range(7, 0, -1)]
55+
my_samples = [np.random.normal(n, size=900) for n in range(6, 0, -2)]
5656
fig = ridgeplot(samples=my_samples)
5757
fig.show()
5858
```

cicd_utils/ridgeplot_examples/_base.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ class Example:
7070

7171
def __post_init__(self) -> None:
7272
self.fig = self.figure_factory() # pyright: ignore[reportUninitializedInstanceVariable]
73+
74+
# Both `width` and `height` should be set in all example plots
75+
if self.fig.layout.width != 800:
76+
raise ValueError("All figures must have width 800")
77+
if not isinstance(self.fig.layout.height, int):
78+
raise ValueError("All figures must have an explicit height declared") # noqa: TRY004
79+
7380
round_fig_data(self.fig, sig_figs=8)
7481

7582
def to_json(self) -> str:
@@ -86,8 +93,6 @@ def write_json(self, path: Path) -> None:
8693
def write_html(self, path: Path, minify_html: bool) -> None:
8794
fig = deepcopy(self.fig)
8895

89-
if fig.layout.height is None:
90-
raise ValueError("The Figure's layout.height value must be explicitly set.")
9196
# Overriding the width to None results in a '100%' CSS width.
9297
# This is achieved by setting the `default_width` parameter
9398
# in `fig.to_html()` to "100%" (see below).
@@ -140,6 +145,8 @@ def write_webp(self, path: Path) -> None:
140145
engine="kaleido",
141146
)
142147

148+
# This method isn't used anywhere anymore but
149+
# will be kept here for potential future use
143150
def write_jpeg(self, path: Path) -> None:
144151
fig = deepcopy(self.fig)
145152
fig = tighten_margins(fig, px=40)

0 commit comments

Comments
 (0)