Skip to content

GitHub Action to compile IronPython files into Grasshopper-Python (GhPy) plugin.

License

Notifications You must be signed in to change notification settings

thekaushikls/make-ghpy

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

make-ghpy

Github Action to create Grasshopper-Python .ghpy plugin.

Test Action Dispatch Action release) GitHub

  • Collects all python (.py) files recursively from the specified source folder.
  • Uses CLR to compile to a .ghpy (or .dll) binary.
  • Outputs
    1. name of the compiled binary (without file extension)
    2. full-name of the compiled binary.
    3. build of the compiled binary for downstream use.

🚀 Quick reference

- uses: thekaushikls/make-ghpy@v1.0.1
  with:
    source: src
    package-name: my_plugin
    version: 0.0.1
    type: ghpy
    ironpython: true

🎛️ Usage

See test_action.yml for example.

- uses: thekaushikls/make-ghpy@v1.0.1
  with:
  
    # Root folder for python source.
    source: ''
    
    # Name of the compiled binary / plugin.
    package-name: ''
    
    # Version tag to add with name. For example: v0.0.1
    # Can also add version from tag. For example, ${{ github.ref_name }}
    version: ''
    
    # (Optional) Specifies file type of the compiled binary. Can be 'ghpy' / 'dll'
    # Default: 'ghpy'
    type: ''
    
    # (Optional) If true, installs IronPython v2.7.12 internally.
    # Default: false
    ironpython: ""

🔥️ Motivation

The motivation comes from my previous script where I compile Grasshopper-Python .ghpy plugins outside Rhino. This GitHub Action's aim is to take things one step forward by making way for a "build-test-deploy" workflow.

Most folks in the AEC industry prefer python to start programming, and creating custom tools/components. This tool aims to help build and share those a tad bit easier.

📃 Resources

  1. Tutorial: creating a Grasshopper component with the Python GHPY compiler
  2. GitHub Gist: build_module.py

❌ Limitations

  1. Users cannot set files / file-patterns to be ignored while compiling.

🌱 License

The scripts and documentation in this project are released under the MIT License

About

GitHub Action to compile IronPython files into Grasshopper-Python (GhPy) plugin.

Resources

License

Stars

Watchers

Forks

Languages