Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
35cb16b
Add platform-specific configuration for Rhino 8 .NET runtime and impr…
ChiaChing-Yen Dec 19, 2025
46dd713
Refactor image handling and error management for cross-platform compa…
ChiaChing-Yen Dec 19, 2025
bc7149f
Add environment path handling to create_ghuser_component and include …
ChiaChing-Yen Dec 20, 2025
a205a97
Add Timber component with basic functionality and metadata
ChiaChing-Yen Dec 20, 2025
b4c7e7d
Add initial implementation of Timber component with setup and environ…
ChiaChing-Yen Dec 20, 2025
2502d44
Add env_path.txt to .gitignore for per-user configuration
ChiaChing-Yen Dec 20, 2025
c0353d6
Add README-Local.md with installation and setup instructions
ChiaChing-Yen Dec 20, 2025
0a6c761
Update search paths for Windows to include Grasshopper plugin directory
ChiaChing-Yen Dec 21, 2025
7d83542
Update README-Local.md to correct folder path for generated files
ChiaChing-Yen Dec 21, 2025
e69d16e
Fix: Add macOS ARM64 support for pythonnet 3.x with Rhino 8
fred1357944 Dec 21, 2025
7fbda4e
新增:YOLO UDP Receiver 組件與完整開發文檔
fred1357944 Dec 22, 2025
43750e3
新增:Swarm Dynamics 群體動力學組件
fred1357944 Dec 30, 2025
725f965
新增:Component Updater 版本管理系統
fred1357944 Dec 30, 2025
de797a3
文檔:完成所有增強功能文檔
fred1357944 Dec 30, 2025
6cdb586
重構:YOLO UDP Receiver 支援外部套件與 enable 參數
fred1357944 Dec 30, 2025
14f4f4e
新增:gh_yolo_udp 套件與 YOLO 發送端腳本
fred1357944 Dec 30, 2025
813f982
文檔:新增熱重載機制說明與 .gitignore 更新
fred1357944 Dec 30, 2025
4116bfa
優化:專案品質改進與 CI/CD 配置
fred1357944 Jan 6, 2026
0cf9ba4
文檔:新增 TODO.md 開發計劃與待辦事項
fred1357944 Jan 6, 2026
8820ecf
發布:v0.1.1 MVP 版本
fred1357944 Jan 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
## 概述

<!-- 簡短描述此 PR 的目的和主要變更 -->

## 變更類型

<!-- 勾選適用的選項 -->

- [ ] 🐛 Bug 修復(修復問題,不影響現有功能)
- [ ] ✨ 新功能(新增功能,不影響現有功能)
- [ ] 💥 重大變更(修復或功能變更,會影響現有功能)
- [ ] 📝 文檔更新(僅文檔變更)
- [ ] 🔧 配置變更(構建、CI/CD 等配置變更)
- [ ] ♻️ 重構(代碼結構變更,不影響功能)

## 變更內容

### 新增

<!-- 列出新增的功能、文件等 -->

-

### 修改

<!-- 列出修改的內容 -->

-

### 移除

<!-- 列出移除的內容 -->

-

## 測試計劃

<!-- 描述如何測試這些變更 -->

- [ ] 在 Grasshopper 中測試組件功能
- [ ] 執行 `gh_comp` 構建組件
- [ ] 驗證生成的 .ghuser 文件
- [ ] 檢查文檔連結和格式

## 影響範圍

<!-- 描述此 PR 影響的範圍 -->

**影響的組件**:
-

**影響的文件**:
-

## 檢查清單

<!-- 確認以下項目 -->

- [ ] 代碼遵循專案風格指南
- [ ] 已更新相關文檔
- [ ] 已更新 CHANGELOG.md(如適用)
- [ ] manifest.json 版本號已更新(如適用)
- [ ] 所有新增/修改的組件都有 README
- [ ] CI/CD 構建通過

## 相關 Issue

<!-- 如果有相關的 Issue,請連結 -->

Closes #

## 螢幕截圖(如適用)

<!-- 如果有 UI 變更,請附上螢幕截圖 -->

## 備註

<!-- 其他需要說明的事項 -->

---

