Skip to content

Commit

Permalink
Improve CI workflows and add pytest. Fix matplotlib colormap error
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmc2005 committed May 25, 2024
1 parent b819574 commit ff3cec7
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 5 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Pytest

on:
pull_request:
branches:
- main
- develop

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'

- name: Install apt dependencies
run: |
sudo add-apt-repository ppa:savoury1/ffmpeg4
sudo apt-get update
sudo apt-get -y install ffmpeg libportaudio2=19.6.0-1.1
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip
pip install .
- name: Run tests
run: |
pytest
6 changes: 3 additions & 3 deletions .github/workflows/quick-runs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ jobs:
rm rttms/ES2002b_long.rttm
- name: Run stream
run: |
diart.stream audio/ES2002a.wav --output trash --no-plot --hf-token ${{ secrets.HUGGINGFACE }}
diart.stream audio/ES2002a.wav --segmentation assets/models/segmentation_uint8.onnx --embedding assets/models/embedding_uint8.onnx --output trash --no-plot
- name: Run benchmark
run: |
diart.benchmark audio --reference rttms --batch-size 4 --hf-token ${{ secrets.HUGGINGFACE }}
diart.benchmark audio --reference rttms --batch-size 4 --segmentation assets/models/segmentation_uint8.onnx --embedding assets/models/embedding_uint8.onnx
- name: Run tuning
run: |
diart.tune audio --reference rttms --batch-size 4 --num-iter 2 --output trash --hf-token ${{ secrets.HUGGINGFACE }}
diart.tune audio --reference rttms --batch-size 4 --num-iter 2 --output trash --segmentation assets/models/segmentation_uint8.onnx --embedding assets/models/embedding_uint8.onnx
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
numpy>=1.20.2
matplotlib>=3.3.3
matplotlib>=3.3.3,<3.6.0
rx>=3.2.0
scipy>=1.6.0
sounddevice>=0.4.2
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ package_dir=
packages=find:
install_requires=
numpy>=1.20.2
matplotlib>=3.3.3
matplotlib>=3.3.3,<3.6.0
rx>=3.2.0
scipy>=1.6.0
sounddevice>=0.4.2
Expand Down

0 comments on commit ff3cec7

Please sign in to comment.