Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeLametta committed May 17, 2021
2 parents b1718a2 + 236544d commit be1db82
Show file tree
Hide file tree
Showing 75 changed files with 2,479 additions and 1,380 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Greetings

on: [pull_request, issues]
on: [pull_request_target, issues]

jobs:
greeting:
Expand Down
37 changes: 24 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,42 @@
dist: xenial
sudo: required
os: linux
dist: focal

# This is needed by setuptools_scm to generate a correct version string
git:
depth: false

language: python
python:
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10-dev"
virtualenv:
system_site_packages: false

cache: pip

env:
- FLAKE8=false
- FLAKE8=true

jobs:
allow_failures:
- python: "3.5"
- python: "3.10-dev"
include:
- python: 3.9
env: FLAKE8=true

install:
# Dependencies
- sudo apt-get -qq update
- pip install --upgrade -qq pip
- sudo apt-get -qq install cdparanoia cdrdao flac gir1.2-glib-2.0 libcdio-dev libgirepository1.0-dev libiso9660-dev libsndfile1-dev sox swig libcdio-utils
# newer version of pydcio requires newer version of libcdio than travis has
- pip install pycdio==0.21
# install rest of dependencies
- pip install -r requirements.txt

# Testing dependencies
- pip install twisted flake8

- sudo apt-get -qq install cd-paranoia cdrdao flac git libcdio-dev libdiscid-dev libgirepository1.0-dev libiso9660-dev libsndfile1-dev sox swig
# Lock pycdio version to the right one for Ubuntu focal
- pip install pycdio==2.1.0
# flake8 and twisted are testing dependencies
- pip install flake8 twisted -r requirements.txt
# Installing
- python setup.py install

Expand Down
245 changes: 146 additions & 99 deletions CHANGELOG.md

Large diffs are not rendered by default.

75 changes: 37 additions & 38 deletions COVERAGE
Original file line number Diff line number Diff line change
@@ -1,55 +1,54 @@
Coverage.py 4.5.4 text report against whipper v0.9.0
Coverage.py 5.5 text report against whipper v0.10.0

$ coverage run --branch --omit='whipper/test/*' --source=whipper -m unittest discover
$ coverage report -m

