Repository navigation
Add bhom-python Claude Code skill for writing, testing and reviewing Python - #265
Conversation
Draft (v0.2.0, for QA) Claude Code skill covering Python in Python_Toolkit: - SKILL.md: overview, golden rules, decision tree - SKILL-IMPLEMENTATION.md: package layout, packaging, style rules - SKILL-FRAMEWORK.md: bhom_callable + run_wrapped as the only C# route, BHoMObject/IObject and BHoM JSON, logging, analytics, pythonnet, known framework defects on develop - SKILL-TESTING.md: pytest standards, wrapped-method test patterns - SKILL-REVIEW.md: compliance rule catalogue and review report format - QA-NOTES.md: open decisions for reviewers (remove before release) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…defects - Console-logger-on-stdout defect now references the UV environment management update (#253), where the C# run method returns stdout and stderr separately, instead of an open question about moving to stderr. - Removed references to defects already fixed on develop. - Bumped SKILL-FRAMEWORK, SKILL-IMPLEMENTATION and CHANGELOG to 0.2.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… value Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Felix-Mallinder
left a comment
There was a problem hiding this comment.
we don't need the QA notes file to be merged
Felix-Mallinder
left a comment
There was a problem hiding this comment.
We should be authoring these filesBHoM
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- PY-F07/S22: no "error" in Python file or folder names (fails the BHoMBot installer check on dependent toolkits, #266) - PY-F03 tightened: file named after its single public class/function - PY-D05: docstring Args complete, in order, punctuated; Returns present - PY-B11: no custom_data in place of real properties - Mapping from BHoM CodeComplianceTest_Engine checks to Python rules - scripts/check_file_names.py and scripts/check_docstrings.py Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@BHoMBot check required |
|
@Felix-Mallinder to confirm, the following actions are now queued:
There are 1 requests in the queue ahead of you. |
SimosManiatis
left a comment
There was a problem hiding this comment.
I checked it against the repo: the counts it reports for develop (34 PY-F03, 9 PY-D05, 24 BOM files) match when I run the scripts, and the defects I spot-checked (except:, is_annual, Errors.extend, HOME) are real.
1.Links to skills not in the repo. bhom-coding-standards, bhom-copyright, bhom-develop, bhom-om, bhom-engine and bhom-debug are linked as ..//SKILL.md, but only bhom-python and bhom-branch-naming are in .claude/skills/. Could the key rules (British English, priority order) be inlined, or the skills be added?
2.check_docstrings.py: a description line starting with Word: (e.g. Note: ...) is read as a new entry, so the description before it gets flagged for missing punctuation. It also checks nested functions; is that intended?
3.SKILL-REVIEW.md proposed config: pyproject.toml already sets pytest pythonpath = "src"; the proposal should only add what's missing.
Nit: the branch-naming example uses #270, which is a real (unrelated) issue. Could you use #264?
Tom-Kingstone
left a comment
There was a problem hiding this comment.
Approved as all my changes have been resolved
Issues addressed by this PR
Closes #264
Adds a Claude Code skill in
.claude/skills/bhom-python/that guides how Python in Python_Toolkit is written, tested and reviewed:SKILL.md: overview, golden rules and decision treeSKILL-IMPLEMENTATION.md: package layout, packaging and style rulesSKILL-FRAMEWORK.md:bhom_wrapper.bhom_callable+run_wrappedas the route from C# into Python,BHoMObject/IObjectand BHoM JSON, logging,bhom_analyticsand pythonnetSKILL-TESTING.md: pytest standards, including tests for wrapped (C#-callable) methodsSKILL-REVIEW.md: compliance rule catalogue (PY-xxx) and review report formatAlso adds
.claude/skills/bhom-branch-naming/, a skill for naming branches<Project>-#<IssueNumber>-<PascalCaseDescription>.This PR is documentation only. No code changes.
Test files
None needed. The code examples and the C# ->
run_wrappedcontract described inSKILL-FRAMEWORK.mdwere checked againstdevelop(d9d1edd) in an installedPython_Toolkit/v3_10environment.To try it: open this repo in Claude Code and ask it to add a small helper plus a C#-callable wrapper with tests, or to review
bhom/decorators/_bhom_callable_decorator.py.Changelog
bhom-pythonClaude Code skill for writing, testing and reviewing Python in Python_Toolkit.Additional comments
Review decisions are applied in the skill text (see each skill's
CHANGELOG.md). Still open, tracked in #264: test location, the wrapped-method identifier convention, and lint/CI configuration.🤖 Generated with Claude Code