Tags: deepnote/deepnote-toolkit
Tags
fix(installer): Prioritize system site packages over server-libs (#38) * fix(installer): prioritize user-installed packages over server-libs Change sys.path.insert(0, ...) to sys.path.append(...) for server site-packages so user-installed packages in system site-packages take precedence over bundled server-libs packages. Previously, server-libs were inserted at the front of sys.path, causing bundled versions to override user-installed versions (e.g., streamlit). * fix(installer): prioritize user-installed packages over server-libs Change sys.path.insert(0, ...) to sys.path.append(...) for server site-packages so user-installed packages in system site-packages take precedence over bundled server-libs packages. Previously, server-libs were inserted at the front of sys.path, causing bundled versions to override user-installed versions (e.g., streamlit). * fix(installer): ensure system site-packages has priority over server-libs Add priority parameter to import_package_bundle that uses sys.path.insert(0) to place packages at the front of sys.path. System site-packages now uses this priority flag to ensure user-installed packages are found before bundled server-libs packages. * test(installer): add tests for import_package_bundle priority param Add unit tests for VirtualEnvironment.import_package_bundle covering: - Plain path appending to .pth file - Conditional import with env var check - Priority flag using sys.path.insert(0, ...) - Ordering of bundles matching __main__.py usage * refactor(installer): improve import_package_bundle and tests - Add guard to raise ValueError when both condition_env and priority are specified (mutually exclusive parameters) - Update docstring to document the mutual exclusivity constraint - Refactor tests to use pathlib.Path instead of os.path/os.makedirs - Add test for mutually exclusive parameter validation * style(installer): make priority param keyword-only Add bare * before priority parameter to enforce keyword-only usage, satisfying Ruff FBT rules for boolean parameters.
feat(duckdb): Bake in `spatial` and `excel` extensions (#36) * feat(duckdb): Bake in `spatial` and `excel` extensions * fix: Use `load_extension` directly * chore: Address code review suggestions * chore: Test cases where extension loading or importing fails * fix: NumPy boolean comparison to be flake8 compliant
fix: Escaping in SQL templates for `qmark` parameter style (#27) * fix: Escaping in SQL templates for `qmark` parameter style * fix: Align DuckDB with `qmark` fixes * chore: Clean up parameter style handling for DuckDB dialect * chore: Cover default DuckDB parameter style handling with test
fix: Trino SQL parameterization and add integration tests (#22) * fix: Trino SQL parameterization and add integration tests * chore: Improve test coverage * fix: Lint * chore: Improve test coverage
PreviousNext