Skip to content

Commit

Permalink
Merge branch 'main' into share-magic-wormhole
Browse files Browse the repository at this point in the history
  • Loading branch information
Mustaballer authored Jul 25, 2023
2 parents 76f14b0 + 8c43796 commit ada2aad
Show file tree
Hide file tree
Showing 62 changed files with 4,112 additions and 2,072 deletions.
5 changes: 5 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[flake8]
exclude=alembic/versions,.venv, openadapt/strategies/__init__.py
docstring-convention=google
max-line-length = 88
extend-ignore = ANN101
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_form.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ body:
label: To Reproduce
description: What Operating System did you use and steps would we take to reproduce the behaviour?
placeholder: "I use [macOS/Microsoft Windows].
Steps:
1. Go to '...'
2. Click on '....'
Steps:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....' "
validations:
required: true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
blank_issues_enabled: true
blank_issues_enabled: true
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/use_case.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ body:
attributes:
label: Workflow
description: How is the task accomplished? Please place each step on a new line.
placeholder: |
placeholder: |
1. Open Chrome
2. Navigate to Google Flights
3. Set the departure city
4. ...
validations:
required: true
required: true
51 changes: 33 additions & 18 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ on:

jobs:
run-ci:
runs-on: windows-latest
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash

strategy:
matrix:
# TODO: add windows matrix
os: [macos-latest]

steps:
- name: Checkout code
Expand All @@ -18,25 +26,32 @@ jobs:
with:
python-version: '3.10'

- name: Install dependencies
run: |
pip install wheel
pip install -r requirements.txt
pip install -e .
- name: Run tests using the shell script (macOS compatible).
if: matrix.os == 'macos-latest'
run: SKIP_POETRY_SHELL=1 sh install/install_openadapt.sh

- name: Check formatting with Black
run: |
black --check --exclude "(src|alembic)/" .
- name: Checkout code
uses: actions/checkout@v3

- name: Run headless tests
uses: coactions/setup-xvfb@v1
- name: Install poetry
uses: snok/install-poetry@v1
with:
run: python -m pytest
working-directory: ./ # Optional: Specify the working directory if needed
options: # Optional: Add any additional options or arguments for pytest
version: 1.5.1
virtualenvs-create: true
virtualenvs-in-project: true

- name: flake8 Lint
uses: py-actions/flake8@v2
- name: Cache deps
id: cache-deps
uses: actions/cache@v2
with:
plugins: "flake8-docstrings"
extra-args: "--docstring-convention=google --exclude=alembic/versions"
path: .venv
key: pydeps-${{ hashFiles('**/poetry.lock') }}

- run: poetry install --no-interaction --no-root
if: steps.cache-deps.outputs.cache-hit != 'true'

- name: Check formatting with Black
run: poetry run black --check .

- name: Run Flake8
run: poetry run flake8
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ repos:
rev: 23.7.0
hooks:
- id: black
args: [--preview]
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
args: ["--profile", "black"]
263 changes: 263 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,269 @@



## v0.5.8 (2023-07-25)

### Fix

* fix(install): improve powershell script (Issue #372) (#409)

* fix: git reinstallation even if it si present

* fix: Error Message:

Remove-Item : Cannot remove the item at 'C:\Users\Krish Patel\hi' because it is in
use.
At line:1 char:9
+ Remove-Item -LiteralPath $setupdir -Force -Recurse
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Remove-Item], PSInvalidOperation
Exception
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.RemoveIt
emCommand

* fix: issue that poetry shell gives
"..runnning scripts is disabled on the command line"

* fix: bug #4 issue
to support multiple version of python (acc. to OpenAdapt standards)

* add start mesage to know
why sometimes the installtion command exits

* fix the edge case where the new terminal PWD
is not set to the OpenAdapt folder that was installed

* Update install/install_openadapt.ps1

---------

