Skip to content

Fix quickstart dependency resolution and CLI test compatibility - #46

Closed
moonandlife wants to merge 7 commits into
RIDE-Lab:mainfrom
moonandlife:moonandlife/fix-quickstart-deps-and-cli-tests
Closed

Fix quickstart dependency resolution and CLI test compatibility#46
moonandlife wants to merge 7 commits into
RIDE-Lab:mainfrom
moonandlife:moonandlife/fix-quickstart-deps-and-cli-tests

Conversation

@moonandlife

@moonandlife moonandlife commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • update quickstart/setup dependency handling and pin alignment
  • fix Studio CLI integration test to avoid importing app from sage.cli.main
  • apply lint-driven datetime/enum modernizations for Python 3.11 target

Validation

  • pytest -q tests/integration/test_studio_cli.py
  • ruff check src/ tests/
  • ruff format --check src/ tests/

Jeffrey added 7 commits April 2, 2026 21:36
…e in CI

python-jose, passlib, aiofiles, configparser, markdown, pydantic-settings,
and structlog were in the [full] optional extras but are hard-imported by
services/auth_service.py at module level. This caused 7 collection errors
when running pytest with only [dev] installed (no [full]).

- Move those packages to core dependencies
- Keep only isage-sias in [full] (genuinely optional)
- Update both CI install steps to pip install -e '.[dev,full]'
…ject.toml changes

Ensures pip cache is cleared when dependencies change, preventing stale
cached packages from being used in CI runs.
Force fresh package downloads to ensure python-jose and other dependencies
are properly installed, bypassing pip's internal package cache.
The PYTHONPATH=src setting makes sage.studio source importable without pip,
but private SAGE packages (isage, isagellm, etc.) are not on public PyPI,
causing pip install -e '.[dev]' to fail silently. This means none of the
declared dependencies (including python-jose) ever get installed.

Fix:
- Allow pip install -e '.[dev]' to fail gracefully (|| true)
- Add explicit install step for all runtime deps needed by unit tests
  (python-jose, passlib, fastapi, pydantic, etc.)
Root cause: pip install -e '.[dev]' installs dev extras fine (pytest works)
but core deps with private packages (isage, isagellm) may not resolve on
public CI, so python-jose (in core) never gets installed.

Fix:
- Add python-jose, passlib, aiofiles, pydantic-settings, structlog directly
  to dev extras so they always install alongside pytest
- Add 'Verify key dependencies' step to fail fast with a clear message
  if any critical import is missing before tests run
Previous approach: pip install -e '.[dev]' silently fails when private
packages (isage-pypi-publisher, isage, isagellm etc.) are unavailable on
public PyPI. pip's dependency resolver aborts the entire extras install,
so python-jose never gets installed.

New approach:
1. Create requirements-ci.txt with ONLY public PyPI packages needed by tests
2. Install via 'python -m pip install -r requirements-ci.txt' as the FIRST
   step - this bypasses pyproject.toml and private package resolution entirely
3. Verify key imports immediately after to fail fast with a clear error
4. Try 'pip install -e .[dev]' as best-effort after (|| true)
@moonandlife moonandlife closed this Apr 3, 2026
@moonandlife
moonandlife deleted the moonandlife/fix-quickstart-deps-and-cli-tests branch April 3, 2026 04:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant