From cc92bc289aff8af77cf03c471e0876ce9b3efa3f Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Mon, 7 Nov 2022 16:32:26 -0600 Subject: [PATCH 01/20] Conda install ffmpeg --- .github/workflows/python-package.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index ef1e1868..fe1f6b41 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -25,7 +25,8 @@ jobs: - name: Set up system dependencies run: | sudo apt-get update - sudo apt-get install libavformat-dev libavfilter-dev libavdevice-dev ffmpeg libmp3lame-dev tesseract-ocr graphviz cmake libboost-python-dev libgraphviz-dev + sudo apt-get install libavformat-dev libavfilter-dev libavdevice-dev libmp3lame-dev tesseract-ocr graphviz cmake libboost-python-dev libgraphviz-dev + conda install -c conda-forge ffmpeg - uses: actions/cache@v2 with: path: ~/.cache/pip From 4fdd659e03e782ef309a477760a8585d5bbd5be8 Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Mon, 7 Nov 2022 16:47:21 -0600 Subject: [PATCH 02/20] Try ubuntu 22.04 --- .github/workflows/python-package.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index fe1f6b41..7542a559 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -8,7 +8,7 @@ on: [push, pull_request] jobs: build: name: pytest (${{ matrix.python-version }}, ${{ matrix.os }}) - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 defaults: run: shell: bash -l {0} @@ -26,7 +26,6 @@ jobs: run: | sudo apt-get update sudo apt-get install libavformat-dev libavfilter-dev libavdevice-dev libmp3lame-dev tesseract-ocr graphviz cmake libboost-python-dev libgraphviz-dev - conda install -c conda-forge ffmpeg - uses: actions/cache@v2 with: path: ~/.cache/pip From c397bcfda797fb0719852f0fa1632e2d67c3f14f Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Wed, 9 Nov 2022 15:06:26 -0600 Subject: [PATCH 03/20] Add ffmpeg PPA --- .github/workflows/python-package.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 7542a559..c6f6ab86 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -24,8 +24,9 @@ jobs: python-version: ${{ matrix.python-version }} - name: Set up system dependencies run: | + sudo add-apt-repository ppa:savoury1/ffmpeg4 sudo apt-get update - sudo apt-get install libavformat-dev libavfilter-dev libavdevice-dev libmp3lame-dev tesseract-ocr graphviz cmake libboost-python-dev libgraphviz-dev + sudo apt-get install -y libavformat-dev libavfilter-dev libavdevice-dev libmp3lame-dev tesseract-ocr graphviz cmake libboost-python-dev libgraphviz-dev - uses: actions/cache@v2 with: path: ~/.cache/pip From 3c3d7717b551dc739ac827446542ffbe2427baf6 Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Fri, 11 Nov 2022 15:48:25 -0600 Subject: [PATCH 04/20] Install ffmpeg --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index c6f6ab86..f772de2d 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -26,7 +26,7 @@ jobs: run: | sudo add-apt-repository ppa:savoury1/ffmpeg4 sudo apt-get update - sudo apt-get install -y libavformat-dev libavfilter-dev libavdevice-dev libmp3lame-dev tesseract-ocr graphviz cmake libboost-python-dev libgraphviz-dev + sudo apt-get install -y ffmpeg libavformat-dev libavfilter-dev libavdevice-dev libmp3lame-dev tesseract-ocr graphviz cmake libboost-python-dev libgraphviz-dev - uses: actions/cache@v2 with: path: ~/.cache/pip From 408e89255fdfb4a3a3d341f6ea8c3f265b06916a Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Fri, 11 Nov 2022 16:16:28 -0600 Subject: [PATCH 05/20] Upgrade ffmpeg --- .github/workflows/python-package.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index f772de2d..cc729f90 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -26,7 +26,8 @@ jobs: run: | sudo add-apt-repository ppa:savoury1/ffmpeg4 sudo apt-get update - sudo apt-get install -y ffmpeg libavformat-dev libavfilter-dev libavdevice-dev libmp3lame-dev tesseract-ocr graphviz cmake libboost-python-dev libgraphviz-dev + sudo apt-get upgrade ffmpeg + sudo apt-get install -y libavformat-dev libavfilter-dev libavdevice-dev libmp3lame-dev tesseract-ocr graphviz cmake libboost-python-dev libgraphviz-dev - uses: actions/cache@v2 with: path: ~/.cache/pip From 9ef0e2358ff3931ad3db12692c137310a910842b Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Fri, 11 Nov 2022 16:16:49 -0600 Subject: [PATCH 06/20] -y --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index cc729f90..45b6681c 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -26,7 +26,7 @@ jobs: run: | sudo add-apt-repository ppa:savoury1/ffmpeg4 sudo apt-get update - sudo apt-get upgrade ffmpeg + sudo apt-get upgrade -y ffmpeg sudo apt-get install -y libavformat-dev libavfilter-dev libavdevice-dev libmp3lame-dev tesseract-ocr graphviz cmake libboost-python-dev libgraphviz-dev - uses: actions/cache@v2 with: From a9b886c292c9aba706ed8d43eb2103e848cc9f83 Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Fri, 11 Nov 2022 17:11:01 -0600 Subject: [PATCH 07/20] Test new ffmpeg version --- .github/workflows/python-package.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 45b6681c..011b15c8 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -28,6 +28,10 @@ jobs: sudo apt-get update sudo apt-get upgrade -y ffmpeg sudo apt-get install -y libavformat-dev libavfilter-dev libavdevice-dev libmp3lame-dev tesseract-ocr graphviz cmake libboost-python-dev libgraphviz-dev + - name: Test ffmpeg version + run: | + which ffmpeg + ffmpeg --version - uses: actions/cache@v2 with: path: ~/.cache/pip From 0ad7c934bb4a89f0bd20e55fcd8186beff86730e Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Fri, 11 Nov 2022 17:46:19 -0600 Subject: [PATCH 08/20] Run --- .github/workflows/python-package.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 011b15c8..45b6681c 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -28,10 +28,6 @@ jobs: sudo apt-get update sudo apt-get upgrade -y ffmpeg sudo apt-get install -y libavformat-dev libavfilter-dev libavdevice-dev libmp3lame-dev tesseract-ocr graphviz cmake libboost-python-dev libgraphviz-dev - - name: Test ffmpeg version - run: | - which ffmpeg - ffmpeg --version - uses: actions/cache@v2 with: path: ~/.cache/pip From c77981dfe7d10604b629d5966ec64e543d0e374d Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Fri, 11 Nov 2022 18:01:41 -0600 Subject: [PATCH 09/20] Setffmpeg env --- .github/workflows/python-package.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 45b6681c..d6578923 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -16,6 +16,8 @@ jobs: fail-fast: false matrix: python-version: [3.6, 3.7, 3.8] + env: + FFMPEG_BINARY: /usr/lib/ffmpeg steps: - uses: actions/checkout@v2 - uses: conda-incubator/setup-miniconda@v2 From 4bf4c80ed6bd14f2ad6c902325f396022dacee1e Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Fri, 11 Nov 2022 18:21:52 -0600 Subject: [PATCH 10/20] Get ffmpeg path --- .github/workflows/python-package.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index d6578923..442260e1 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -29,6 +29,8 @@ jobs: sudo add-apt-repository ppa:savoury1/ffmpeg4 sudo apt-get update sudo apt-get upgrade -y ffmpeg + which ffmpeg + ffmpeg --help sudo apt-get install -y libavformat-dev libavfilter-dev libavdevice-dev libmp3lame-dev tesseract-ocr graphviz cmake libboost-python-dev libgraphviz-dev - uses: actions/cache@v2 with: From b31c670991b109af7cd8e8c74536848781a6164d Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Fri, 11 Nov 2022 18:35:13 -0600 Subject: [PATCH 11/20] Test ffmpeg version --- .github/workflows/python-package.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 442260e1..fd8dd0c9 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -29,9 +29,11 @@ jobs: sudo add-apt-repository ppa:savoury1/ffmpeg4 sudo apt-get update sudo apt-get upgrade -y ffmpeg - which ffmpeg - ffmpeg --help sudo apt-get install -y libavformat-dev libavfilter-dev libavdevice-dev libmp3lame-dev tesseract-ocr graphviz cmake libboost-python-dev libgraphviz-dev + - name: Test ffmpeg version + run: | + which ffmpeg + ffmpeg --version - uses: actions/cache@v2 with: path: ~/.cache/pip From 1897ec991404dcc70bc70ca1241dc929ab810b68 Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Fri, 11 Nov 2022 18:38:57 -0600 Subject: [PATCH 12/20] Set ffmpeg path --- .github/workflows/python-package.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index fd8dd0c9..64192d93 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -17,7 +17,7 @@ jobs: matrix: python-version: [3.6, 3.7, 3.8] env: - FFMPEG_BINARY: /usr/lib/ffmpeg + FFMPEG_BINARY: /usr/bin/ffmpeg steps: - uses: actions/checkout@v2 - uses: conda-incubator/setup-miniconda@v2 @@ -30,10 +30,6 @@ jobs: sudo apt-get update sudo apt-get upgrade -y ffmpeg sudo apt-get install -y libavformat-dev libavfilter-dev libavdevice-dev libmp3lame-dev tesseract-ocr graphviz cmake libboost-python-dev libgraphviz-dev - - name: Test ffmpeg version - run: | - which ffmpeg - ffmpeg --version - uses: actions/cache@v2 with: path: ~/.cache/pip From 2ef1e4760a5f076f5d3dfe56a0207713218cd54e Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Fri, 11 Nov 2022 19:09:47 -0600 Subject: [PATCH 13/20] Try different file --- pliers/tests/test_stims.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pliers/tests/test_stims.py b/pliers/tests/test_stims.py index 5c1478c0..d5a0d624 100644 --- a/pliers/tests/test_stims.py +++ b/pliers/tests/test_stims.py @@ -269,7 +269,7 @@ def test_remote_stims(): video = VideoStim(url=video_url) assert video.fps == 30.0 - url = 'https://archive.org/download/999WavFiles/TANKEN.WAV' + url = 'https://www2.cs.uic.edu/~i101/SoundFiles/Fanfare60.wav' audio = AudioStim(url=url) assert round(audio.duration) == 25 @@ -283,7 +283,7 @@ def test_remote_stims(): def test_get_filename(): - url = 'https://archive.org/download/999WavFiles/TANKEN.WAV' + url = 'https://www2.cs.uic.edu/~i101/SoundFiles/Fanfare60.wav' audio = AudioStim(url=url) with audio.get_filename() as filename: assert exists(filename) From 59862100b2774ed112cdb5b79c0152549bda53bb Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Fri, 11 Nov 2022 19:30:23 -0600 Subject: [PATCH 14/20] Replace with non-archive.org files --- .github/workflows/python-package.yml | 1 + pliers/tests/test_stims.py | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 64192d93..1572240e 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -18,6 +18,7 @@ jobs: python-version: [3.6, 3.7, 3.8] env: FFMPEG_BINARY: /usr/bin/ffmpeg + IMAGEIO_FFMPEG_EXE: /usr/bin/ffmpeg steps: - uses: actions/checkout@v2 - uses: conda-incubator/setup-miniconda@v2 diff --git a/pliers/tests/test_stims.py b/pliers/tests/test_stims.py index d5a0d624..32787e18 100644 --- a/pliers/tests/test_stims.py +++ b/pliers/tests/test_stims.py @@ -265,17 +265,17 @@ def test_transcribed_audio_stim(): def test_remote_stims(): - video_url = 'https://archive.org/download/DisneyCastletest/Disney_Castle_512kb.mp4' + video_url = 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' video = VideoStim(url=video_url) - assert video.fps == 30.0 + assert video.fps == 24 url = 'https://www2.cs.uic.edu/~i101/SoundFiles/Fanfare60.wav' audio = AudioStim(url=url) - assert round(audio.duration) == 25 + assert round(audio.duration) == 60 - url = 'https://archive.org/download/NIX-C-1987-11903/1987_11903L.jpg' + url = 'https://storage.googleapis.com/gtv-videos-bucket/sample/images/ElephantsDream.jpg' image = ImageStim(url=url) - assert image.data.shape == (288, 360, 3) + assert image.data.shape == (360, 480, 3) url = 'https://github.com/psychoinformaticslab/pliers/blob/master/README.rst' text = TextStim(url=url) From d802043f5455be99a69838c1cbaca103d26f49dd Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Fri, 11 Nov 2022 20:38:09 -0600 Subject: [PATCH 15/20] Not archive.org --- pliers/tests/test_stims.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pliers/tests/test_stims.py b/pliers/tests/test_stims.py index 32787e18..6a1ad022 100644 --- a/pliers/tests/test_stims.py +++ b/pliers/tests/test_stims.py @@ -289,7 +289,7 @@ def test_get_filename(): assert exists(filename) assert not exists(filename) - url = 'https://archive.org/download/NIX-C-1987-11903/1987_11903L.jpg' + url = 'https://storage.googleapis.com/gtv-videos-bucket/sample/images/ElephantsDream.jpg' image = ImageStim(url=url) with image.get_filename() as filename: assert exists(filename) From 18b753de1aee719c7c1d622235860272d066c7e6 Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Mon, 14 Nov 2022 16:59:36 -0600 Subject: [PATCH 16/20] Remove all archive.org --- pliers/tests/test_io.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pliers/tests/test_io.py b/pliers/tests/test_io.py index 63c443f0..a8ad4172 100644 --- a/pliers/tests/test_io.py +++ b/pliers/tests/test_io.py @@ -19,10 +19,11 @@ def test_magic_loader(): def test_magic_loader2(): text_file = join(get_test_data_path(), 'text', 'sample_text.txt') - video_url = 'https://archive.org/download/DisneyCastletest/Disney_Castle_512kb.mp4' - audio_url = 'https://archive.org/download/999WavFiles/TANKEN.WAV' - image_url = 'https://archive.org/download/NIX-C-1987-11903/1987_11903L.jpg' + video_url = 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' + audio_url = 'https://www2.cs.uic.edu/~i101/SoundFiles/Fanfare60.wav' + image_url = 'https://storage.googleapis.com/gtv-videos-bucket/sample/images/ElephantsDream.jpg' text_url = 'https://github.com/psychoinformaticslab/pliers/blob/master/README.rst' + stims = load_stims([text_file, video_url, audio_url, image_url, text_url]) assert len(stims) == 5 assert stims[1].fps == 30.0 From d3ef6bccbfcb438efcf993f7ffb060a933d52707 Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Mon, 14 Nov 2022 17:17:00 -0600 Subject: [PATCH 17/20] Add 3.9, 3.10 testing --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 1572240e..b5427264 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.6, 3.7, 3.8] + python-version: [3.6, 3.7, 3.8, 3.9, 3.10] env: FFMPEG_BINARY: /usr/bin/ffmpeg IMAGEIO_FFMPEG_EXE: /usr/bin/ffmpeg From 7d3db5b695f212050876f7e0156ac75d00cff854 Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Mon, 14 Nov 2022 17:17:51 -0600 Subject: [PATCH 18/20] Fix magic loader tests --- pliers/tests/test_io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pliers/tests/test_io.py b/pliers/tests/test_io.py index a8ad4172..f71c34a0 100644 --- a/pliers/tests/test_io.py +++ b/pliers/tests/test_io.py @@ -26,8 +26,8 @@ def test_magic_loader2(): stims = load_stims([text_file, video_url, audio_url, image_url, text_url]) assert len(stims) == 5 - assert stims[1].fps == 30.0 - assert stims[3].data.shape == (288, 360, 3) + assert stims[1].fps == 24 + assert stims[3].data.shape == (360, 480, 3) def test_loader_nonexistent(): From f5d76adcf915b89e02a984f30751f741d3e2d011 Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Mon, 14 Nov 2022 17:52:23 -0600 Subject: [PATCH 19/20] Relax numba --- .github/workflows/python-package.yml | 2 +- optional-dependencies.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index b5427264..f09569ca 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.6, 3.7, 3.8, 3.9, 3.10] + python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] env: FFMPEG_BINARY: /usr/bin/ffmpeg IMAGEIO_FFMPEG_EXE: /usr/bin/ffmpeg diff --git a/optional-dependencies.txt b/optional-dependencies.txt index bbe9c2dc..a33e5fbe 100644 --- a/optional-dependencies.txt +++ b/optional-dependencies.txt @@ -7,7 +7,6 @@ gensim google-api-python-client google-compute-engine librosa>=0.6.3 -numba<=0.48 matplotlib opencv-python openpyxl From a749cc8bb661bb8642b6f50b9fc24706058e8b81 Mon Sep 17 00:00:00 2001 From: Alejandro de la Vega Date: Mon, 14 Nov 2022 17:52:44 -0600 Subject: [PATCH 20/20] Drop python 3.6 --- .github/workflows/python-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index f09569ca..52bba03a 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] + python-version: ["3.7", "3.8", "3.9", "3.10"] env: FFMPEG_BINARY: /usr/bin/ffmpeg IMAGEIO_FFMPEG_EXE: /usr/bin/ffmpeg