fix: resolve failing test, 50 ruff lint errors, and missing pytest-cov dependency#159
Open
badgers4018 wants to merge 1 commit intotirth8205:mainfrom
Open
fix: resolve failing test, 50 ruff lint errors, and missing pytest-cov dependency#159badgers4018 wants to merge 1 commit intotirth8205:mainfrom
badgers4018 wants to merge 1 commit intotirth8205:mainfrom
Conversation
1. Fix test_imports_from_cells: The sample_notebook.ipynb fixture was missing import statements (os, pathlib, math) that the test expected. Added imports to cells 1 and 2 of the fixture. 2. Fix 50 ruff lint errors: Auto-fixed 12 errors (import sorting, unused imports in test files). Configured per-file-ignores and exclusions for the remaining errors in diagram DSL scripts (intentionally compact style), Databricks notebook fixtures (SQL/R/Scala syntax), and test fixture files. 3. Add pytest-cov to dev dependencies: Required for coverage reporting but was not declared in pyproject.toml optional dependencies. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Failing test fix (
test_imports_from_cells): Thesample_notebook.ipynbfixture was missing import statements (os,pathlib,math) that the test expected to find asIMPORTS_FROMedges. Addedimport osandfrom pathlib import Pathto cell 1 (alongside existing magic lines) andimport mathto cell 2, preserving all existing cell index assertions.Ruff lint errors (50 total): Auto-fixed 12 errors (import sorting in
test_tools.py, unusedshutilimport, trailing newline in fixture). Configured proper exclusions and per-file-ignores for the remaining 38 errors:diagrams/directory — DSL scripts use intentionally compact, non-standard style (semicolons, single-letter function names, long lines)sample_databricks_notebook.ipynb— SQL/R/Scala cells produce syntax errors when parsed as Pythonsample_databricks_export.py(unused variable, trailing newline in fixture)sample_notebook.ipynb(intentionally unused imports, cross-cell import blocks)test_multilang.py(long assertion lines with explanatory comments)Missing dependency: Added
pytest-covto the[project.optional-dependencies] devgroup, required for--covcoverage reporting.Test plan
pytest— 620 passed, 2 xpassed)ruff check .reports zero errorstest_imports_from_cellsspecifically passes with correct import targetstest_cell_index_trackingstill passes (cell indices unchanged)test_skips_magic_commandsstill passes (magic line filtering unaffected)🤖 Generated with Claude Code