Skip to content

Commit dd1be17

Browse files
committed
merge to master
2 parents 4b9582e + 1476966 commit dd1be17

File tree

10 files changed

+309
-286
lines changed

10 files changed

+309
-286
lines changed

.github/workflows/release-and-publish.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
poetry run python -m openadapt.build
5050
cd dist
5151
zip -r ../OpenAdapt.app.zip OpenAdapt.app
52+
mv OpenAdapt.dmg ..
5253
cd ..
5354
- name: Upload MacOS executable
5455
uses: actions/upload-artifact@v4
@@ -93,6 +94,7 @@ jobs:
9394
poetry run python -m openadapt.build
9495
cd dist
9596
7z a -tzip ../OpenAdapt.zip OpenAdapt
97+
move OpenAdapt_Installer.exe ..
9698
cd ..
9799
- name: Upload Windows executable
98100
uses: actions/upload-artifact@v4
@@ -200,6 +202,16 @@ jobs:
200202
with:
201203
name: OpenAdapt
202204
path: dist/
205+
- name: Download macOS installer
206+
uses: actions/download-artifact@v4
207+
with:
208+
name: OpenAdapt.dmg
209+
path: dist/
210+
- name: Download Windows installer
211+
uses: actions/download-artifact@v4
212+
with:
213+
name: OpenAdapt_Installer
214+
path: dist/
203215
- name: Python Semantic Release
204216
id: semantic_release
205217
uses: python-semantic-release/[email protected]

CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,52 @@
22

33

44

5+
## v0.39.3 (2024-08-07)
6+
7+
### Fix
8+
9+
* fix: remove duplicate import (#870) ([`e776ed8`](https://github.com/OpenAdaptAI/OpenAdapt/commit/e776ed88dddd1eeaf773bd2dca5a0aea27da46ce))
10+
11+
* fix: only import window if necessary (#869)
12+
13+
Only import window if necessary ([`efc941d`](https://github.com/OpenAdaptAI/OpenAdapt/commit/efc941d34a4cabc7178112d5ca707fb6b956af52))
14+
15+
16+
## v0.39.2 (2024-08-06)
17+
18+
### Fix
19+
20+
* fix(video): upgrade to pyav 12.3.0 (#868)
21+
22+
Fixes #862 ([`d7f463c`](https://github.com/OpenAdaptAI/OpenAdapt/commit/d7f463c7a17006162248007262515cd6c28b3e38))
23+
24+
25+
## v0.39.1 (2024-07-25)
26+
27+
### Fix
28+
29+
* fix(installer): fix installer upload (#866)
30+
31+
* Update release-and-publish.yml: upload installers
32+
33+
* Update release-and-publish.yml: fix case ([`489b9c2`](https://github.com/OpenAdaptAI/OpenAdapt/commit/489b9c201d318fba09320b3c3e414ee1713ccafc))
34+
35+
* fix(VisualReplayStrategy): avoid re-using failing segmentations ([`0045ebb`](https://github.com/OpenAdaptAI/OpenAdapt/commit/0045ebb1f98cc74983ab1265266aed870ff54d7d))
36+
37+
* fix(installer, audio): postinstall whisper; download installer artefacts (#865)
38+
39+
* postinstall whisper; download installer artefacts
40+
41+
* poetry lock ([`a4470c3`](https://github.com/OpenAdaptAI/OpenAdapt/commit/a4470c372417cb0a22ee1a44193b6f23de44d96e))
42+
43+
44+
## v0.39.0 (2024-07-25)
45+
46+
### Feature
47+
48+
* feat(installer): upload installers (#863) ([`47fa551`](https://github.com/OpenAdaptAI/OpenAdapt/commit/47fa551b204c749f6649815bcf01def9d06257c3))
49+
50+
551
## v0.38.0 (2024-07-25)
652

753
### Feature

build_scripts/upload_release_artifacts.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ poetry install
22
VERSION="v$(poetry run python -m build_scripts.get_version)"
33
mv dist/OpenAdapt.zip dist/OpenAdapt-$VERSION.zip
44
mv dist/OpenAdapt.app.zip dist/OpenAdapt-$VERSION.app.zip
5+
mv dist/OpenAdapt_Installer.exe dist/OpenAdapt_Installer-$VERSION.exe
6+
mv dist/OpenAdapt.dmg dist/OpenAdapt-$VERSION.dmg
57
echo "Uploading release artifacts for version $VERSION"
6-
gh release upload $VERSION dist/OpenAdapt-$VERSION.zip dist/OpenAdapt-$VERSION.app.zip
8+
gh release upload $VERSION dist/OpenAdapt-$VERSION.zip dist/OpenAdapt-$VERSION.app.zip dist/OpenAdapt_Installer-$VERSION.exe dist/OpenAdapt-$VERSION.dmg

openadapt/drivers/openai.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ def get_response(
127127
if "error" in result:
128128
error = result["error"]
129129
message = error["message"]
130+
logger.warning(f"{message=}")
131+
if "retry" in message:
132+
return get_response(payload)
130133
raise Exception(message)
131134
return result
132135

openadapt/models.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import numpy as np
1414
import sqlalchemy as sa
1515

16-
from openadapt import window
1716
from openadapt.config import config
1817
from openadapt.custom_logger import logger
1918
from openadapt.db import db
@@ -539,6 +538,8 @@ def get_active_window_event(
539538
Returns:
540539
(WindowEvent) the active window event.
541540
"""
541+
from openadapt import window
542+
542543
return WindowEvent(**window.get_active_window_data(include_window_data))
543544

544545
def scrub(self, scrubber: ScrubbingProvider | TextScrubbingMixin) -> None:

openadapt/strategies/visual.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -391,14 +391,15 @@ def get_window_segmentation(
391391
if DEBUG:
392392
original_image.show()
393393

394-
similar_segmentation, similar_segmentation_diff = find_similar_image_segmentation(
395-
original_image,
396-
)
397-
if similar_segmentation:
398-
# TODO XXX: create copy of similar_segmentation, but overwrite with segments of
399-
# regions of new image where segments of similar_segmentation overlap non-zero
400-
# regions of similar_segmentation_diff
401-
return similar_segmentation
394+
if not exceptions:
395+
similar_segmentation, similar_segmentation_diff = (
396+
find_similar_image_segmentation(original_image)
397+
)
398+
if similar_segmentation:
399+
# TODO XXX: create copy of similar_segmentation, but overwrite with segments
400+
# of regions of new image where segments of similar_segmentation overlap
401+
# non-zero regions of similar_segmentation_diff
402+
return similar_segmentation
402403

403404
segmentation_adapter = adapters.get_default_segmentation_adapter()
404405
segmented_image = segmentation_adapter.fetch_segmented_image(original_image)

openadapt/utils.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,10 @@ def parse_code_snippet(snippet: str) -> dict:
591591
"""
592592
code_block = extract_code_block(snippet)
593593
# remove backtick lines
594-
code_content = "\n".join(code_block.splitlines()[1:-1])
594+
if "```" in code_block:
595+
code_content = "\n".join(code_block.splitlines()[1:-1])
596+
else:
597+
code_content = code_block
595598
# convert literals from Javascript to Python
596599
to_by_from = {
597600
"true": "True",
@@ -637,7 +640,7 @@ def extract_code_block(text: str) -> str:
637640
raise ValueError("Uneven number of backtick lines")
638641

639642
if len(backtick_idxs) < 2:
640-
return "" # No enclosing backticks found, return empty string
643+
return text
641644

642645
# Extract only the lines between the first and last backtick line,
643646
# including the backticks

0 commit comments

Comments
 (0)