Skip to content

Commit 8a4fa08

Browse files
authored
release: 0.1.0 (#25)
* update setup * fix mypy for evaluation * fix pylint for evaluation * rm unused oss scripts * fix: lint fuzz * ci: remove oss * ci: setup git submodules
1 parent 1f2f551 commit 8a4fa08

25 files changed

+2730
-1235
lines changed

.github/workflows/mypy.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,17 @@ jobs:
1111
with:
1212
fetch-depth: 1
1313

14+
- name: Install uv
15+
uses: astral-sh/setup-uv@v5
16+
1417
- name: Set up Python
15-
uses: actions/setup-python@v2
16-
with:
17-
python-version: "3.10.12" # Replace with the version you need
18+
run: uv sync
19+
20+
- name: install mypy
21+
run: uv tool install mypy
1822

19-
- name: Install dependencies
20-
run: |
21-
python -m pip install --upgrade pip
22-
pip install -r requirements.txt
23-
pip install mypy>=1.7.1
2423
- name: Type fuzz scripts
25-
run: mypy fuzz
26-
# - name: Type training scripts
27-
# run: mypy training
24+
run: uv run mypy fuzz
25+
2826
- name: Type Check Evaluation
29-
run: mypy evaluation
27+
run: uv run mypy evaluation

.github/workflows/pylint.yml

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,28 @@ on: [pull_request]
55
jobs:
66
build:
77
runs-on: ubuntu-latest
8-
strategy:
9-
matrix:
10-
python-version: ["3.10.12"]
8+
119
steps:
12-
- uses: actions/checkout@v3
13-
- name: Set up Python ${{ matrix.python-version }}
14-
uses: actions/setup-python@v3
10+
- uses: actions/checkout@v2
1511
with:
16-
python-version: ${{ matrix.python-version }}
17-
- name: Install dependencies
18-
run: |
19-
python -m pip install --upgrade pip
20-
pip install pylint
21-
pip install -r requirements.txt
22-
# - name: Analysing the code with pylint
23-
# run: |
24-
# pylint $(git ls-files '*.py')
25-
- name: Run Pylint
26-
run: |
27-
PYLINT_OUTPUT=$(pylint $(git ls-files '*.py') || true)
28-
PYLINT_SCORE=$(echo "$PYLINT_OUTPUT" | grep 'rated at' | sed 's/.*rated at \([0-9.]*\)\/10.*/\1/')
29-
echo "PYLINT_SCORE=$PYLINT_SCORE" >> $GITHUB_ENV
30-
echo "$PYLINT_OUTPUT"
12+
fetch-depth: 1
13+
14+
- name: Install uv
15+
uses: astral-sh/setup-uv@v5
3116

32-
- name: Fail if below threshold (8)
17+
- name: Set up Python
18+
run: uv sync
19+
20+
- name: install pylint
21+
run: uv pip install pylint
22+
23+
- name: setup submodules
3324
run: |
34-
if (( $(echo "$PYLINT_SCORE < 8.0" |bc -l) )); then
35-
exit 1
36-
fi
25+
git submodule init
26+
git submodule update
27+
28+
- name: Lint Evaluation Code
29+
run: uv run pylint evaluation
30+
31+
- name: Lint fuzz code
32+
run: uv run pylint fuzz

.github/workflows/unitttest.yml

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,16 @@ jobs:
1111
with:
1212
fetch-depth: 1
1313

14+
- name: Install uv
15+
uses: astral-sh/setup-uv@v5
16+
1417
- name: Set up Python
15-
uses: actions/setup-python@v2
16-
with:
17-
python-version: "3.10.12" # Replace with the version you need
18+
run: uv sync
1819

19-
- name: Install dependencies
20-
run: |
21-
python -m pip install --upgrade pip
22-
pip install -r requirements.txt
2320
- name: Test HumanEval-X Evaluation
2421
run: |
2522
source ./env.sh
2623
wget https://github.com/THUDM/CodeGeeX/raw/main/codegeex/benchmark/humaneval-x/rust/data/humaneval_rust.jsonl.gz
2724
gzip -d humaneval_rust.jsonl.gz
2825
mv humaneval_rust.jsonl data
29-
python3 tests/test_humaneval.py
30-
- name: Test OSS Evaluation
31-
run: |
32-
source ./env.sh
33-
python3 tests/test_oss.py
26+
uv run tests/test_humaneval.py

0 commit comments

Comments
 (0)