Skip to content

Commit 5685c9f

Browse files
Initial attempt to solve wandb_gql for issues #70. (#77)
* Initial attempt to solve wandb_gql for issues #70. * Adding wandb to pip.
1 parent a17d76d commit 5685c9f

File tree

3 files changed

+93
-91
lines changed

3 files changed

+93
-91
lines changed

.github/workflows/ci_pipeline.yml

Lines changed: 90 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -77,95 +77,95 @@ jobs:
7777
cd /tmp
7878
cover-agent --help
7979
80-
# build:
81-
# needs: test
82-
# strategy:
83-
# matrix:
84-
# os: [ubuntu-latest, windows-latest, macos-latest]
80+
build:
81+
needs: test
82+
strategy:
83+
matrix:
84+
os: [ubuntu-latest, windows-latest, macos-latest]
8585

86-
# runs-on: ${{ matrix.os }}
87-
# steps:
88-
# - uses: actions/checkout@v2
89-
# - name: Set up Python
90-
# uses: actions/setup-python@v2
91-
# with:
92-
# python-version: '3.12'
93-
# - name: Install Dependencies
94-
# run: |
95-
# pip install poetry
96-
# poetry install
97-
# - name: Build Executable
98-
# run: make installer
99-
# - name: Test Executable (Windows)
100-
# if: ${{ matrix.os == 'windows-latest' }}
101-
# run: .\dist\cover-agent.exe --help
102-
# shell: pwsh
103-
# - name: Test Executable (Unix)
104-
# if: ${{ matrix.os != 'windows-latest' }}
105-
# run: ./dist/cover-agent --help
106-
# shell: bash
107-
# - name: Upload Executable
108-
# uses: actions/upload-artifact@v2
109-
# with:
110-
# name: cover-agent-${{ matrix.os }}
111-
# path: dist/cover-agent*
86+
runs-on: ${{ matrix.os }}
87+
steps:
88+
- uses: actions/checkout@v2
89+
- name: Set up Python
90+
uses: actions/setup-python@v2
91+
with:
92+
python-version: '3.12'
93+
- name: Install Dependencies
94+
run: |
95+
pip install poetry wandb
96+
poetry install
97+
- name: Build Executable
98+
run: make installer
99+
- name: Test Executable (Windows)
100+
if: ${{ matrix.os == 'windows-latest' }}
101+
run: .\dist\cover-agent.exe --help
102+
shell: pwsh
103+
- name: Test Executable (Unix)
104+
if: ${{ matrix.os != 'windows-latest' }}
105+
run: ./dist/cover-agent --help
106+
shell: bash
107+
- name: Upload Executable
108+
uses: actions/upload-artifact@v2
109+
with:
110+
name: cover-agent-${{ matrix.os }}
111+
path: dist/cover-agent*
112112

