Repository navigation
Commit d42c19a
authored
fix: lazy import integrations to avoid pyspark bundling error and add deep research (#1)
* fix: lazy import integrations to avoid pyspark bundling error
The CLI binary was failing with "No such file or directory:
error-conditions.json" because pyspark was being eagerly imported
when any integration was accessed.
Changes:
- Make integrations/__init__.py use lazy imports via __getattr__
- Update PyInstaller spec to use correct integration paths
- Remove library-only integrations (polars, duckdb, spark) from bundle
- Only bundle integrations with deploy capability (bigquery, snowflake)
* feat: add --output option to search and extract commands
* feat: add deep research command to CLI
Add `parallel-cli research` command group for running deep research tasks:
- `research run` - Create and run research tasks with polling
- `research status` - Check task status
- `research poll` - Resume polling existing tasks
- `research processors` - List available processor tiers
Also includes:
- New core/research.py module with research API functions
- Comprehensive tests with mocking (36 tests)
- Refactored shared polling logic to reduce duplication
- Added write_json_output() helper for consistent output handling
* fix: separate markdown content from JSON metadata in research output
* fix: update processor latencies to match documentation
* fix: use TextSchemaParam to get markdown output from deep research
* bump version and research updates
* json
* fix: add type assertions for pyrefly type checker
Add assertions after validation to narrow optional types to non-None,
fixing 10 pyrefly bad-argument-type errors in enrich_run and enrich_plan.
* fix: resolve pyrefly type checking errors
- Add explicit urllib.error import in auth.py
- Use SDK BetaRunInputParam type in batch.py and spark/streaming.py
- Add explicit type annotations to fix type inference issues
- Use row.asDict() for proper PySpark Row field access
- Add type narrowing assertion in test_cli.py
- Exclude non-core files from pyrefly (cloud_function, examples, notebooks, scripts)
- Add pyrefly pre-commit hook (local, uses uv run)1 parent 5e2e3cc commit d42c19a
16 files changed
Lines changed: 1192 additions & 81 deletions
File tree
- parallel_web_tools
- cli
- core
- integrations
- bigquery/cloud_function
- spark
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
57 | 51 | | |
58 | 52 | | |
59 | 53 | | |
| |||
65 | 59 | | |
66 | 60 | | |
67 | 61 | | |
68 | | - | |
69 | 62 | | |
70 | 63 | | |
71 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
0 commit comments