Skip to content

Commit

Permalink
Merge pull request #182 from tpvasconcelos/ci
Browse files Browse the repository at this point in the history
Add official support for Python 3.12
  • Loading branch information
tpvasconcelos authored Apr 19, 2024
2 parents 73e05c0 + cf69c73 commit bff5b47
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,16 @@ jobs:
- "3.9"
- "3.10"
- "3.11"
# - "3.12"
- "3.12"
os:
- ubuntu-latest
- macos-latest
# There shouldn't be any behavior differences between
# OSes, so we'll only run the test suite on Ubuntu for now.
# Also, since I (the main maintainer) develop on a macOS
# machine, I'll run the tests locally on macOS before
# merging any PRs or releasing new versions. This should
# be sufficient and will speed up the CI process...
# - macos-latest
# - windows-latest
fail-fast: true
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 4 additions & 0 deletions docs/reference/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Unreleased changes
- Use `importlib.resources` to load data assets from within the package - to be PEP-302 compliant ({gh-issue}`176`)
- Enforce "strict" mypy mode (mostly improved type annotations for generic types) ({gh-issue}`177`)

### CI/CD

- Add support for Python 3.12 ({gh-issue}`182`)

---

0.1.24
Expand Down
2 changes: 2 additions & 0 deletions src/ridgeplot/_figure_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ def get_xy_extrema(densities: Densities) -> tuple[Numeric, Numeric, Numeric, Num
... )
(-2, 4, 0, 4)
"""
if len(densities) == 0:
raise ValueError("The densities array should not be empty.")
x_flat: list[Numeric] = []
y_flat: list[Numeric] = []
for row in densities:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_figure_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class TestGetXYExtrema:

def test_raise_for_empty_sequence(self) -> None:
# Fails for empty sequence
with pytest.raises(ValueError, match="arg is an empty sequence"):
with pytest.raises(ValueError, match="The densities array should not be empty"):
get_xy_extrema(densities=[])

def test_raise_for_non_2d_array(self) -> None:
Expand Down

0 comments on commit bff5b47

Please sign in to comment.