Name Stmts Miss Branch BrPart Cover Missing
-----------------------------------------------------------------------------
whipper/__init__.py 15 5 4 2 63% 9-12, 16, 18, 15->16, 17->18
whipper/__main__.py 7 7 2 0 0% 4-14
whipper/__init__.py 15 5 4 2 63% 9-12, 16, 18
whipper/__main__.py 6 6 2 0 0% 4-13
whipper/command/__init__.py 0 0 0 0 100%
whipper/command/accurip.py 41 41 18 0 0% 21-90
whipper/command/basecommand.py 69 29 30 8 53% 70, 72, 76, 82-88, 98-102, 107-114, 127, 129, 133, 139, 142-145, 68->70, 71->72, 75->76, 80->82, 96->98, 106->107, 126->127, 128->129
whipper/command/cd.py 227 189 60 0 13% 72-80, 85-196, 199, 212, 236-288, 295-321, 324-493
whipper/command/basecommand.py 68 29 30 8 52% 72, 74, 78, 84-90, 100-104, 109-116, 129, 131, 135, 141, 144-147
whipper/command/cd.py 272 231 88 0 11% 81-89, 94-209, 212, 225, 252-324, 331-366, 369-594
whipper/command/drive.py 57 57 10 0 0% 21-107
whipper/command/image.py 37 37 6 0 0% 21-75
whipper/command/main.py 68 68 24 0 0% 4-116
whipper/command/mblookup.py 29 3 8 2 86% 21-23, 35->37, 37->28
whipper/command/offset.py 110 110 32 0 0% 21-219
whipper/command/image.py 36 36 6 0 0% 21-73
whipper/command/main.py 74 74 24 0 0% 4-133
whipper/command/mblookup.py 39 3 14 2 91% 47-49, 63->72, 65->72
whipper/command/offset.py 115 115 36 0 0% 21-225
whipper/common/__init__.py 0 0 0 0 100%
whipper/common/accurip.py 132 5 62 4 95% 118, 124, 133-135, 113->118, 119->124, 241->247, 251->257
whipper/common/cache.py 100 48 34 5 44% 66-90, 96, 99, 107-110, 113-114, 138-142, 165-172, 196-201, 206-222, 95->96, 98->99, 136->146, 137->138, 164->165
whipper/common/accurip.py 115 4 56 5 95% 79, 116, 125, 131, 223->229, 233->239
whipper/common/checksum.py 26 14 2 0 43% 41-42, 45-46, 49-64
whipper/common/common.py 150 28 38 6 78% 51-52, 119-120, 143-144, 162-169, 181, 274-279, 286-291, 328-332, 118->119, 131->134, 180->181, 190->197, 271->274, 326->334
whipper/common/config.py 90 8 18 4 89% 104-105, 123-124, 130, 140, 142, 144, 129->130, 139->140, 141->142, 143->144
whipper/common/directory.py 18 5 4 0 68% 42-48
whipper/common/drive.py 31 20 8 0 33% 35-40, 44-50, 54-60, 64-71
whipper/common/encode.py 44 23 2 0 46% 37-38, 41-42, 45-46, 53-56, 59-60, 63-64, 76-77, 80-81, 84-91
whipper/common/mbngs.py 174 52 66 7 70% 38-39, 45, 93-99, 174-175, 180-181, 227, 233, 258-260, 269, 289-344, 159->158, 173->174, 179->180, 226->227, 232->233, 257->258, 266->269
whipper/common/path.py 24 0 8 3 91% 42->45, 52->56, 60->65
whipper/common/program.py 345 267 117 5 19% 85-87, 93-104, 113-147, 156-161, 164, 169-173, 218, 229-230, 232-236, 253-268, 276-386, 397-455, 463-471, 475-490, 501-540, 552-569, 572-590, 593-603, 606-614, 76->79, 215->218, 228->229, 231->232, 238->242
whipper/common/renamer.py 102 2 16 1 97% 133, 156, 58->66
whipper/common/task.py 77 15 14 2 79% 47-52, 86-87, 102, 115-116, 123, 129, 135, 141, 147, 84->86, 99->102
whipper/common/common.py 150 28 38 6 78% 51-52, 116-117, 128->131, 140-141, 156-163, 176, 185->192, 269-274, 279-284, 321->329, 323-327
whipper/common/config.py 89 6 18 4 91% 107, 117, 119, 121, 147-148
whipper/common/directory.py 12 5 2 0 50% 33-39
whipper/common/drive.py 37 24 8 0 33% 36-41, 45-51, 55-61, 65-72, 95-98
whipper/common/encode.py 80 52 12 0 30% 38-39, 42-43, 46-47, 54-57, 60-61, 64-65, 77-78, 81-82, 85-92, 99-100, 103-104, 117-148, 155-160
whipper/common/mbngs.py 212 52 86 7 76% 40-41, 47, 119-125, 187->186, 245-246, 251-252, 305-306, 313-314, 344-346, 355, 382-392, 412-450
whipper/common/path.py 22 0 12 0 100%
whipper/common/program.py 380 288 134 6 21% 82->85, 91-93, 101-112, 121-137, 145-147, 152-156, 212, 228-229, 231-233, 234->238, 243, 261-278, 299-411, 423-491, 500-508, 521-537, 541-556, 582-622, 635-658, 661-681, 684-694, 697-705
whipper/common/renamer.py 103 2 16 1 97% 58->66, 127, 152
whipper/common/task.py 77 15 14 2 79% 45-50, 84-85, 100, 113-114, 119, 123, 127, 131, 135
whipper/extern/__init__.py 0 0 0 0 100%
whipper/extern/asyncsub.py 112 55 58 11 46% 15-17, 32, 37-38, 47-84, 89-102, 115, 122, 134, 145, 151, 14->15, 35->37, 45->47, 110->113, 114->115, 121->122, 133->134, 139->141, 141->152, 144->145, 148->151
whipper/extern/freedb.py 90 72 42 0 17% 46, 54, 74-153, 160-199
whipper/extern/asyncsub.py 112 56 69 16 45% 15-17, 32, 37-38, 47-84, 89-102, 110->113, 115, 122, 125->123, 126->119, 134, 139->141, 141->152, 145-147, 151
whipper/extern/freedb.py 90 72 42 0 17% 48, 56, 75-154, 171-210
whipper/extern/task/__init__.py 0 0 0 0 100%
whipper/extern/task/task.py 270 115 56 11 53% 53, 59, 78, 86, 152-154, 173-175, 183-199, 217-220, 241-242, 283-284, 287-293, 308-309, 317-319, 328-335, 341-358, 362, 365, 372-389, 400-401, 404-407, 411, 414, 429, 432-434, 450, 462, 508-513, 520-525, 534-542, 545-553, 556-557, 565, 570-572, 52->53, 56->59, 65->67, 151->152, 165->exit, 216->217, 230->232, 235->exit, 497->499, 531->534, 569->570
whipper/extern/task/task.py 273 115 56 11 53% 52, 58, 64->66, 75, 83, 152-154, 166->exit, 174-176, 185-201, 217-220, 230->232, 235->exit, 241-242, 284-285, 288-294, 309-310, 318-320, 329-336, 340-357, 361, 364, 372-389, 402-403, 406-409, 413, 416, 432, 435-437, 455, 469, 502->504, 513-518, 525-530, 539-547, 550-558, 561-562, 570, 575-577
whipper/image/__init__.py 0 0 0 0 100%
whipper/image/cue.py 91 9 20 3 89% 98, 115-116, 131-133, 158, 186, 204, 97->98, 114->115, 130->131
whipper/image/image.py 116 93 18 0 17% 49-57, 65-67, 74-107, 121-154, 157-173, 184-214
whipper/image/table.py 394 18 120 16 93% 240, 499, 578, 663-664, 684-685, 694-697, 748, 794-795, 797-798, 842-843, 848-850, 180->183, 498->499, 532->536, 555->558, 577->578, 585->592, 683->684, 692->698, 693->694, 722->726, 726->721, 747->748, 793->794, 796->797, 841->842, 847->848
whipper/image/toc.py 203 16 60 10 90% 133, 260-261, 277-280, 338-340, 362-364, 384, 408, 438, 129->133, 211->219, 259->260, 276->277, 286->291, 322->329, 337->338, 361->362, 371->375, 403->408
whipper/image/cue.py 91 9 20 3 89% 96, 113-114, 129-131, 159, 188, 207
whipper/image/image.py 123 100 20 0 16% 51-59, 68-70, 79-112, 124-167, 170-186, 195-225
whipper/image/table.py 383 19 120 16 93% 195->198, 258, 276, 498, 531->535, 554->557, 577, 584->591, 673-674, 695-696, 703->709, 705-708, 736->740, 740->735, 762, 810-811, 813-814, 859-860, 865-867
whipper/image/toc.py 203 16 60 10 90% 141, 222->230, 271-272, 288-291, 297->302, 333->340, 349-351, 373-375, 382->386, 398, 424, 457
whipper/program/__init__.py 0 0 0 0 100%
whipper/program/arc.py 3 0 0 0 100%
whipper/program/cdparanoia.py 307 179 78 2 39% 48-50, 59-60, 124-126, 198-199, 239-253, 256-306, 309-347, 350-354, 357-393, 447-499, 504-551, 585-588, 591, 598, 606-611, 123->124, 597->598
whipper/program/cdrdao.py 113 74 32 2 28% 33-58, 80-86, 90-105, 108-137, 140-144, 147-160, 167-170, 180-182, 186-188, 179->180, 185->186
whipper/program/flac.py 9 5 0 0 44% 12-19
whipper/program/sox.py 17 4 4 2 71% 18-19, 23-24, 17->18, 22->23
whipper/program/soxi.py 28 2 4 1 91% 36, 49, 48->49
whipper/program/utils.py 23 16 2 0 28% 12-17, 25-31, 42-47
whipper/program/arc.py 3 1 0 0 67% 5
whipper/program/cdparanoia.py 312 184 84 2 38% 45-47, 54-55, 119-121, 194-195, 233-247, 250-318, 321-359, 362-366, 369-405, 462-515, 520-567, 601-604, 607, 614, 622-627
whipper/program/cdrdao.py 120 80 34 2 27% 35-64, 84-90, 94-109, 112-141, 144-148, 151-168, 173-176, 184-186, 190-192
whipper/program/flac.py 9 5 0 0 44% 13-20
whipper/program/sox.py 17 4 4 2 71% 18-19, 23-24
whipper/program/soxi.py 28 2 4 1 91% 41, 54
whipper/program/utils.py 23 16 2 0 28% 10-15, 21-27, 39-44
whipper/result/__init__.py 0 0 0 0 100%
whipper/result/logger.py 144 23 40 16 78% 68, 84-92, 112, 123, 128, 130, 134-135, 143, 202, 240, 244-245, 252-253, 67->68, 83->84, 111->112, 122->123, 127->128, 129->130, 133->134, 142->143, 201->202, 213->217, 217->222, 222->226, 226->230, 234->244, 236->240, 249->252
whipper/result/result.py 57 13 6 0 70% 115-119, 137, 148-149, 158-165
whipper/result/logger.py 150 26 44 18 76% 67, 83-91, 111, 122, 127, 129, 133-134, 142, 144, 202, 213->217, 217->222, 222->226, 226->230, 240, 244-245, 250-251, 256-257
whipper/result/result.py 59 13 6 0 71% 118-122, 137, 148-149, 158-165
-----------------------------------------------------------------------------
TOTAL 3950 1727 1123 123 53%
TOTAL 4022 1805 1195 124 52%
27 changes: 17 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM debian:buster
ARG optical_gid
ARG uid=1000

