Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: check size also on main branch #16

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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: 2 additions & 1 deletion .github/workflows/check_file_sizes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Check File Sizes
on:
pull_request:
branches: [ main ]

push:
branches: [main]
jobs:
check-file-size:
runs-on: ubuntu-latest
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ jobs:

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Install dependencies
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
install-for-tests:
@echo "--- Installing dependencies for tests ---"
# just use the dev dependencies from mteb to keep everything compatible
pip install mteb[dev]
pip install "mteb[dev]>=1.13.0"

test:
@echo "--- Running tests ---"
Expand Down
6 changes: 2 additions & 4 deletions remove_spaces_from_large_json_files.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import os
import glob
import sys
import json
import os

for file in glob.glob("results/*/*/*.json"):
# if the file is greater than 9 MB, compress it with gzip
if os.path.getsize(file) >= 9.5 * 1024 * 1024:
print(f"Resizing {file} to have no indentations")
# read it in as json and write it out with no indent
with open(file, "r") as f:
data = json.load(f)

with open(file, "w") as f:
json.dump(data, f, indent=None)
json.dump(data, f, indent=None)

Large diffs are not rendered by default.

Loading
Loading