Skip to content

Commit e7d746b

Browse files
authored
Merge changes for v0.2 release (#15)
1 parent 0edab6c commit e7d746b

File tree

162 files changed

+13884
-9924
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+13884
-9924
lines changed

.env

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ DOCIO_URL=http://docio:6979/api/docio
99
UNSTRUCTUREDIO_URL=http://unstructuredio:6989
1010

1111
# Configuration
12-
SERVICE_KEY=
1312
OWL_PORT=6969
1413
OWL_WORKERS=1
1514
OWL_DB_DIR=db

.flake8

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ extend-exclude =
88
build/,
99
configs/,
1010
dependencies/,
11-
venv/
11+
venv/,
12+
**/dist
13+
**/build

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
# https://git-scm.com/docs/gitattributes#Documentation/gitattributes.txt-Settostringvalueauto
77
* text=auto eol=lf
88

9+
# Declare files that will always have CRLF line endings on checkout.
10+
*.bat text eol=crlf
11+
12+
# Declare files that will always have LF line endings on checkout.
13+
*.sh text eol=lf
14+
15+
916
# These files are text and should be normalized (Convert crlf => lf)
1017
# Setting the `text` attribute on a path enables end-of-line normalization and marks the path as a text file.
1118
# End-of-line conversion takes place without guessing the content type.

.github/workflows/ci-win.yml

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
name: CI-Win
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
tags:
11+
- "v*"
12+
13+
jobs:
14+
pyinstaller_api:
15+
name: PyInstaller API Service Compilation
16+
runs-on: windows-11-desktop
17+
strategy:
18+
matrix:
19+
python-version: ["3.10"]
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v2
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v2
27+
with:
28+
python-version: ${{ matrix.python-version }}
29+
30+
- name: Inspect Python version
31+
run: python --version
32+
33+
- name: Install Git
34+
run: |
35+
$installer_url = "https://github.com/git-for-windows/git/releases/download/v2.45.2.windows.1/Git-2.45.2-64-bit.exe"
36+
Invoke-WebRequest -Uri $installer_url -OutFile "GitInstaller.exe"
37+
Start-Process -FilePath "GitInstaller.exe" -Args "/VERYSILENT /NORESTART /NOCANCEL /SP- /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /COMPONENTS='icons,ext\reg\shellhere,assoc,assoc_sh'" -Wait
38+
Remove-Item "GitInstaller.exe"
39+
40+
# Add Git to PATH
41+
$gitPath = "C:\Program Files\Git\cmd"
42+
$env:PATH = "$gitPath;$env:PATH"
43+
[Environment]::SetEnvironmentVariable("PATH", $env:PATH, [EnvironmentVariableTarget]::Machine)
44+
45+
# Output the new PATH to a step output
46+
echo "PATH=$env:PATH" >> $env:GITHUB_ENV
47+
48+
# Verify Git installation
49+
git --version
50+
shell: powershell
51+
52+
- name: Verify Git in PATH
53+
run: |
54+
Write-Host "Current PATH: $env:PATH"
55+
$gitPath = (Get-Command git -ErrorAction SilentlyContinue).Path
56+
if ($gitPath) {
57+
Write-Host "Git found at: $gitPath"
58+
} else {
59+
Write-Host "Git not found in PATH"
60+
exit 1
61+
}
62+
shell: powershell
63+
64+
- name: Inspect git version
65+
run: |
66+
git --version
67+
68+
- name: Remove cloud-only modules and start compiling API service
69+
run: |
70+
$ErrorActionPreference = "Stop"
71+
.\scripts\compile_api_exe.ps1
72+
shell: powershell
73+
74+
- name: Validate api.exe is healthy
75+
run: |
76+
$env:OWL_WORKERS=1
77+
$process = Start-Process -NoNewWindow -FilePath ".\services\api\dist\api\api.exe" -PassThru
78+
Start-Sleep -Seconds 10
79+
Write-Output "API process ID: $($process.Id)"
80+
Get-Process
81+
Test-NetConnection -ComputerName localhost -Port 6969
82+
$response = Invoke-WebRequest -Uri http://localhost:6969/api/health -UseBasicParsing
83+
if ($response.StatusCode -eq 200) {
84+
Write-Output "API is healthy"
85+
} else {
86+
throw "API is not healthy"
87+
}
88+
$processId = (Get-Process -Name api -ErrorAction SilentlyContinue).Id
89+
if ($null -ne $processId) {
90+
Stop-Process -Id $processId -Force
91+
} else {
92+
Write-Output "API process not found."
93+
}
94+
shell: powershell
95+
96+
pyinstaller_docio:
97+
name: PyInstaller DocIO Service Compilation
98+
runs-on: windows-11-desktop
99+
strategy:
100+
matrix:
101+
python-version: ["3.10"]
102+
103+
steps:
104+
- name: Checkout code
105+
uses: actions/checkout@v2
106+
107+
- name: Set up Python
108+
uses: actions/setup-python@v2
109+
with:
110+
python-version: ${{ matrix.python-version }}
111+
112+
- name: Display Python version
113+
run: python --version
114+
115+
- name: Install Microsoft Visual C++ Redistributable
116+
run: |
117+
Invoke-WebRequest -Uri "https://aka.ms/vs/16/release/vc_redist.x64.exe" -OutFile "vc_redist.x64.exe"
118+
Start-Process -FilePath "./vc_redist.x64.exe" -ArgumentList "/quiet", "/install" -NoNewWindow -Wait
119+
120+
- name: Install Git
121+
run: |
122+
$installer_url = "https://github.com/git-for-windows/git/releases/download/v2.45.2.windows.1/Git-2.45.2-64-bit.exe"
123+
Invoke-WebRequest -Uri $installer_url -OutFile "GitInstaller.exe"
124+
Start-Process -FilePath "GitInstaller.exe" -Args "/VERYSILENT /NORESTART /NOCANCEL /SP- /CLOSEAPPLICATIONS /RESTARTAPPLICATIONS /COMPONENTS='icons,ext\reg\shellhere,assoc,assoc_sh'" -Wait
125+
Remove-Item "GitInstaller.exe"
126+
127+
# Add Git to PATH
128+
$gitPath = "C:\Program Files\Git\cmd"
129+
$env:PATH = "$gitPath;$env:PATH"
130+
[Environment]::SetEnvironmentVariable("PATH", $env:PATH, [EnvironmentVariableTarget]::Machine)
131+
132+
# Output the new PATH to a step output
133+
echo "PATH=$env:PATH" >> $env:GITHUB_ENV
134+
135+
# Verify Git installation
136+
git --version
137+
shell: powershell
138+
139+
- name: Verify Git in PATH
140+
run: |
141+
Write-Host "Current PATH: $env:PATH"
142+
$gitPath = (Get-Command git -ErrorAction SilentlyContinue).Path
143+
if ($gitPath) {
144+
Write-Host "Git found at: $gitPath"
145+
} else {
146+
Write-Host "Git not found in PATH"
147+
exit 1
148+
}
149+
shell: powershell
150+
151+
- name: Remove cloud-only modules and start compiling DocIO service
152+
run: |
153+
$ErrorActionPreference = "Stop"
154+
.\scripts\compile_docio_exe.ps1
155+
shell: powershell
156+
157+
- name: Validate docio.exe is healthy
158+
run: |
159+
$env:DOCIO_WORKERS=1
160+
$process = Start-Process -NoNewWindow -FilePath ".\services\docio\dist\docio\docio.exe" -PassThru
161+
Start-Sleep -Seconds 10
162+
Write-Output "DocIO process ID: $($process.Id)"
163+
Get-Process
164+
Test-NetConnection -ComputerName localhost -Port 6979
165+
$response = Invoke-WebRequest -Uri http://localhost:6979/health -UseBasicParsing
166+
if ($response.StatusCode -eq 200) {
167+
Write-Output "DocIO is healthy"
168+
} else {
169+
throw "DocIO is not healthy"
170+
}
171+
$processId = (Get-Process -Name docio -ErrorAction SilentlyContinue).Id
172+
if ($null -ne $processId) {
173+
Stop-Process -Id $processId -Force
174+
} else {
175+
Write-Output "DocIO process not found."
176+
}
177+
shell: powershell

.github/workflows/ci.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ jobs:
2828
with:
2929
python-version: ${{ matrix.python-version }}
3030

31+
- name: Inspect git version
32+
run: |
33+
git --version
34+
3135
- name: Remove cloud-only modules and install Python client
3236
run: |
3337
set -e
@@ -89,11 +93,18 @@ jobs:
8993
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
9094
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
9195
TOGETHER_API_KEY: ${{ secrets.TOGETHER_API_KEY }}
92-
# JAMAI_API_KEY: ${{ secrets.JAMAI_API_KEY }}
9396
COMPOSE_DOCKER_CLI_BUILD: 1
9497
DOCKER_BUILDKIT: 1
9598

96-
- name: Pytest
99+
- name: Inspect owl environment
100+
run: docker exec jamai_owl pip list
101+
102+
# - name: Pytest (owl)
103+
# run: |
104+
# set -e
105+
# python -m pytest -vv --doctest-modules --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov-report=xml services/api/tests
106+
107+
- name: Pytest (Python client)
97108
run: |
98109
set -e
99110
export JAMAI_API_BASE=http://localhost:6969/api

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,5 @@ jobs:
5858

5959
- name: Check files using Prettier
6060
run: |
61-
npm install -g prettier@3.1
61+
npm install -g prettier@3.3.2
6262
prettier --check .

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,5 @@ clients/typescript/**/*.d.ts
4747

4848
**/node_modules/
4949
**/docs-autogen/
50-
**/docs-autogen-ts/
50+
**/docs-autogen-ts/
51+
**/dist

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "examples/github-bot"]
2+
path = examples/github-bot
3+
url = https://github.com/EmbeddedLLM/github-bot

0 commit comments

Comments
 (0)