113-
# release:
114-
# needs: [build, changes]
115-
# if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changes.outputs.version_changed == 'true'
116-
# runs-on: ubuntu-latest
117-
# steps:
118-
# - uses: actions/checkout@v2
119-
# - name: Download executables (Ubuntu)
120-
# uses: actions/download-artifact@v2
121-
# with:
122-
# name: cover-agent-ubuntu-latest
123-
# path: dist/ubuntu-latest
124-
# - uses: actions/download-artifact@v2
125-
# with:
126-
# name: cover-agent-windows-latest
127-
# path: dist/windows-latest
128-
# - uses: actions/download-artifact@v2
129-
# with:
130-
# name: cover-agent-macos-latest
131-
# path: dist/macos-latest
132-
# - name: Extract version
133-
# run: |
134-
# echo "VERSION=$(cat cover_agent/version.txt)" >> $GITHUB_ENV
135-
# - name: Create Release
136-
# id: create_release
137-
# uses: actions/create-release@v1
138-
# env:
139-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
140-
# with:
141-
# tag_name: ${{ env.VERSION }}
142-
# release_name: Release ${{ env.VERSION }}
143-
# draft: false
144-
# prerelease: false
145-
# - name: Upload Release Asset (Ubuntu)
146-
# uses: actions/upload-release-asset@v1
147-
# env:
148-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
149-
# with:
150-
# upload_url: ${{ steps.create_release.outputs.upload_url }}
151-
# asset_path: dist/ubuntu-latest/cover-agent
152-
# asset_name: cover-agent-ubuntu
153-
# asset_content_type: application/octet-stream
154-
# - name: Upload Release Asset (Windows)
155-
# uses: actions/upload-release-asset@v1
156-
# env:
157-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
158-
# with:
159-
# upload_url: ${{ steps.create_release.outputs.upload_url }}
160-
# asset_path: dist/windows-latest/cover-agent.exe
161-
# asset_name: cover-agent-windows.exe
162-
# asset_content_type: application/octet-stream
163-
# - name: Upload Release Asset (macOS)
164-
# uses: actions/upload-release-asset@v1
165-
# env:
166-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
167-
# with:
168-
# upload_url: ${{ steps.create_release.outputs.upload_url }}
169-
# asset_path: dist/macos-latest/cover-agent
170-
# asset_name: cover-agent-macos
171-
# asset_content_type: application/octet-stream
113+
release:
114+
needs: [build, changes]
115+
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.changes.outputs.version_changed == 'true'
116+
runs-on: ubuntu-latest
117+
steps:
118+
- uses: actions/checkout@v2
119+
- name: Download executables (Ubuntu)
120+
uses: actions/download-artifact@v2
121+
with:
122+
name: cover-agent-ubuntu-latest
123+
path: dist/ubuntu-latest
124+
- uses: actions/download-artifact@v2
125+
with:
126+
name: cover-agent-windows-latest
127+
path: dist/windows-latest
128+
- uses: actions/download-artifact@v2
129+
with:
130+
name: cover-agent-macos-latest
131+
path: dist/macos-latest
132+
- name: Extract version
133+
run: |
134+
echo "VERSION=$(cat cover_agent/version.txt)" >> $GITHUB_ENV
135+
- name: Create Release
136+
id: create_release
137+
uses: actions/create-release@v1
138+
env:
139+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
140+
with:
141+
tag_name: ${{ env.VERSION }}
142+
release_name: Release ${{ env.VERSION }}
143+
draft: false
144+
prerelease: false
145+
- name: Upload Release Asset (Ubuntu)
146+
uses: actions/upload-release-asset@v1
147+
env:
148+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
149+
with:
150+
upload_url: ${{ steps.create_release.outputs.upload_url }}
151+
asset_path: dist/ubuntu-latest/cover-agent
152+
asset_name: cover-agent-ubuntu
153+
asset_content_type: application/octet-stream
154+
- name: Upload Release Asset (Windows)
155+
uses: actions/upload-release-asset@v1
156+
env:
157+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
158+
with:
159+
upload_url: ${{ steps.create_release.outputs.upload_url }}
160+
asset_path: dist/windows-latest/cover-agent.exe
161+
asset_name: cover-agent-windows.exe
162+
asset_content_type: application/octet-stream
163+
- name: Upload Release Asset (macOS)
164+
uses: actions/upload-release-asset@v1
165+
env:
166+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
167+
with:
168+
upload_url: ${{ steps.create_release.outputs.upload_url }}
169+
asset_path: dist/macos-latest/cover-agent
170+
asset_name: cover-agent-macos
171+
asset_content_type: application/octet-stream

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Makefile
2+
SITE_PACKAGES=$(shell python -c "import wandb, os; print(os.path.dirname(wandb.__file__))")
23

34
.PHONY: test build installer
45

@@ -22,6 +23,7 @@ installer:
2223
--add-data "cover_agent/settings/test_generation_prompt.toml:." \
2324
--add-data "cover_agent/settings/analyze_suite_test_headers_indentation.toml:." \
2425
--add-data "cover_agent/settings/analyze_suite_test_insert_line.toml:." \
26+
--add-data "$(SITE_PACKAGES)/vendor:wandb/vendor" \
2527
--hidden-import=tiktoken_ext.openai_public \
2628
--hidden-import=tiktoken_ext \
2729
--hidden-import=wandb \

cover_agent/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.40
1+
0.1.41

0 commit comments

Comments
 (0)