Skip to content

Commit

Permalink
Merge branch 'main' into smarter-reverse
Browse files Browse the repository at this point in the history
  • Loading branch information
jeertmans authored Dec 5, 2024
2 parents c57ce6c + 628c8da commit 18f79f8
Show file tree
Hide file tree
Showing 28 changed files with 3,820 additions and 1,017 deletions.
4 changes: 3 additions & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ body:
label: Terms
description: 'By submitting this issue, I have:'
options:
- label: Checked the [existing issues](https://github.com/jeertmans/manim-slides/issues?q=is%3Aissue+label%3Adocumentation+) and [discussions](https://github.com/jeertmans/manim-slides/discussions) to see if my issue had not already been reported;
- label: Checked the [existing issues](https://github.com/jeertmans/manim-slides/issues?q=is%3Aissue+label%3Abug+) and [discussions](https://github.com/jeertmans/manim-slides/discussions) to see if my issue had not already been reported;
required: true
- label: Checked the [frequently asked questions]](https://manim-slides.eertmans.be/latest/faq.html);
required: true
- label: Read the [installation instructions](https://manim-slides.eertmans.be/latest/installation.html);
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ body:
label: Terms
description: 'By submitting this issue, I have:'
options:
- label: Checked the [existing issues](https://github.com/jeertmans/manim-slides/issues?q=is%3Aissue+label%3Adocumentation+) and [discussions](https://github.com/jeertmans/manim-slides/discussions) to see if my issue had not already been reported;
- label: Checked the [existing issues](https://github.com/jeertmans/manim-slides/issues?q=is%3Aissue+label%3Aenhancement+) and [discussions](https://github.com/jeertmans/manim-slides/discussions) to see if my issue had not already been reported;
required: true

- type: textarea
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Rye
env:
RYE_INSTALL_OPTION: --yes
run: |
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
- name: Configure Rye
run: rye config --set-bool behavior.use-uv=true
- name: Setup uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true

- name: Build package
run: rye build
run: uv build

- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
Expand All @@ -41,7 +36,6 @@ jobs:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -72,7 +66,7 @@ jobs:
with:
platforms: linux/arm64,linux/amd64
file: docker/Dockerfile
push: true
push: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
tags: |
ghcr.io/jeertmans/manim-slides:latest
ghcr.io/jeertmans/manim-slides:${{ steps.create_release.outputs.tag_name }}
34 changes: 5 additions & 29 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,29 +69,10 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Rye
if: matrix.os != 'windows-latest'
env:
RYE_TOOLCHAIN_VERSION: ${{ matrix.pyversion}}
RYE_INSTALL_OPTION: --yes
run: |
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
# Stolen from https://github.com/bluss/pyproject-local-kernel/blob/2b641290694adc998fb6bceea58d3737523a68b7/.github/workflows/ci.yaml
- name: Install Rye (Windows)
if: matrix.os == 'windows-latest'
shell: bash
run: |
C:/msys64/usr/bin/wget.exe -q 'https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-windows.exe' -O rye-x86_64-windows.exe
./rye-x86_64-windows.exe self install --toolchain-version ${{ matrix.pyversion }} --modify-path -y
echo "$HOME\\.rye\\shims" >> $GITHUB_PATH
- name: Configure Rye
shell: bash
run: |
rye config --set-bool behavior.use-uv=true
rye pin ${{ matrix.pyversion }}
- name: Setup uv
uses: astral-sh/setup-uv@v3
with:
enable-cache: true

- name: Install manim dependencies on MacOS
if: matrix.os == 'macos-latest'
Expand All @@ -112,13 +93,8 @@ jobs:
if: matrix.os == 'windows-latest'
uses: ssciwr/setup-mesa-dist-win@v2

- name: Install Manim Slides
shell: bash
run: rye sync

- name: Run pytest
shell: bash
run: rye run pytest
run: uv run --python ${{ matrix.pyversion }} --frozen --extra tests pytest

- name: Upload to codecov.io
uses: codecov/codecov-action@v4
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ __pycache__/
/build
/dist
*.egg-info/
.pdm-python

# Manim files
images/
Expand Down Expand Up @@ -45,7 +44,7 @@ paper/paper.pdf
paper/media/

# Others
.coverage
.coverage*
coverage.xml

rendering_times.csv
10 changes: 3 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ci:
autoupdate_commit_msg: 'chore(deps): pre-commit autoupdate'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-yaml
- id: check-toml
Expand All @@ -20,18 +20,14 @@ repos:
- id: pretty-format-toml
exclude: poetry.lock
args: [--autofix, --trailing-commas]
- repo: https://github.com/keewis/blackdoc
rev: v0.3.9
hooks:
- id: blackdoc
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.3
rev: v0.7.1
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.13.0
hooks:
- id: mypy
additional_dependencies: [types-requests, types-setuptools]
Expand Down
3 changes: 0 additions & 3 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ build:
apt_packages:
- libpango1.0-dev
- ffmpeg
jobs:
post_install:
- ipython kernel install --name "manim-slides" --user
sphinx:
builder: html
configuration: docs/source/conf.py
Expand Down
56 changes: 51 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,48 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<!-- start changelog -->

(unreleased)=
## [Unreleased](https://github.com/jeertmans/manim-slides/compare/v5.1.7...HEAD)
## [Unreleased](https://github.com/jeertmans/manim-slides/compare/v5.1.10...HEAD)

(unreleased-added)=
(v5.1.10)=
## [v5.1.10](https://github.com/jeertmans/manim-slides/compare/v5.1.9...v5.1.10)

(v5.1.10-added)=
### Added

- Added `--offline` option to `manim-slides convert` for offline
HTML presentations.
[#440](https://github.com/jeertmans/manim-slides/pull/440)

(v5.1.10-changed)=
### Changed

- Allow multiple slide reverses by going backward [@PeculiarProgrammer](https://github.com/PeculiarProgrammer).
[#488](https://github.com/jeertmans/manim-slides/pull/488)

(v5.1.10-fixed)=
### Fixed

- Fixed PyAV issue by pinning its version to `<14`.
A future release will contain a fix that supports both `av>=14`
and `av<14`, as their syntax differ, but the former doesn't
provide binary wheels for Python 3.9.
[#494](https://github.com/jeertmans/manim-slides/pull/494)
- Fixed blank web page when converting multiple slides into HTML.
[#497](https://github.com/jeertmans/manim-slides/pull/497)

(v5.1.9)=
## [v5.1.9](https://github.com/jeertmans/manim-slides/compare/v5.1.8...v5.1.9)

(v5.1.9-fixed)=
## Chore

- Fixed failing docker builds.
[#481](https://github.com/jeertmans/manim-slides/pull/481)

(v5.1.8)=
## [v5.1.8](https://github.com/jeertmans/manim-slides/compare/v5.1.7...v5.1.8)

(v5.1.8-added)=
### Added

- Added `manim-slides checkhealth` command to easily obtain important information
Expand All @@ -19,8 +58,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added support for `disable_caching` and `flush_cache` options from Manim, and
also the possibility to configure them through class options.
[#452](https://github.com/jeertmans/manim-slides/pull/452)
- Added `--to=zip` convert format to generate an archive with HTML output
and asset files.
[#470](https://github.com/jeertmans/manim-slides/pull/470)

(unreleased-chore)=
(v5.1.8-chore)=
### Chore

- Pin `rtoml==0.9.0` on Windows platforms,
Expand All @@ -41,8 +83,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#462](https://github.com/jeertmans/manim-slides/pull/462)
- Fixed deprecation warnings.
[#467](https://github.com/jeertmans/manim-slides/pull/467)
- Documented potential fix for PPTX issue.
[#475](https://github.com/jeertmans/manim-slides/pull/475)
- Changed project manager from Rye to uv.
[#476](https://github.com/jeertmans/manim-slides/pull/476)

(unreleased-fixed)=
(v5.1.8-fixed)=
### Fixed

- Fix combining assets from multiple scenes to avoid filename collision.
Expand All @@ -53,7 +99,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
thanks to [@PeculiarProgrammer](https://github.com/PeculiarProgrammer)!
[#465](https://github.com/jeertmans/manim-slides/pull/465)

(unreleased-removed)=
(v5.1.8-removed)=
### Removed

- Removed `full-gl` extra, because it does not make sense to ship both
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ keywords:
- PowerPoint
- Python
license: MIT
version: v5.1.7
version: v5.1.10
preferred-citation:
publisher:
name: The Open Journal
Expand Down
17 changes: 9 additions & 8 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Mostly a copy from https://github.com/ManimCommunity/manim/blob/68bd79093e1ebc1ed9f8051942ffe6e72a9e66a7/docker/Dockerfile
# Mostly a copy from https://github.com/ManimCommunity/manim/blob/v0.18.1/docker/Dockerfile
FROM python:3.11-slim

RUN apt-get update -qq \
&& apt-get install --no-install-recommends -y \
ffmpeg \
build-essential \
gcc \
cmake \
Expand All @@ -24,21 +23,23 @@ RUN wget -O /tmp/install-tl-unx.tar.gz http://mirror.ctan.org/systems/texlive/tl
tar -xzf /tmp/install-tl-unx.tar.gz -C /tmp/install-tl --strip-components=1 && \
/tmp/install-tl/install-tl --profile=/tmp/texlive-profile.txt \
&& tlmgr install \
amsmath babel-english cbfonts-fd cm-super ctex doublestroke dvisvgm everysel \
amsmath babel-english cbfonts-fd cm-super count1to ctex doublestroke dvisvgm everysel \
fontspec frcursive fundus-calligra gnu-freefont jknapltx latex-bin \
mathastext microtype ms physics preview ragged2e relsize rsfs \
mathastext microtype multitoc physics prelim2e preview ragged2e relsize rsfs \
setspace standalone tipa wasy wasysym xcolor xetex xkeyval

# clone and build manim-slides
COPY . /opt/manim-slides
WORKDIR /opt/manim-slides
RUN pip install --no-cache manim[jupyterlab] .[sphinx-directive]
ENV UV_PYTHON=/usr/local/bin/python
RUN pip install --no-cache-dir uv
RUN uv pip install --no-cache-dir manim[jupyterlab] .[sphinx-directive]

ARG NB_USER=manimslidesuser
ARG NB_UID=1000
ENV USER ${NB_USER}
ENV NB_UID ${NB_UID}
ENV HOME /manim-slides
ENV USER=${NB_USER}
ENV NB_UID=${NB_UID}
ENV HOME=/manim-slides

RUN adduser --disabled-password \
--gecos "Default user" \
Expand Down
21 changes: 13 additions & 8 deletions docs/source/contributing/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,30 @@ the repository, and clone it locally.

As for every Python project, using virtual environment is recommended to avoid
conflicts between modules.
For this project, we use [Rye](https://rye.astral.sh/) to easily manage project
For this project, we use [uv](https://github.com/astral-sh/uv) to easily manage project
and development dependencies. If not already, please install this tool.

## Installing Python modules

With Rye, installation becomes straightforward:
With uv, installation becomes straightforward:

```bash
rye sync --all-features
uv sync --all-extras
```

:::{note}
You still need the same dependencies as to install Manim and ManimGL,
so please check their respective installation guides.
:::

## Running commands

Because modules are installed in a new Python environment,
you cannot use them directly in the shell.
Instead, you either need to prepend `rye run` to any command, e.g.:
Instead, you either need to prepend `uv run` to any command, e.g.:

```bash
rye run manim-slides wizard
uv run manim-slides wizard
```

## Testing your code
Expand All @@ -51,7 +56,7 @@ Most of the tests are done with GitHub actions, thus not on your computer.
The only command you should run locally is:

```bash
rye run pre-commit run --all-files
uv run pre-commit run --all-files
```

This runs a few linter and formatter to make sure the code quality and style stay
Expand All @@ -61,7 +66,7 @@ If a warning or an error is displayed, please fix it before going to next step.
For testing your code, simply run:

```bash
rye run pytest
uv run pytest
```

## Building the documentation
Expand All @@ -73,7 +78,7 @@ To generate the documentation, run the following:

```bash
cd docs
rye run make html
uv run make html
```

Then, the output index file is located at `docs/build/html/index.html` and
Expand Down
9 changes: 8 additions & 1 deletion docs/source/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,12 @@ with ManimCE or ManimGL.
### Slides go black when video finishes

This is an issue with Qt,
which cannot be solve on all platforms and Python versions,
which cannot be solved on all platforms and Python versions,
see [#293](https://github.com/jeertmans/manim-slides/issues/293).

Recent version of Manim Slides, i.e., `manim-slides>5.1.7`, come
with a fix that should work fine.

### How to increase quality on Windows

On Windows platform, one may encounter a lower image resolution than expected.
Expand Down Expand Up @@ -120,3 +123,7 @@ This issue is (probably) caused by PowerPoint never freeing
memory, causing memory allocation errors, and can be partially
solved by reducing the video quality or the number of slides,
see [#392](https://github.com/jeertmans/manim-slides/issues/392).

Another solution, suggested by [@Azercoco](https://github.com/Azercoco) in
[#392 (comment)](https://github.com/jeertmans/manim-slides/issues/392#issuecomment-2368198106),
is to disable hardware/GPU acceleration.
Loading

0 comments on commit 18f79f8

Please sign in to comment.