RUN apt-get update && apt-get install --no-install-recommends -y \
autoconf \
Expand All @@ -10,6 +12,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
flac \
gir1.2-glib-2.0 \
git \
libdiscid0 \
libiso9660-dev \
libsndfile1-dev \
libtool \
Expand All @@ -20,38 +23,42 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
python3-gi \
python3-musicbrainzngs \
python3-mutagen \
python3-pil \
python3-pip \
python3-requests \
python3-ruamel.yaml \
python3-setuptools \
sox \
swig \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
&& pip3 --no-cache-dir install pycdio==2.1.0
&& pip3 --no-cache-dir install pycdio==2.1.0 discid

# libcdio-paranoia / libcdio-utils are wrongfully packaged in Debian, thus built manually
# see https://github.com/whipper-team/whipper/pull/237#issuecomment-367985625
RUN curl -o - 'https://ftp.gnu.org/gnu/libcdio/libcdio-2.1.0.tar.bz2' | tar jxf - \
&& cd libcdio-2.1.0 \
ENV LIBCDIO_VERSION 2.1.0
RUN curl -o - "https://ftp.gnu.org/gnu/libcdio/libcdio-${LIBCDIO_VERSION}.tar.bz2" | tar jxf - \
&& cd libcdio-${LIBCDIO_VERSION} \
&& autoreconf -fi \
&& ./configure --disable-dependency-tracking --disable-cxx --disable-example-progs --disable-static \
&& make install \
&& cd .. \
&& rm -rf libcdio-2.1.0
&& rm -rf libcdio-${LIBCDIO_VERSION}

