Skip to content

BUG: fix contour plotting for bubblesam detection #181

BUG: fix contour plotting for bubblesam detection

BUG: fix contour plotting for bubblesam detection #181

Workflow file for this run

name: Base CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: install and lint
run: |
python -m pip install -v ".[dev]"
mypy neat_ml
ruff check neat_ml
- name: cache fonts
id: cache-fonts
if: runner.os == 'Linux'
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae #v5.0.5
with:
path: ~/.cache/msttcorefonts/
key: ${{ runner.os }}-msttcorefonts-v1
- name: install fonts
if: runner.os == 'Linux' && steps.cache-fonts.outputs.cache-hit != 'true'
run: |
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt-get update
sudo apt-get install -y ttf-mscorefonts-installer || true
# before making the user storage directory, check if the font(s) we need
# (i.e. `Arial.ttf` and `Arial_Bold.ttf`) exist/were successfully downloaded
# to the root directory to avoid loading an empty directory on a successful
# ``cache-hit``
if [[ ! -f "/usr/share/fonts/truetype/msttcorefonts/Arial.ttf" || \
! -f "/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf" ]]; then
echo "Fonts not downloaded successfully."
exit 1
else
echo "Fonts downloaded successfully. Caching fonts..."
mkdir -p ~/.cache/msttcorefonts/
cp /usr/share/fonts/truetype/msttcorefonts/*.ttf ~/.cache/msttcorefonts/
fi
- name: install fonts from cache
if: runner.os == 'Linux' && steps.cache-fonts.outputs.cache-hit == 'true'
run: |
sudo mkdir -p /usr/share/fonts/truetype/msttcorefonts/
sudo cp ~/.cache/msttcorefonts/*.ttf /usr/share/fonts/truetype/msttcorefonts/
- name: refresh font cache
if: runner.os == 'Linux'
run: sudo fc-cache -f -v
- name: test
run: |
cd /tmp && python -m pytest --pyargs neat_ml --cov=neat_ml --cov-report=term-missing