Co-authored-by: Richard Abrich <[email protected]> ([`fb3ae1e`](https://github.com/OpenAdaptAI/OpenAdapt/commit/fb3ae1e4b4991776f9c89791636e20c9c7a689a5))


## v0.5.7 (2023-07-25)

### Chore

* chore: format changes with black, and google python docstring, install script testing (#289)

* ran black

* use poetry for install

* Add caching to main.yml for faster github action checks

* Add missing job to main.yml

* try ubuntu latest instead

* change readme type to string instead of array in pyproject.toml

* Update poetry version in main.yml

* try macos

* commented out tests

* see if black command works

* see if black command runs properly

* use black github action

* fix parsing

* use supported black github action

* ignore venv as well

* change args for flake8 action

* try flake8 exclude

* manually add and use flake8

* change docstring keyword

* Chain commands for installing flake8

* exclude .venv

* merged latest changes and add download instruction

* remove import comment

* try python command with ubuntu

* add tesseract-ocr

* add homebrew option

* add cache for tesseract

* add ntlk command with poetry

* ran black

* Add .flake8 and add flake8 to poetry

* Add max length to flake8, add windows job with new install script, and address linting errors

* add some ignore errors in flake8

* Adress more flake8 lint errors

* Change max line length

* ran black

* resolve new changes and ran black

* remove "import nltk; nltk.download('punkt')" command

* resolve lint errors in record.py

* remove unnecessary commas

* Address D415, sentence/comma missing on first line error

* Resolve F403

* Address D200, single line doctstrings

* Addressed E731, F841, D205 errors

* resolve F401, unused imports

* Address return type annotations

* Add type annotations for function arguments

* ran black

* Address 'Multi-line docstring summaries should start at the first line'

* Revert main.yml to test if all checks pass

* fix syntax issue in main.yml

* Use cache for install poetry dependencies

* Revert main.yml and convert black action to oneliner with poetry

* Address lint errors for newly merged changes

* Try caching tesseract install

* test if tesseract is cached

* try cache brew package

* try cache brew again

* Remove failing tesseract cache

* Address lint errors from recent merge

* replace test command

* address comments on annotations and ran black

* change todo

* Shorten word line max length to 88 for comments

* try executing script

* keep windows runner as todo

* comment poetry shell in install_opendapt.sh

* add error flag in mac install script to avoid poetry shell in github actions

* try to see if this will pass

* update main.yml

* Address incorrect function annotations in record.py

* Address annotation errors in _windows.py

* Addressed more general annotations

* Address incomplete annotations in util.py

* run isort and other precommit hooks with custom black config on all files

* Update openadapt/crud.py

* replaced more 'Any' type annotations

* resolve lint errors from recent merge

* ran black

* resolve circular imports, and address Any annotations

---------

Co-authored-by: Aaron <[email protected]>
Co-authored-by: Richard Abrich <[email protected]> ([`c815924`](https://github.com/OpenAdaptAI/OpenAdapt/commit/c81592425b4efefdb48b818508f7debfc3ac95c3))

### Fix

* fix: issues after latest merge (#424)

* merge

* hotfix

* fix: resolve annotation errors and restore incorrectly removed code in lint PR

* fix

* Update models.py

* run black

* Update openadapt/models.py

---------

Co-authored-by: Mustafa Abdulrahman <[email protected]>
Co-authored-by: Richard Abrich <[email protected]> ([`2d4e8c6`](https://github.com/OpenAdaptAI/OpenAdapt/commit/2d4e8c6fee245bfdc4726f113b27367a36ae96c7))


## v0.5.6 (2023-07-20)

### Chore

* chore: add preview option to black pre-commit hook and update README (#405) ([`6a42eb7`](https://github.com/OpenAdaptAI/OpenAdapt/commit/6a42eb762b39b70313ecbe5014377c376ccc26e9))

* chore: configure isort with black profile and add black precommit hook (#384)

* chore: configure isort with black profile and add black precommit hook

* update black version

* add advanced isort settings to match CONTRIBUTING.md ([`2e7496b`](https://github.com/OpenAdaptAI/OpenAdapt/commit/2e7496b64445de965d6274e83987edb83f73772e))

### Documentation

* docs: replace MLDSAI with OpenAdaptAI in README.md (#402) ([`750cf1d`](https://github.com/OpenAdaptAI/OpenAdapt/commit/750cf1d327bf22453da1d2f0cc1505bbc52765f4))

* docs: update README (installation table) (#398) ([`1212198`](https://github.com/OpenAdaptAI/OpenAdapt/commit/121219866942df82ab8624e4580b254ca5b9c2b0))

* docs: update readme (take transpose of installation table) (#397) ([`fe39c73`](https://github.com/OpenAdaptAI/OpenAdapt/commit/fe39c73999b7221524442a11e0814b02faca78ce))

* docs: Update README.md (#390) ([`8745969`](https://github.com/OpenAdaptAI/OpenAdapt/commit/8745969ec9481348932146a46e91153f333c948d))

### Fix

* fix(merge_consecutive_keyboard_events): Fix reference before assignment (#411)

Co-authored-by: Seyed Morteza Hosseini <[email protected]> ([`e136b28`](https://github.com/OpenAdaptAI/OpenAdapt/commit/e136b28731d09745a23adb11cc5309ec86b7fdd9))


## v0.5.5 (2023-07-17)

### Fix
Expand Down
Loading

0 comments on commit ada2aad

Please sign in to comment.