Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Create table
run: |
make build-docs

- name: Push table
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
Expand All @@ -60,4 +60,3 @@ jobs:
git commit -m "Update tasks table"
git push
fi

4 changes: 2 additions & 2 deletions .github/workflows/leaderboard_refresh.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Daily Space Rebuild
on:
schedule:
# Runs at midnight Pacific Time (8 AM UTC)
- cron: '0 8 * * *'
workflow_dispatch: # Allows manual triggering
- cron: "0 8 * * *"
workflow_dispatch: # Allows manual triggering

jobs:
rebuild:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ jobs:
id: lint
run: |
make lint-check

22 changes: 11 additions & 11 deletions .github/workflows/model_loading.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ name: Model Loading
on:
pull_request:
paths:
- 'mteb/models/**.py'
- "mteb/models/**.py"

jobs:
extract-and-run:
runs-on: ubuntu-latest

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

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"

- name: Install dependencies and run tests
run: |
make model-load-test BASE_BRANCH=${{ github.event.pull_request.base.ref }}
- name: Install dependencies and run tests
run: |
make model-load-test BASE_BRANCH=${{ github.event.pull_request.base.ref }}
7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ jobs:
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing using PyPI

id-token: write # IMPORTANT: this permission is mandatory for trusted publishing using PyPI

if: ${{ github.ref == 'refs/heads/main' && github.event.workflow_run.conclusion == 'success'}}
steps:
Expand All @@ -40,8 +39,8 @@ jobs:
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: steps.release.outputs.released == 'true'
# This action supports PyPI's trusted publishing implementation, which allows authentication to PyPI without a manually
# configured API token or username/password combination. To perform trusted publishing with this action, your project's
# This action supports PyPI's trusted publishing implementation, which allows authentication to PyPI without a manually
# configured API token or username/password combination. To perform trusted publishing with this action, your project's
# publisher must already be configured on PyPI.

- name: Publish package distributions to GitHub Releases
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# 1) install Python dependencies
# 2) run make test


name: Test
on:
push:
Expand Down Expand Up @@ -30,7 +29,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Install dependencies
shell: bash
run: |
Expand All @@ -53,4 +52,3 @@ jobs:
# if it fails again, the workflow will fail.
# If it passes the first time the test will not run again
make test || make test

20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
fail_fast: true

repos:
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.23
hooks:
- id: validate-pyproject

- repo: https://github.com/pre-commit/mirrors-prettier
Comment thread
sam-hey marked this conversation as resolved.
Outdated
rev: v3.1.0
hooks:
- id: prettier
types_or: [yaml, json5]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.9.6
hooks:
- id: ruff-format
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
install:
@echo "--- 🚀 Installing project dependencies ---"
pip install -e ".[dev]"
pre-commit install

install-for-tests:
@echo "--- 🚀 Installing project dependencies for test ---"
Expand Down Expand Up @@ -46,4 +47,10 @@ model-load-test:

run-leaderboard:
@echo "--- 🚀 Running leaderboard locally ---"
python -m mteb.leaderboard.app
python -m mteb.leaderboard.app


.PHONY: check
check: ## Run code quality tools.
@echo "--- 🧹 Running code quality tools ---"
@pre-commit run -a
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ dev = [
"pytest-xdist>=3.6.1",
"pytest-coverage>=0.0",
"pytest-rerunfailures>=15.0",
"iso639>=0.1.4" # used for tests/scripts/test_generate_model_meta.py
"iso639>=0.1.4", # used for tests/scripts/test_generate_model_meta.py
"pre-commit>=4.1.0",
]
codecarbon = ["codecarbon"]
speedtask = ["GPUtil>=1.4.0", "psutil>=5.9.8"]
Expand Down