Skip to content

Commit

Permalink
Merge pull request #483 from OpenAdaptAI/modify-install-script
Browse files Browse the repository at this point in the history
  • Loading branch information
Mustaballer authored Aug 30, 2023
2 parents 824377b + 73bfad4 commit 5fa12eb
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ jobs:
# TODO: add windows matrix
os: [macos-latest]

env:
REPO: ${{ github.event.pull_request.head.repo.full_name }}
BRANCH: ${{ github.event.pull_request.head.ref }}
SKIP_POETRY_SHELL: 1

steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -28,13 +33,13 @@ jobs:

- name: Run tests using the shell script (macOS compatible).
if: matrix.os == 'macos-latest'
run: SKIP_POETRY_SHELL=1 sh install/install_openadapt.sh
run: sh install/install_openadapt.sh

- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ env.BRANCH }}
repository: ${{ env.REPO }}

- name: Install poetry
uses: snok/install-poetry@v1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Join us on Slack](https://join.slack.com/t/mldsai/shared_invite/zt-1uf94nn7r-qcQnS~hinLPKftUapNzbuw)
[Join us on Slack](https://join.slack.com/t/mldsai/shared_invite/zt-1uf94nn7r-qcQnS~hinLPKftUapNzbuw)

# OpenAdapt: AI-First Process Automation with Transformers

Expand Down
2 changes: 1 addition & 1 deletion assets/fixtures.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

-- Insert sample recordings
INSERT INTO recording (timestamp, monitor_width, monitor_height, double_click_interval_seconds, double_click_distance_pixels, platform, task_description)
VALUES
VALUES
('2023-06-28 10:15:00', 1920, 1080, 0.5, 10, 'Windows', 'Task 1'),
('2023-06-29 14:30:00', 1366, 768, 0.3, 8, 'Mac', 'Task 2'),
('2023-06-30 09:45:00', 2560, 1440, 0.7, 12, 'Linux', 'Task 3');
10 changes: 8 additions & 2 deletions install/install_openadapt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ pythonCmd="python3.10"
pythonVerStr="Python 3.10*"
pythonInstallerLoc="https://www.python.org/ftp/python/3.10.11/python-3.10.11-macos11.pkg"

# Set default values when no parameters are provided
BRANCH=${BRANCH:-main}
REPO=${REPO:-https://github.com/MLDSAI/OpenAdapt.git}

REPO_URL="https://github.com/$REPO"

################################ HELPER FUNCTIONS ################################

# Remove OpenAdapt if it exists
Expand Down Expand Up @@ -121,9 +127,9 @@ fi
CheckPythonExists

[ -d "OpenAdapt" ] && mv OpenAdapt OpenAdapt-$(date +%Y-%m-%d_%H-%M-%S)
RunAndCheck "git clone https://github.com/MLDSAI/OpenAdapt.git" "Clone git repo"

RunAndCheck "git clone $REPO_URL" "Clone git repo"
cd OpenAdapt
RunAndCheck "git checkout $BRANCH" "Checkout branch $BRANCH"

RunAndCheck "pip3.10 install poetry" "Install Poetry"
RunAndCheck "poetry install" "Install Python dependencies"
Expand Down

0 comments on commit 5fa12eb

Please sign in to comment.