Elffuss BraidHub

kikocis/auto-code-rover public

Update environment and add github action
Changesetc354dbc7a0ea0b4286fb69da64092e9da9a71421b96fcf3b99a1e79f44de88db
AuthorMartin Mirchev <mirchevmartin2203@gmail.com> · 2024-09-09 15:26 +08:00
CommitterMartin Mirchev <mirchevmartin2203@gmail.com> · 2024-09-09 15:26 +08:00
Parents8e752a9ccd72

Browse the files at this changeset

4 files changed

modified Dockerfile.minimal +1 −1
@@ -1,7 +1,7 @@
11 # autocoderover/acr:v1
22 FROM continuumio/miniconda3:main
33
4-RUN git config --global user.email acr@nus.edu.sg
4+RUN git config --global user.email acr@autocoderover.dev
55 RUN git config --global user.name acr
66
77 ENV DEBIAN_FRONTEND=noninteractive
added action.yml +33 −0
@@ -0,0 +1,33 @@
1+name: 'AutoCodeRover'
2+description: 'Install AutoCodeRover dependencies.'
3+
4+runs:
5+
6+ using: 'composite'
7+
8+ steps:
9+
10+ - uses: actions/setup-python@v5
11+ with:
12+ python-version: '3.11'
13+
14+ - name: Cache pip dependencies
15+ id: cache-deps
16+ uses: actions/cache@v3
17+ with:
18+ path: ~/.cache/pip
19+ key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', '${{ github.action_path }}') }}
20+ restore-keys: |
21+ ${{ runner.os }}-pip-
22+ - name: Install ACR dependencies
23+ id: install-deps
24+ run: |
25+ pip install -r ${{ github.action_path }}/requirements.txt
26+ echo "pip install ok"
27+ echo "ACR_PATH=${{ github.action_path }}" >> $GITHUB_OUTPUT
28+ shell: bash
29+
30+outputs:
31+ ACR_PATH:
32+ description: "Path to AutoCodeRover source code directory."
33+ value: ${{ steps.install-deps.outputs.ACR_PATH }}
No newline at the end of the file
modified app/main.py +7 −3
@@ -533,17 +533,21 @@
533533
534534 end_time = datetime.now()
535535
536- dump_cost(start_time, end_time, task_output_dir)
536+ dump_cost(start_time, end_time, task_output_dir, python_task.project_path)
537537 finally:
538538 python_task.reset_project()
539539
540540 return run_ok
541541
542542
543-def dump_cost(start_time: datetime, end_time: datetime, task_output_dir: str):
543+def dump_cost(
544+ start_time: datetime, end_time: datetime, task_output_dir: str, project_path: str
545+):
546+ with apputils.cd(project_path):
547+ commit_hash = apputils.get_current_commit_hash()
544548 model_stats = common.SELECTED_MODEL.get_overall_exec_stats()
545549 stats = {
546- "commit": apputils.get_current_commit_hash(),
550+ "commit": commit_hash,
547551 "start_epoch": start_time.timestamp(),
548552 "end_epoch": end_time.timestamp(),
549553 "elapsed_seconds": (end_time - start_time).total_seconds(),
modified environment.yml +1 −32
@@ -28,35 +28,4 @@
2828 - loguru=0.7.2
2929 - rich=13.7.1
3030 - pip:
31- - annotated-types==0.6.0
32- - anyio==4.2.0
33- - beautifulsoup4==4.12.3
34- - boto3==1.34.122
35- - certifi==2024.7.4
36- - distro==1.9.0
37- - docstring-parser==0.15
38- - h11==0.14.0
39- - httpcore==1.0.5
40- - httpx==0.27.0
41- - idna==3.7
42- - lxml==5.1.0
43- - openai==1.35.14
44- - pydantic==2.5.3
45- - pydantic-core==2.14.6
46- - python-dotenv==1.0.0
47- - rich==13.7.1
48- - sniffio==1.3.0
49- - soupsieve==2.5
50- - tenacity==8.2.3
51- - termcolor==2.4.0
52- - timeout-decorator==0.5.0
53- - tqdm==4.66.4
54- - typing-extensions==4.9.0
55- - unittest-xml-reporting==3.2.0
56- - coverage==7.4.4
57- - pylint==3.1.0
58- - litellm==1.41.24
59- - ollama==0.1.8
60- - flask==3.0.3
61- - flask_cors==4.0.0
62- - unidiff==0.7.5
31+ - -r requirements.txt