ci: Add CI and Release workflows and other test fixes (#7)
* ci: add caching and fix workflow failures - Add UV package caching to all workflows for faster dependency installation - Add pre-commit hook caching with OS-specific cache keys - Skip no-commit-to-branch hook in CI (fails on main branch) - Remove broken apt cache action (doesn't work with PPAs) - Simplify FreeCAD command detection (PPA installs to standard PATH) - Add FreeCAD Python version logging for debugging * ci: Add code Rabbit configuration file * ci: fix issues in CI workflows * ci: add uv.lock * ci: tweaks * ci: Fix errors and add UUID generation and checking * ci: Use the GitHub FreeCAD release latest stables * ci: skip macro test for now, due to headless mode * feat: Add a multi export macro * ci: Fix tests * ci: fix docker build workflow * ci: skip trufflehog in GitHub Actions due to wasm panic bug TruffleHog has a known wasm/go-re2 panic bug that causes failures in GitHub Actions environment. The hook still runs locally during development for secrets detection. - Add trufflehog to SKIP env var in pre-commit.yaml - Update trufflehog to v3.88.7 (latest) - Add reference to upstream issue #3321 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * test: use boolean holes instead of PartDesign::Hole in CI PartDesign::Hole has a CADKernelError bug in FreeCAD AppImage headless mode on Linux (used in GitHub Actions) where it fails with "Cannot make face from profile". The SmartCutter class already supports boolean holes as an alternative. Changes: - Modify SmartCutter.execute() to use boolean holes by default - Update all test assertions for Part::Feature output type - Update test docstrings and class descriptions - Remove PartDesign-specific checks (Group, Sketcher::SketchObject) - Update workflow comment explaining the CI limitation Boolean holes work reliably in both GUI and headless mode across all FreeCAD configurations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: clean up GitHub Actions workflows * ci: Dependabot improvements * ci: add CodeQL scanning workflow * ci: AI review suggested improvements * ci: add coderabbit updates for intentional decisions --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
8d1271995e
commit
cd77560297
+20
-2
@@ -1,10 +1,10 @@
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
requires = ["hatchling", "hatch-vcs"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "freecad-robust-mcp"
|
||||
version = "0.1.0"
|
||||
dynamic = ["version"]
|
||||
description = "MCP (Model Context Protocol) server for FreeCAD integration with Claude Code and other AI assistants"
|
||||
readme = "README.md"
|
||||
license = "MIT"
|
||||
@@ -89,6 +89,19 @@ Issues = "https://github.com/spkane/freecad-mcp/issues"
|
||||
Changelog = "https://github.com/spkane/freecad-mcp/blob/main/CHANGELOG.md"
|
||||
"Docker Hub" = "https://hub.docker.com/r/spkane/freecad-mcp"
|
||||
|
||||
[tool.hatch.version]
|
||||
source = "vcs"
|
||||
# Use git tags for versioning: v0.1.0 -> 0.1.0
|
||||
# For untagged commits: 0.1.0.dev5+g1a2b3c4
|
||||
|
||||
[tool.hatch.version.raw-options]
|
||||
# Fall back version when not in a git repo (e.g., source tarball)
|
||||
version_scheme = "guess-next-dev"
|
||||
local_scheme = "node-and-date"
|
||||
|
||||
[tool.hatch.build.hooks.vcs]
|
||||
version-file = "src/freecad_mcp/_version.py"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/freecad_mcp"]
|
||||
|
||||
@@ -145,6 +158,7 @@ convention = "google"
|
||||
"ANN", # Don't require annotations in tests
|
||||
"D", # Don't require docstrings in tests
|
||||
"PLR2004",# Allow magic numbers in tests
|
||||
"PTH", # Allow os.path in tests - matches embedded FreeCAD code style
|
||||
"SIM105", # Allow try-except-pass in tests
|
||||
"SIM117", # Allow nested with statements
|
||||
"B017", # Allow blind exception catch in tests
|
||||
@@ -158,9 +172,11 @@ convention = "google"
|
||||
"D107", # Missing docstring in __init__ - class docstring covers this
|
||||
"D203", # Blank line before class docstring (conflicts with D211)
|
||||
"D212", # Multi-line docstring start (conflicts with D213)
|
||||
"PLR0911",# Allow many return statements - GUI code paths vary
|
||||
"PLR0912",# Allow many branches - GUI code is complex
|
||||
"PLR0913",# Allow many arguments - CAD APIs have many params
|
||||
"PLR0915",# Allow many statements - macros are self-contained
|
||||
"PTH", # Allow os.path - better FreeCAD compatibility than pathlib
|
||||
"SIM102", # Allow nested if statements - improves readability
|
||||
"SIM103", # Allow return after if-else for clarity
|
||||
"SIM108", # Allow if-else over ternary for readability
|
||||
@@ -275,7 +291,9 @@ exclude_dirs = ["tests", "docs"]
|
||||
skips = [
|
||||
"B101", # Allow asserts
|
||||
"B102", # exec is required for FreeCAD Python execution
|
||||
"B104", # Binding to 0.0.0.0 is intentional for container/network access
|
||||
"B110", # try-except-pass used for optional cleanup
|
||||
"B112", # try-except-continue used for iterating over faces safely
|
||||
"B411", # XML-RPC is required for FreeCAD compatibility
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user