Skip to content

Commit c6c2aba

Browse files
author
rgaudin
authored
Merge pull request #114 from openzim/update-libzim
Update libzim
2 parents 38b16c5 + 29f976a commit c6c2aba

24 files changed

+2280
-1554
lines changed

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
max-line-length = 88

.github/workflows/test.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ name: test
22
on: [push]
33

44
env:
5-
LIBZIM_VERSION: 2021-04-26
5+
LIBZIM_VERSION: 2021-10-05
66
LIBZIM_INCLUDE_PATH: include/zim
77
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
8-
MAX_LINE_LENGTH: 88
98
PROFILE: 1
109

1110
jobs:
@@ -20,18 +19,11 @@ jobs:
2019
python-version: 3.6
2120
architecture: x64
2221

23-
- name: Autoformat with black
22+
- name: Check formatting and linting
2423
run: |
25-
pip install black
26-
black --check .
27-
28-
- name: Lint with flake8
29-
run: |
30-
pip install flake8
31-
# one pass for show-stopper syntax errors or undefined names
32-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
33-
# one pass for small stylistic things
34-
flake8 . --count --max-line-length=$MAX_LINE_LENGTH --statistics
24+
pip install -U invoke
25+
invoke install-dev
26+
invoke check
3527
3628
test:
3729
runs-on: ${{ matrix.os }}
@@ -77,7 +69,7 @@ jobs:
7769
if: steps.cache-libzim.outputs.cache-hit != 'true'
7870
run: |
7971
wget -q https://download.openzim.org/nightly/$LIBZIM_VERSION/$LIBZIM_RELEASE.tar.gz
80-
tar --gunzip --extract --file=$LIBZIM_RELEASE.tar.gz
72+
tar --extract --file=$LIBZIM_RELEASE.tar.gz
8173
mv $LIBZIM_RELEASE libzim_dist
8274
8375
- name: Link libzim dylib & headers into workspace lib and include folders

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ __pycache__
88
.tox
99
.coverage
1010
coverage.*
11+
*.swp
12+
1113

1214
# Compiled binaries and package builds
1315
*.so

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ pipenv run pip install -e .
3030
### Run Linters & Tests
3131

3232
```bash
33-
# Autoformat code with black
34-
black --exclude=setup.py .
35-
# Lint and check for errors with flake8
36-
flake8 --exclude=setup.py .
33+
# Check format and linting
34+
invoke check
35+
# Autoformat and import sorting
36+
invoke lint
3737
# Typecheck with mypy (optional)
3838
mypy .
3939
# Run tests
40-
pytest .
40+
invoke test
4141
```
4242

4343
### Rebuild Cython extension during development

examples/basic_writer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import uuid
2121

2222
from libzim.reader import Archive
23-
from libzim.writer import Item, StringProvider, Creator
23+
from libzim.writer import Creator, Item, StringProvider
2424

2525

2626
class TestItem(Item):

libzim/__init__.py

Lines changed: 0 additions & 18 deletions
This file was deleted.

libzim/lib.cxx

Lines changed: 0 additions & 154 deletions
This file was deleted.

libzim/lib.h

Lines changed: 0 additions & 129 deletions
This file was deleted.

0 commit comments

Comments
 (0)