Skip to content

Commit c1efbec

Browse files
abrichrclaude
andauthored
refactor: Convert to meta-package architecture (#960)
* refactor: Convert to meta-package architecture - Move all legacy code to legacy/ directory - Create new openadapt/ as meta-package with lazy imports - Add unified CLI (openadapt capture/train/eval/serve) - Remove openadapt-ml submodule (now a PyPI dependency) - Configure hatchling build with optional extras: - pip install openadapt[capture] for GUI capture - pip install openadapt[ml] for ML models - pip install openadapt[privacy] for PII scrubbing - pip install openadapt[all] for everything - Update .gitignore to exclude secrets and temp files Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: fix workflow and lint issues for meta-package - Update GitHub Actions workflow to use pip install instead of Poetry - Replace shell script with modern pip + ruff workflow - Add ubuntu-latest and Python 3.11/3.12 to CI matrix - Fix ruff linting issues (unused imports, formatting, spacing) - Sort imports alphabetically with noqa comments Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9435353 commit c1efbec

256 files changed

Lines changed: 758 additions & 200 deletions

File tree

Some content is hidden

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

.github/workflows/main.yml

Lines changed: 20 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -14,53 +14,29 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
# TODO: add windows matrix
18-
os: [macos-latest]
19-
20-
env:
21-
REPO: ${{ github.event.pull_request.head.repo.full_name }}
22-
BRANCH: ${{ github.event.pull_request.head.ref }}
23-
SKIP_POETRY_SHELL: 1
17+
os: [macos-latest, ubuntu-latest]
18+
python-version: ['3.10', '3.11', '3.12']
2419

2520
steps:
2621
- name: Checkout code
27-
uses: actions/checkout@v3
28-
with:
29-
ref: ${{ env.BRANCH }}
30-
repository: ${{ env.REPO }}
22+
uses: actions/checkout@v4
3123

32-
- name: Set up Python
24+
- name: Set up Python ${{ matrix.python-version }}
3325
uses: actions/setup-python@v5
3426
with:
35-
python-version: '3.10'
36-
37-
- name: Run tests using the shell script (macOS compatible).
38-
if: matrix.os == 'macos-latest'
39-
run: sh install/install_openadapt.sh
40-
41-
- name: Install poetry
42-
uses: snok/install-poetry@v1
43-
with:
44-
version: 1.5.1
45-
virtualenvs-create: true
46-
virtualenvs-in-project: true
47-
48-
- name: Cache deps
49-
id: cache-deps
50-
uses: actions/cache@v4
51-
with:
52-
path: .venv
53-
key: pydeps-${{ hashFiles('**/poetry.lock') }}
54-
55-
- run: poetry install --no-interaction --no-root
56-
if: steps.cache-deps.outputs.cache-hit != 'true'
57-
58-
- name: Activate virtualenv
59-
run: source .venv/bin/activate
60-
if: steps.cache-deps.outputs.cache-hit == 'true'
61-
62-
- name: Check formatting with Black
63-
run: poetry run black --preview --check . --exclude '/(alembic|\.cache|\.venv|venv|contrib|__pycache__)/'
64-
65-
- name: Run Flake8
66-
run: poetry run flake8 --exclude=alembic,.venv,venv,contrib,.cache,.git
27+
python-version: ${{ matrix.python-version }}
28+
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install -e ".[dev]"
33+
34+
- name: Lint with ruff
35+
run: |
36+
ruff check openadapt/
37+
ruff format --check openadapt/
38+
39+
- name: Verify package imports
40+
run: |
41+
python -c "from openadapt.cli import main; print('CLI import OK')"
42+
python -c "from openadapt.version import __version__; print(f'Version: {__version__}')"

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,18 @@ build/
4141

4242
OpenAdapt.spec
4343
build_scripts/OpenAdapt.iss
44+
45+
# Temporary files
46+
install.sh
47+
*.txt
48+
output.png
49+
50+
# Legacy untracked directories (not part of repo)
51+
omnimcp/
52+
omnimcp.bak/
53+
performance/
54+
55+
# Secrets (should never be committed)
56+
*.pem
57+
.env.backup
58+
deploy/.env

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.
File renamed without changes.

0 commit comments

Comments
 (0)