Skip to content

Commit 48995bb

Browse files
KIRA009abrichr
andauthored
fix(build): Fix build issues (#809)
* fix: Fix build issues * fix: Add pyqttoast and whisper explicitly to build * black/flake8 --------- Co-authored-by: Richard Abrich <[email protected]> Co-authored-by: Richard Abrich <[email protected]>
1 parent b340d8f commit 48995bb

File tree

7 files changed

+22
-11
lines changed

7 files changed

+22
-11
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
id: test_on_windows
141141
shell: powershell
142142
run: |
143-
./build_scripts/test_app_run_windows.bat
143+
cmd.exe /c .\build_scripts\test_app_run_windows.bat
144144
if ($LastExitCode -ne 0) {
145145
"windows_build_status=failed" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
146146
}

openadapt/app/dashboard/components/Onboarding/steps/Tutorial.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export const Tutorial = () => {
5252
</Text>
5353
<iframe width="800" height="400" src="https://www.youtube.com/embed/OVERugs50cQ?si=cmi1vY73ADom9EKG" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen className='block mx-auto'></iframe>
5454
<Text my={20} maw={800}>
55-
If you'd like to contribute directly to our development, please consider the following open Bounties (no development experience required):
55+
If {"you'd"} like to contribute directly to our development, please consider the following open Bounties (no development experience required):
5656
{featuredBounty && <BountyCard bounty={featuredBounty} />}
5757
</Text>
5858
</Box>
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
nvm install 21
2-
nvm use 21
31
npm install

openadapt/app/dashboard/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def run_client() -> subprocess.Popen:
2828
if config.REDIRECT_TO_ONBOARDING:
2929
url = f"http://localhost:{config.DASHBOARD_SERVER_PORT}/onboarding"
3030
else:
31-
url = f"http://localhost:{config.DASHBOARD_SERVER_PORT}"
31+
url = f"http://localhost:{config.DASHBOARD_SERVER_PORT}/recordings"
3232
webbrowser.open(url)
3333
run_app()
3434
return

openadapt/build.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@
1515
import gradio_client
1616
import nicegui
1717
import oa_pynput
18+
import pycocotools
1819
import pydicom
20+
import pyqttoast
1921
import spacy_alignments
2022
import ultralytics
23+
import whisper
2124

2225
from openadapt.config import POSTHOG_HOST, POSTHOG_PUBLIC_KEY
2326

@@ -34,6 +37,9 @@ def main() -> None:
3437
spacy_alignments,
3538
gradio_client,
3639
ultralytics,
40+
pycocotools,
41+
pyqttoast,
42+
whisper,
3743
]
3844
if sys.platform == "win32":
3945
additional_packages_to_install.append(screen_recorder_sdk)

openadapt/cache.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def wrapper(*args: Any, **kwargs: Any) -> Any:
108108
return decorator
109109

110110

111-
def clear(keep_days: int = 0, dry_run: bool = False):
111+
def clear(keep_days: int = 0, dry_run: bool = False) -> None:
112112
"""Clears the cache, optionally keeping data for a specified number of days.
113113
114114
With an option for a dry run.
@@ -125,7 +125,7 @@ def clear(keep_days: int = 0, dry_run: bool = False):
125125
cutoff_date = datetime.now() - timedelta(days=keep_days)
126126
total_cleared = 0
127127

128-
for path in cache_dir_path.rglob('*'):
128+
for path in cache_dir_path.rglob("*"):
129129
if path.is_file() and os.path.getmtime(path) < cutoff_date.timestamp():
130130
file_size = path.stat().st_size
131131
if not dry_run:
@@ -154,6 +154,4 @@ def clear(keep_days: int = 0, dry_run: bool = False):
154154

155155

156156
if __name__ == "__main__":
157-
fire.Fire({
158-
'clear_cache': clear_cache
159-
})
157+
fire.Fire({"clear": clear})

scripts/postinstall.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""Consolidated post-install script for OpenAdapt."""
22

3+
import os
34
import subprocess
45
import sys
5-
import os
66

77

88
def install_detectron2() -> None:
@@ -40,6 +40,15 @@ def install_dashboard() -> None:
4040
print("Changed directory to:", os.getcwd())
4141

4242
if sys.platform.startswith("win"):
43+
try:
44+
subprocess.check_call(["nvm", "install", "21"])
45+
subprocess.check_call(["nvm", "use", "21"])
46+
except FileNotFoundError:
47+
if os.getenv("CI") == "true":
48+
print("nvm not found. Skipping installation.")
49+
else:
50+
print("nvm not found. Please install nvm.")
51+
sys.exit(1)
4352
subprocess.check_call(["powershell", "./entrypoint.ps1"])
4453
else:
4554
subprocess.check_call(["bash", "./entrypoint.sh"])

0 commit comments

Comments
 (0)