diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index ef1e1868..52bba03a 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -8,14 +8,17 @@ 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} strategy: fail-fast: false matrix: - python-version: [3.6, 3.7, 3.8] + python-version: ["3.7", "3.8", "3.9", "3.10"] + env: + FFMPEG_BINARY: /usr/bin/ffmpeg + IMAGEIO_FFMPEG_EXE: /usr/bin/ffmpeg steps: - uses: actions/checkout@v2 - uses: conda-incubator/setup-miniconda@v2 @@ -24,8 +27,10 @@ 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 ffmpeg libmp3lame-dev tesseract-ocr graphviz cmake libboost-python-dev libgraphviz-dev + 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: path: ~/.cache/pip 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 diff --git a/pliers/tests/test_io.py b/pliers/tests/test_io.py index 63c443f0..f71c34a0 100644 --- a/pliers/tests/test_io.py +++ b/pliers/tests/test_io.py @@ -19,14 +19,15 @@ 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 - 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(): diff --git a/pliers/tests/test_stims.py b/pliers/tests/test_stims.py index 5c1478c0..6a1ad022 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://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 + 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) @@ -283,13 +283,13 @@ 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) 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)