Skip to content

fix: resolve CI failures for lint, test mocking, and Docker build#19

Merged
GerdsenAI-Admin merged 11 commits into
mainfrom
test-docker
Dec 9, 2025
Merged

fix: resolve CI failures for lint, test mocking, and Docker build#19
GerdsenAI-Admin merged 11 commits into
mainfrom
test-docker

Conversation

@GerdsenAI-Admin

Copy link
Copy Markdown
Contributor

Summary

Fixes all three CI job failures: lint violations, test mock path errors, and Docker build issues.

Changes

Lint Fixes

  • Fixed line length violations (>88 chars) in da3_inference_optimized.py and depth_anything_3_node_optimized.py
  • Applied Black formatting to all Python files
  • Removed unused imports in test/test_inference.py

Test Fixes

  • Corrected mock paths from depth_anything_3_ros2.da3_inference.DepthAnything3 to depth_anything_3.api.DepthAnything3 (where the import actually occurs)
  • Added actual test logic to test_inference_invalid_input_type to use the imported class

Docker Fixes

  • Quoted pip package specifiers in Dockerfile to prevent shell from interpreting <2.0 as a file redirect
  • Changed pip install numpy>=1.24.0,<2.0 to pip install "numpy>=1.24.0,<2.0"

Developer Experience

  • Added .flake8 config for consistent 88-char line length locally
  • Added mypy.ini to suppress missing import errors for optional dependencies
  • Updated .vscode/settings.json with project-specific linting settings
  • Disabled cSpell and Mypy in VS Code workspace settings

Testing

All CI checks pass locally:

flake8 depth_anything_3_ros2/ --count --select=E9,F63,F7,F82  # 0 errors
flake8 depth_anything_3_ros2/ --count --max-line-length=88   # 0 errors
black --check depth_anything_3_ros2/                          # 7 files unchanged

- Add .flake8 with Black-compatible settings (line-length 88)
- Add mypy.ini with relaxed type checking for third-party imports
- Add pyproject.toml with black/pycodestyle configuration
- Update .gitignore to exclude .venv/ virtual environment
- Quote version specifiers in pip install commands to prevent
  shell interpretation issues with comparison operators
- Apply Black-compatible formatting (double quotes, trailing commas)
- Improve code readability with consistent line breaks
- No functional changes
- Apply Black-compatible formatting (double quotes, trailing commas)
- Improve code readability with consistent line breaks
- No functional changes
- Apply Black-compatible formatting (double quotes, trailing commas)
- Improve code readability with consistent line breaks
- No functional changes
- Remove unused Mock imports (F401)
- Fix line length issues (E501)
- Fix inline comment spacing (E261)
- Apply Black-compatible formatting (double quotes, trailing commas)
@GerdsenAI-Admin GerdsenAI-Admin merged commit 85ecc54 into main Dec 9, 2025
2 checks passed
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