Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
22 changes: 10 additions & 12 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,17 @@ jobs:
with:
fetch-depth: 1

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10.12" # Replace with the version you need
run: uv sync

- name: install mypy
run: uv tool install mypy

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install mypy>=1.7.1
- name: Type fuzz scripts
run: mypy fuzz
# - name: Type training scripts
# run: mypy training
run: uv run mypy fuzz

- name: Type Check Evaluation
run: mypy evaluation
run: uv run mypy evaluation
39 changes: 16 additions & 23 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,21 @@ jobs:
matrix:
python-version: ["3.10.12"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
- uses: actions/checkout@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint
pip install -r requirements.txt
# - name: Analysing the code with pylint
# run: |
# pylint $(git ls-files '*.py')
- name: Run Pylint
run: |
PYLINT_OUTPUT=$(pylint $(git ls-files '*.py') || true)
PYLINT_SCORE=$(echo "$PYLINT_OUTPUT" | grep 'rated at' | sed 's/.*rated at \([0-9.]*\)\/10.*/\1/')
echo "PYLINT_SCORE=$PYLINT_SCORE" >> $GITHUB_ENV
echo "$PYLINT_OUTPUT"
fetch-depth: 1

- name: Fail if below threshold (8)
run: |
if (( $(echo "$PYLINT_SCORE < 8.0" |bc -l) )); then
exit 1
fi
- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python
run: uv sync

- name: install pylint
run: uv pip install pylint

- name: Lint Evaluation Code
run: uv run pylint evaluation

- name: Lint fuzz code
run: uv run pylint fuzz
16 changes: 7 additions & 9 deletions .github/workflows/unitttest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,21 @@ jobs:
with:
fetch-depth: 1

- name: Install uv
uses: astral-sh/setup-uv@v5

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.10.12" # Replace with the version you need
run: uv sync

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test HumanEval-X Evaluation
run: |
source ./env.sh
wget https://github.com/THUDM/CodeGeeX/raw/main/codegeex/benchmark/humaneval-x/rust/data/humaneval_rust.jsonl.gz
gzip -d humaneval_rust.jsonl.gz
mv humaneval_rust.jsonl data
python3 tests/test_humaneval.py
uv run tests/test_humaneval.py

- name: Test OSS Evaluation
run: |
source ./env.sh
python3 tests/test_oss.py
uv run tests/test_oss.py
Loading
Loading