# Install cd-paranoia from tarball
RUN curl -o - 'https://ftp.gnu.org/gnu/libcdio/libcdio-paranoia-10.2+2.0.0.tar.bz2' | tar jxf - \
&& cd libcdio-paranoia-10.2+2.0.0 \
ENV LIBCDIO_PARANOIA_VERSION 10.2+2.0.1
RUN curl -o - "https://ftp.gnu.org/gnu/libcdio/libcdio-paranoia-${LIBCDIO_PARANOIA_VERSION}.tar.bz2" | tar jxf - \
&& cd libcdio-paranoia-${LIBCDIO_PARANOIA_VERSION} \
&& autoreconf -fi \
&& ./configure --disable-dependency-tracking --disable-example-progs --disable-static \
&& make install \
&& cd .. \
&& rm -rf libcdio-paranoia-10.2+2.0.0
&& rm -rf libcdio-paranoia-${LIBCDIO_PARANOIA_VERSION}

RUN ldconfig

# add user
RUN useradd -m worker -G cdrom \
# add user (+ group workaround for ArchLinux)
RUN useradd -m worker --uid ${uid} -G cdrom \
&& if [ -n "${optical_gid}" ]; then groupadd -f -g "${optical_gid}" optical \
&& usermod -a -G optical worker; fi \
&& mkdir -p /output /home/worker/.config/whipper \
&& chown worker: /output /home/worker/.config/whipper
VOLUME ["/home/worker/.config/whipper", "/output"]
Expand Down
1 change: 1 addition & 0 deletions PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Version: 0.10.0
Loading

0 comments on commit be1db82

Please sign in to comment.