Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "rune inspect" subcommand for inspecting runes #183

Merged
merged 4 commits into from
May 28, 2021

Conversation

Michael-F-Bryan
Copy link
Contributor

Continuing from #166, this adds a rune inspect sine.rune sub-command that lets you find out more about a Rune, in particular the Capabilities it uses.

$ rune inspect person_detection.rune
Compiled by: rune v0.2.1 (c846a5b 2021-05-27)
Capabilities:
  image (Image)
    Outputs:
    - u8[1, 96, 96]
    Parameters:
    - height: Int(96)
    - width: Int(96)
    - pixel_format: String("@PixelFormat::GrayScale")

There is also a much richer JSON format you can use:

$ rune inspect person_detection.rune --format json
{
  "build_info": {
    "timestamp": "2021-05-27T22:21:29.802283431Z",
    "profile": "debug",
    "optimization_level": 0,
    "crate_info": {
      "name": "rune",
      "version": "0.2.1",
      "authors": [
        "Kartik Thakore <kartik@thakore.ai>",
        "Akshay Sharma <akshay@sharma.ai>",
        "Michael-F-Bryan <consulting@michaelfbryan.com>"
      ],
      "license": "Apache 2.0",
      "enabled_features": [],
      "available_features": [],
      "dependencies": []
    },
    "compiler": {
      "version": "1.54.0-nightly",
      "commit_id": "881c1ac408d93bb7adaa3a51dabab9266e82eee8",
      "commit_date": "2021-05-08",
      "channel": "Nightly",
      "host_triple": "x86_64-unknown-linux-gnu",
      "target_triple": "x86_64-unknown-linux-gnu"
    },
    "version_control": {
      "Git": {
        "commit_id": "c846a5b8d058296176a0bf8df043a4b8e19f374c",
        "commit_short_id": "c846a5b",
        "commit_timestamp": "2021-05-27T22:05:25Z",
        "dirty": true,
        "branch": "feature/inspect",
        "tags": []
      }
    }
  },
  "rune": {
    "capabilities": {
      "image": {
        "capability_type": "Image",
        "outputs": [
          {
            "type": "u8",
            "dimensions": [
              1,
              96,
              96
            ]
          }
        ],
        "parameters": {
          "width": 96,
          "pixel_format": "@PixelFormat::GrayScale",
          "height": 96
        }
      }
    }
  }
}

@Michael-F-Bryan Michael-F-Bryan changed the title Feature/inspect Add a "rune inspect" subcommand for inspecting runes May 27, 2021
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