Skip to content

Commit c634a04

Browse files
committed
feat(release): create first release
0 parents  commit c634a04

52 files changed

Lines changed: 10333 additions & 0 deletions

Some content is hidden

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

.devcontainer/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
ARG VARIANT="3.9"
2+
FROM --platform=linux/amd64 mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
3+
4+
USER vscode
5+
6+
RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.44.0" RYE_INSTALL_OPTION="--yes" bash
7+
ENV PATH=/home/vscode/.rye/shims:$PATH
8+
9+
RUN echo "[[ -d .venv ]] && source .venv/bin/activate || export PATH=\$PATH" >> /home/vscode/.bashrc

.devcontainer/devcontainer.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "Debian",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"context": "..",
6+
"args": {
7+
"VARIANT": "3.9"
8+
}
9+
},
10+
11+
"postStartCommand": "make install-dev",
12+
13+
"customizations": {
14+
"vscode": {
15+
"extensions": [
16+
"ms-python.python"
17+
],
18+
"settings": {
19+
"terminal.integrated.shell.linux": "/bin/bash",
20+
"python.pythonPath": ".venv/bin/python",
21+
"python.defaultInterpreterPath": ".venv/bin/python",
22+
"python.typeChecking": "basic",
23+
"terminal.integrated.env.linux": {
24+
"PATH": "/home/vscode/.rye/shims:${env:PATH}"
25+
},
26+
"forwardPorts": [
27+
8000
28+
]
29+
}
30+
}
31+
},
32+
"features": {
33+
"ghcr.io/devcontainers/features/node:1": {}
34+
}
35+
36+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: 🐛 Bug report
2+
description: Сообщить о проблеме или ошибке в библиотеке
3+
labels: ['bug']
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Спасибо, что нашли время заполнить Bug report! 😊
9+
- type: textarea
10+
id: what-happened
11+
attributes:
12+
label: 📝 Опишите ошибку
13+
description: Четкое и краткое описание ошибки и любой дополнительный контекст.
14+
placeholder: Расскажите нам, что вы видите! 👀
15+
validations:
16+
required: true
17+
- type: textarea
18+
id: repro-steps
19+
attributes:
20+
label: 🔄 Как воспроизвести
21+
description: Шаги для воспроизведения проблемы.
22+
placeholder: |
23+
1. Получить '...' 📥
24+
2. Обновить '....' 🔄
25+
3. Увидеть ошибку ⚠️
26+
validations:
27+
required: true
28+
- type: textarea
29+
id: code-snippets
30+
attributes:
31+
label: 💻 Фрагменты кода
32+
description: Если применимо, добавьте фрагменты кода, чтобы помочь объяснить проблему.
33+
render: Python
34+
validations:
35+
required: false
36+
- type: input
37+
id: os
38+
attributes:
39+
label: 🖥️ Операционная система
40+
placeholder: macOS
41+
validations:
42+
required: true
43+
- type: input
44+
id: language-version
45+
attributes:
46+
label: 🐍 Версия Python
47+
placeholder: Python v3.11.4
48+
validations:
49+
required: true
50+
- type: input
51+
id: lib-version
52+
attributes:
53+
label: 📚 Версия библиотеки
54+
placeholder: evolution-openai v0.1.0
55+
validations:
56+
required: true
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: ✨ Feature request
2+
description: Предложить идею для библиотеки
3+
labels: ['feature-request']
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Спасибо, что нашли время заполнить Feature request! 🚀
9+
- type: checkboxes
10+
id: non_api
11+
attributes:
12+
label: ✅ Подтвердите, что это Feature request для Python библиотеки, а не для OpenAI API
13+
description: Запросы функций для OpenAI API следует сообщать в нашем [Сообществе разработчиков](https://community.openai.com/c/api/7) 👥
14+
options:
15+
- label: Это Feature request для Python библиотеки
16+
required: true
17+
- type: textarea
18+
id: feature
19+
attributes:
20+
label: 💡 Опишите функцию или улучшение, которое вы запрашиваете
21+
description: Четкое и краткое описание того, что вы хотите получить.
22+
validations:
23+
required: true
24+
- type: textarea
25+
id: context
26+
attributes:
27+
label: 📋 Дополнительный контекст
28+
description: Добавьте любой другой контекст о запросе функции здесь.

.github/workflows/ci.yml

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
lint:
17+
timeout-minutes: 10
18+
name: lint
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Install Rye
24+
run: |
25+
curl -sSf https://rye.astral.sh/get | bash
26+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
27+
env:
28+
RYE_VERSION: '0.44.0'
29+
RYE_INSTALL_OPTION: '--yes'
30+
31+
- name: Install dependencies
32+
run: make build && make install-dev
33+
34+
- name: Run linting
35+
run: make lint-all
36+
37+
build:
38+
timeout-minutes: 10
39+
name: build
40+
runs-on: ubuntu-latest
41+
needs: [lint]
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- name: Install Rye
46+
run: |
47+
curl -sSf https://rye.astral.sh/get | bash
48+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
49+
env:
50+
RYE_VERSION: '0.44.0'
51+
RYE_INSTALL_OPTION: '--yes'
52+
53+
- name: Install dependencies
54+
run: make install-dev
55+
56+
- name: Build package
57+
run: make build
58+
59+
- name: Upload build artifacts
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: dist
63+
path: dist/
64+
65+
test:
66+
timeout-minutes: 15
67+
name: test
68+
runs-on: ubuntu-latest
69+
needs: [lint, build]
70+
steps:
71+
- uses: actions/checkout@v4
72+
73+
- name: Install Rye
74+
run: |
75+
curl -sSf https://rye.astral.sh/get | bash
76+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
77+
env:
78+
RYE_VERSION: '0.44.0'
79+
RYE_INSTALL_OPTION: '--yes'
80+
81+
- name: Install dependencies
82+
run: make install-dev
83+
84+
- name: Download build artifacts
85+
uses: actions/download-artifact@v4
86+
with:
87+
name: dist
88+
path: dist/
89+
90+
- name: Run tests with coverage
91+
run: make test
92+
93+
- name: Upload coverage artifacts
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: coverage
97+
path: |
98+
.coverage
99+
htmlcov/
100+
coverage.xml
101+
coverage.json
102+
103+
docs:
104+
timeout-minutes: 10
105+
name: docs
106+
runs-on: ubuntu-latest
107+
needs: [lint, build, test]
108+
if: github.event_name == 'pull_request' && github.base_ref == 'main' || github.event_name == 'push' && github.ref == 'refs/heads/main'
109+
steps:
110+
- uses: actions/checkout@v4
111+
112+
- name: Install Rye
113+
run: |
114+
curl -sSf https://rye.astral.sh/get | bash
115+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
116+
env:
117+
RYE_VERSION: '0.44.0'
118+
RYE_INSTALL_OPTION: '--yes'
119+
120+
- name: Install dependencies
121+
run: make install-dev
122+
123+
- name: Build documentation
124+
run: make docs
125+
126+
- name: Check documentation links
127+
run: make docs-linkcheck
128+
129+
- name: Upload documentation artifacts
130+
uses: actions/upload-artifact@v4
131+
with:
132+
name: docs
133+
path: docs/_build/html/
134+
135+
coverage-badge:
136+
timeout-minutes: 5
137+
name: coverage-badge
138+
runs-on: ubuntu-latest
139+
needs: [test]
140+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
141+
steps:
142+
- uses: actions/checkout@v4
143+
144+
- name: Download coverage artifacts
145+
uses: actions/download-artifact@v4
146+
with:
147+
name: coverage
148+
path: .
149+
150+
- name: Update Coverage Badge
151+
uses: we-cli/coverage-badge-action@main
152+
with:
153+
coverage-file: coverage.json
154+
155+
test-examples:
156+
timeout-minutes: 15
157+
name: test-examples
158+
runs-on: ubuntu-latest
159+
needs: [test]
160+
if: github.event_name == 'pull_request' && github.base_ref == 'main' || github.event_name == 'push' && github.ref == 'refs/heads/main'
161+
steps:
162+
- uses: actions/checkout@v4
163+
164+
- name: Install Rye
165+
run: |
166+
curl -sSf https://rye.astral.sh/get | bash
167+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
168+
env:
169+
RYE_VERSION: '0.44.0'
170+
RYE_INSTALL_OPTION: '--yes'
171+
172+
- name: Install dependencies
173+
run: make install-dev
174+
175+
- name: Run basic examples
176+
env:
177+
EVOLUTION_KEY_ID: ${{ secrets.EVOLUTION_KEY_ID }}
178+
EVOLUTION_SECRET: ${{ secrets.EVOLUTION_SECRET }}
179+
EVOLUTION_BASE_URL: ${{ secrets.EVOLUTION_BASE_URL }}
180+
run: make run-examples
181+
182+
- name: Run async examples
183+
env:
184+
EVOLUTION_KEY_ID: ${{ secrets.EVOLUTION_KEY_ID }}
185+
EVOLUTION_SECRET: ${{ secrets.EVOLUTION_SECRET }}
186+
EVOLUTION_BASE_URL: ${{ secrets.EVOLUTION_BASE_URL }}
187+
run: make run-async
188+
189+
- name: Run streaming examples
190+
env:
191+
EVOLUTION_KEY_ID: ${{ secrets.EVOLUTION_KEY_ID }}
192+
EVOLUTION_SECRET: ${{ secrets.EVOLUTION_SECRET }}
193+
EVOLUTION_BASE_URL: ${{ secrets.EVOLUTION_BASE_URL }}
194+
run: make run-streaming
195+
196+
- name: Run token management examples
197+
env:
198+
EVOLUTION_KEY_ID: ${{ secrets.EVOLUTION_KEY_ID }}
199+
EVOLUTION_SECRET: ${{ secrets.EVOLUTION_SECRET }}
200+
EVOLUTION_BASE_URL: ${{ secrets.EVOLUTION_BASE_URL }}
201+
run: make run-tokens

0 commit comments

Comments
 (0)