🤖 Generated with [Claude Code](https://claude.com/claude-code)
188 changes: 148 additions & 40 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,178 @@
name: build
# .github/workflows/build.yml
# Build and validate Grasshopper components

on: [push]
name: Build Components

on:
push:
branches: [main, fix/*, feature/*]
paths:
- 'components/**'
- 'componentize_*.py'
- 'manifest.json'
- '.github/workflows/build.yml'
pull_request:
branches: [main]
paths:
- 'components/**'
- 'componentize_*.py'
- 'manifest.json'

jobs:
build_cpy_ghuser_components:
# Validate configuration files
validate:
name: Validate Configuration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Validate manifest.json
run: |
python -c "
import json
import sys

with open('manifest.json', 'r') as f:
manifest = json.load(f)

errors = []

# Check required fields
for field in ['name', 'version', 'components']:
if field not in manifest:
errors.append(f'Missing required field: {field}')

# Validate each component
for comp in manifest.get('components', []):
name = comp.get('name', 'Unknown')
for field in ['guid', 'version', 'description']:
if field not in comp:
errors.append(f'{name}: Missing {field}')

if errors:
print('Validation errors:')
for e in errors:
print(f' - {e}')
sys.exit(1)
else:
print('✓ manifest.json is valid!')
print(f' Found {len(manifest[\"components\"])} components')
"

- name: Validate component structure
run: |
python -c "
import os
import json
import sys

errors = []

for name in os.listdir('components'):
path = os.path.join('components', name)
if not os.path.isdir(path):
continue

for f in ['code.py', 'metadata.json', 'icon.png']:
if not os.path.exists(os.path.join(path, f)):
errors.append(f'{name}: Missing {f}')

metadata_path = os.path.join(path, 'metadata.json')
if os.path.exists(metadata_path):
try:
with open(metadata_path, 'r') as f:
metadata = json.load(f)
if 'name' not in metadata:
errors.append(f'{name}: metadata.json missing name')
except json.JSONDecodeError as e:
errors.append(f'{name}: Invalid JSON: {e}')

if errors:
print('Component validation errors:')
for e in errors:
print(f' - {e}')
sys.exit(1)
else:
print('✓ All components are valid!')
"

# Build CPython components (Rhino 8)
build-cpython:
name: Build CPython (Rhino 8)
runs-on: windows-latest
needs: validate
steps:
- uses: actions/checkout@v2
- uses: NuGet/setup-nuget@v1.0.5
- uses: actions/checkout@v4
- uses: NuGet/setup-nuget@v2

- name: Setup Python 3.9
uses: actions/setup-python@v5
with:
python-version: '3.9.10'

- name: Install CPython and pythonnet package
- name: Install pythonnet
run: |
choco install python --version=3.9.10
python -m pip install --upgrade pip
python -m pip install pythonnet==3.0.3

- name: Run
uses: ./
with:
source: examples/cpy
target: build
interpreter: cpython
- name: Build components
run: |
python componentize_cpy.py components dist --version "0.1.0"

- name: List generated components
run: dir dist\*.ghuser

- uses: actions/upload-artifact@v4
with:
name: cpy_ghuser-components
path: build
name: ghuser-components-cpython
path: dist/*.ghuser
retention-days: 30

build_ipy_ghuser_components:
# Build IronPython components (Rhino 7)
build-ironpython:
name: Build IronPython (Rhino 7)
runs-on: windows-latest
needs: validate
steps:
- uses: actions/checkout@v2
- uses: NuGet/setup-nuget@v1.0.5
- uses: actions/checkout@v4
- uses: NuGet/setup-nuget@v2

- name: Install IronPython
run: |
choco install ironpython --version=2.7.8.1
run: choco install ironpython --version=2.7.8.1

- name: Run
uses: ./
with:
source: examples/ipy
target: build
- name: Build example components
run: ipy componentize_ipy.py examples/ipy dist-ipy --version "0.1.0"

- uses: actions/upload-artifact@v4
with:
name: ipy_ghuser-components
path: build
name: ghuser-components-ironpython
path: dist-ipy/*.ghuser
retention-days: 30
if-no-files-found: ignore

build_ipy_v2_ghuser_components:
# Build IronPython v2 components (Rhino 8 IronPython mode)
build-ironpython-v2:
name: Build IronPython v2 (Rhino 8)
runs-on: windows-latest
needs: validate
steps:
- uses: actions/checkout@v2
- uses: NuGet/setup-nuget@v1.0.5
- uses: actions/checkout@v4
- uses: NuGet/setup-nuget@v2

- name: Install IronPython
run: |
choco install ironpython --version=2.7.8.1
run: choco install ironpython --version=2.7.8.1

- name: Run
uses: ./
with:
source: examples/ipy_v2
target: build
interpreter: ipy_v2
- name: Build example components
run: ipy componentize_ipy_v2.py examples/ipy_v2 dist-ipy-v2 --version "0.1.0"

- uses: actions/upload-artifact@v4
with:
name: ipy_v2_ghuser-components
path: build
name: ghuser-components-ironpython-v2
path: dist-ipy-v2/*.ghuser
retention-days: 30
if-no-files-found: ignore
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,13 @@ dmypy.json
.pyre/

# avoid temp folder
temp/
temp/

# per-user
env_path.txt

# Claude Code local settings
.claude/

# Gemini clipboard
.gemini-clipboard/
Loading