Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 32 additions & 27 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
# This workflow will build docs and push it to branch gh-pages
# For more information see: https://github.com/marketplace/actions/deploy-to-github-pages-python
name: Docs

name: Generate pdoc3 documentation
on:
push:
branches:
- main
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build-and-deploy:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- run: uv sync --group docs
- run: uv run pdoc -o site livelossplot '!livelossplot.inputs'
- uses: actions/upload-pages-artifact@v3
with:
path: site

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install livelossplot with dependencies
run: |
pip install -e .
- name: Install pdoc3
run: |
pip install pdoc3
- name: Checkout
uses: actions/checkout@master
- name: Generate docs
run: |
pdoc3 --html livelossplot --force --output-dir docs --skip-errors
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/livelossplot/
- id: deployment
uses: actions/deploy-pages@v4
56 changes: 19 additions & 37 deletions .github/workflows/external_packages.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,27 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package with external dependencies
name: External integrations

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
build:

external:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install package and dev dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -r requirements-dev.txt
- name: Test TensorBoard output
run: |
pip install tensorflow tensorboard
pytest tests/external_test_tensorboard.py
- name: Test Keras input
run: |
pip install keras
pytest tests/external_test_keras.py
- name: Test PyTorch Ignite input
run: |
pip install pytorch-ignite
pytest tests/external_test_pytorch_ignite.py
- name: Test Poutyne input
run: |
pip install poutyne
pytest tests/external_test_poutyne.py
- name: Test Jupyter Notebook matplotlib output
run: |
pytest tests/external_test_examples.py
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- run: uv sync --group dev
- name: TensorBoard
run: uv run --with tensorflow --with tensorboard pytest tests/external_test_tensorboard.py
- name: Keras
run: uv run --with keras --with tensorflow pytest tests/external_test_keras.py
- name: PyTorch Ignite
run: uv run --with pytorch-ignite pytest tests/external_test_pytorch_ignite.py
- name: Poutyne
run: uv run --with poutyne pytest tests/external_test_poutyne.py
- name: Notebook examples
run: uv run pytest tests/external_test_examples.py
36 changes: 0 additions & 36 deletions .github/workflows/flake8_yapf.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- run: uv sync --group dev
- name: Ruff
run: uv run ruff check .
- name: Ty (informational)
run: uv run ty check livelossplot
continue-on-error: true
33 changes: 0 additions & 33 deletions .github/workflows/pythonpackage.yml

This file was deleted.

59 changes: 59 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Required: PYPI_API_TOKEN — generate at https://pypi.org/manage/account/token/

name: Release

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4

- name: Verify tag matches package version
run: |
TAG_VERSION="${GITHUB_REF_NAME#v}"
PKG_VERSION="$(uv run --no-project python -c 'import tomllib, pathlib; print(tomllib.loads(pathlib.Path("pyproject.toml").read_text())["project"]["version"])')"
if [ "$TAG_VERSION" != "$PKG_VERSION" ]; then
echo "Tag $GITHUB_REF_NAME does not match pyproject version $PKG_VERSION" >&2
exit 1
fi

- name: Build sdist + wheel
run: uv build

- name: Publish to PyPI
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: uv publish

- name: Extract changelog section
run: |
VERSION="${GITHUB_REF_NAME#v}"
awk -v ver="$VERSION" '
/^## \[/ {
if (in_section) { exit }
if (index($0, "[" ver "]") > 0) { in_section = 1; next }
}
in_section { print }
' CHANGELOG.md > release_notes.md
if [ ! -s release_notes.md ]; then
echo "No changelog section found for version $VERSION" >&2
exit 1
fi

- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "$GITHUB_REF_NAME" \
--title "$GITHUB_REF_NAME" \
--notes-file release_notes.md \
dist/*
22 changes: 22 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- run: uv sync --group dev --python ${{ matrix.python-version }}
- run: uv run --python ${{ matrix.python-version }} pytest
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ build/
tensorboard_logs/
examples/_test*
.mypy_cache/
.pytest_cache/
.ruff_cache/
.ty_cache/

# uv
.venv/

# OS / editor cruft
.DS_Store
Expand Down
3 changes: 0 additions & 3 deletions .yapfignore

This file was deleted.

19 changes: 9 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.5.7] - 2026-05-04
## [0.6.0] - 2026-05-04

### Fixed
### Changed

- `BokehPlot` now renders and live-updates inside Google Colab. Colab blocks Jupyter Comms, so `push_notebook` was silently dead; the plot is now embedded via `<iframe srcdoc>` and refreshed through an IPython `display_id` handle ([issue #109](https://github.com/stared/livelossplot/issues/109)).
- `Plot2d` works again as a `PlotLosses` output. Removed buggy `super().__init__(self)` in `LossSubplot`/`Plot1D` and reworked `Plot2d.send` to manage its own figure/axes and use the configured `predict` callback ([issue #137](https://github.com/stared/livelossplot/issues/137), PR #138).
- `MatplotlibPlot` no longer errors when `max_cols=1` (PR #147).
- Groups whose metrics start at different steps now plot correctly (PR #149).
- CI: install `tensorboard` explicitly — TensorFlow 2.16+ no longer bundles it, which broke `external_test_tensorboard.py`.
- Minimum Python is now 3.10.

### Removed

- Neptune.AI support (`NeptuneLogger`, `to_neptune`, and the related example/test) — Neptune is no longer maintained.
- Neptune.AI integration — Neptune is no longer maintained.

### Chore
### Fixed

- Default branch renamed `master` → `main`; build badges updated.
- `BokehPlot` now works in Google Colab ([issue #109](https://github.com/stared/livelossplot/issues/109)).
- `Plot2d` works again as a `PlotLosses` output ([issue #137](https://github.com/stared/livelossplot/issues/137)).
- `MatplotlibPlot` no longer errors when `max_cols=1` (PR #147).
- Groups whose metrics start at different steps now plot correctly (PR #149).

## [0.5.6] - 2025-01-03

Expand Down
Loading
Loading