Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Gear toolkit CLI

Usage

WARNING: The Gear-CLI is actively being developed and is in alpha version. Parts of it may be broken. Please use cautiously. If you notice a broken part, please either create an issue on this repo or email support@flywheel.io "ATTN: Nate Richman" (CODEOWNER, primary developer)

Installation

The gear-cli is currently in alpha version, it can be installed via pip install --pre flywheel-gear-cli

Gear commands

  • gear_cli gear build: Build a gear image. Basically a wrapper for docker build which pulls necessary values from the manifest in the specified directory.
  • gear_cli gear config: Create/modify gear config.json for running a gear locally.
  • gear_cli gear run: Run a gear locally, replaces fw gear run, uses the config.json generated by gear_cli gear config.
  • gear_cli gear update-env: Update environment from Docker container into manifest.json.
  • gear_cli gear upload: Upload a gear to one or more Flywheel sites.

Job commands

  • geartk job pull: Pull job configuration, assets and build a run script for local testing.

Directory structure

Importing of commands happens in the python-cli commands/init.py Each command in the geartk cli will live in a separate file named [command_group]_[command].py, within its command group directory

flywheel_gear_cli
├── job
│   └── job_pull.py
└── gear
    ├── gear_upload.py
    ├── gear_build.py
    ...
    └── gear_run.py

Within each file [command_group]_[command].py, there needs to be an add_command() function exposed such as the following:

def add_command(subparsers, parents):
    parser = subparsers.add_parser(
        "[command]",parents=parents,help=[help]
    )
    parser.add_argument(...)
    ...
    other arguments
    ...

    parser.set_defaults(func=[command])
    parser.set_defaults(parser=parser)
    return parser

def [command](args):
    pass

The previous function signatures can be used as a template.

Testing

Within the testing folder, for each command there will be unit and integration tests, for example for gear_build.py, the directory will be structured as follows:

tests
| ...
└── cli
    ├── unit_tests
    |   | ...
    |   └── gear_upload.py
    └── integration_tests
        | ...
        └── gear_upload.py

Metadata

Release files for flywheel-gear-cli 0.1.0a5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for flywheel-gear-cli 0.1.0a5
File Interpreter ABI Platform
flywheel_gear_cli-0.1.0a5-py3-none-any.whl Python 3 none any Details

Release files / flywheel_gear_cli-0.1.0a5-py3-none-any.whl

Download URL flywheel_gear_cli-0.1.0a5-py3-none-any.whl
Size 25.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d444c1a4ea7b86baf0113be2e359bc274e6fc098e57c8f100569d3574a2b997
BLAKE2b-256 checksum
How to use checksums
b7c740d480cf4b699f6b9091b29a1c80b7c605e41b615558ecf2d6cb332f5545
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.7 CPython/3.9.6 Linux/4.19.78-coreos

Release history Release notifications | RSS feed

This release

0.1.0a5 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page