Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade dependencies and fix typo #205

Merged
merged 4 commits into from
Jun 21, 2024
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
1 change: 1 addition & 0 deletions .github/workflows/Tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- name: Upload coverage report to codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}

build_python:
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- repo: https://github.com/psf/black
rev: "24.4.0"
rev: "24.4.2"
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.0
rev: v0.4.10
hooks:
- id: ruff
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.359
rev: v1.1.368
hooks:
- id: pyright
name: pyright (system)
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Updgrade to zimscraperlib 3.4.0 (including **new webm encoder presets to migrate to VP9 instead of VP8**) (#204)

### Fixed

- Retry logic is still failing because req might be null when timeout occurs (#203)
- Typo in disable-metadata-checks arg in ted2zim-multi (#202)

## [3.0.1] - 2024-05-14

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This project is aimed at creating a sustainable solution to make TED accessible

`ted2zim` adheres to openZIM's [Contribution Guidelines](https://github.com/openzim/overview/wiki/Contributing).

`ted2zim` has implemented openZIM's [Python bootstrap, conventions and policies](https://github.com/openzim/_python-bootstrap/docs/Policy.md) **v1.0.1**.
`ted2zim` has implemented openZIM's [Python bootstrap, conventions and policies](https://github.com/openzim/_python-bootstrap/docs/Policy.md) **v1.0.2**.

## Getting started :rocket:

Expand Down
20 changes: 10 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ description = "Make ZIM file from TED Talks"
readme = "README.md"
dependencies = [
"python-dateutil==2.9.0.post0",
"zimscraperlib==3.3.2",
"requests==2.32.0",
"zimscraperlib==3.4.0",
"requests==2.32.3",
"beautifulsoup4==4.12.3",
"Jinja2==3.1.4",
"kiwixstorage==0.8.3",
"kiwixstorage==0.9.0",
"pif==0.8.2",
"python-slugify==8.0.4",
"yt-dlp", # yt-dlp should be updated as frequently as possible
Expand All @@ -28,25 +28,25 @@ kind = "scraper"
additional-keywords = ["ted"]

[tool.hatch.build.hooks.openzim-build]
dependencies = [ "zimscraperlib==3.3.2"] # required for fix_ogv_dist
dependencies = [ "zimscraperlib==3.4.0"] # required for fix_ogv_dist

[project.optional-dependencies]
scripts = [
"invoke==2.2.0",
]
lint = [
"black==24.4.0",
"ruff==0.4.0",
"black==24.4.2",
"ruff==0.4.10",
]
check = [
"pyright==1.1.359",
"pyright==1.1.368",
]
test = [
"pytest==8.1.1",
"coverage==7.4.4",
"pytest==8.2.2",
"coverage==7.5.3",
]
dev = [
"pre-commit==3.7.0",
"pre-commit==3.7.1",
"debugpy==1.8.1",
"ted2zim[scripts]",
"ted2zim[lint]",
Expand Down
4 changes: 2 additions & 2 deletions src/ted2zim/multi/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
args += ["--debug"]

if self.disable_metadata_checks:
args += ["--disable-metadatachecks"]
args += ["--disable-metadata-checks"]

Check warning on line 288 in src/ted2zim/multi/scraper.py

View check run for this annotation

Codecov / codecov/patch

src/ted2zim/multi/scraper.py#L288

Added line #L288 was not covered by tests

logger.debug(nicer_args_join(args))
process = subprocess.run(
Expand Down Expand Up @@ -317,7 +317,7 @@
if self.debug:
args += ["--debug"]
if self.disable_metadata_checks:
args += ["--disable-metadatachecks"]
args += ["--disable-metadata-checks"]

Check warning on line 320 in src/ted2zim/multi/scraper.py

View check run for this annotation

Codecov / codecov/patch

src/ted2zim/multi/scraper.py#L320

Added line #L320 was not covered by tests
return subprocess.run(args, check=False).returncode

def fetch_metadata(self):
Expand Down
1 change: 1 addition & 0 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ def report_cov(ctx: Context, *, html: bool = False):
"""report coverage"""
ctx.run("coverage combine", warn=True, pty=use_pty)
ctx.run("coverage report --show-missing", pty=use_pty)
ctx.run("coverage xml", pty=use_pty)
if html:
ctx.run("coverage html", pty=use_pty)

Expand Down
Loading