Skip to main content

A source code mutation/transformation framework

Project description

logo-title-banner

HELIX

code-style-image documentation-image latest-version-image python-versions-image license-image

A source code mutation/transformation framework.

Description

HELIX defines three major primitives:

Blueprints

Core project layouts including templated boilerplate and methods for generating and building artifacts from a set of Components and Transforms.

Components

Small, configurable pieces of source code that represent a specific implementation of a specific functionality along with associated metadata.

Transforms

Modifications of either source code or a built artifact along with associated metadata.

Blueprints are configured with a collection of Components to include and Transforms to apply and then built to generate build artifacts.

Installation

Install HELIX from PyPI with pip, run:

pip install helix

Dependencies

Some Blueprints, Components, and Transforms include additional, non-python dependencies that must be installed separately. These can be installed automatically (if supported) with the install command. For example, to install dependencies for the upx Transform, run:

helix install transforms upx

To install all dependencies for all installed Blueprints, Components, and Transforms, run:

helix install

Note: some Blueprints, Components, and Transforms include dependencies which must be manually installed. Using the install command for these will instead list the dependencies that must be installed manually.

Usage

To list currently installed parts of HELIX:

helix list

To generate a single build, use the build command. For example, to generate a build using the cmake-cpp blueprint, with the configuration-example component (setting the second_word parameter to foo), and apply the strip transform (on supported platforms), writing output files to ./example:

helix build blueprint cmake-cpp ./example \
    -c configuration-example:second_word=foo \
    -t strip

The build command also supports loading a configuration from a JSON file and HELIX is fairly scriptable. See the examples/ directory or take a look at the full documentation for more.

Contributing

HELIX is designed to be easily extensible via entry points. Blueprints, Components, and Transforms simply need to conform to their respective abstract base classes and be exposed under their respective entry point (see the Getting Started section of the documentation for more details and a tutorial). External Blueprints, Components, and Transforms that are correctly exposed are usable in all normal HELIX commands.

Development

To set up a development environment, first clone this repo. Next, it is useful to install HELIX in editable mode with extras for development and testing:

pip install -e .[development,testing]

When developing new components it can be helpful to use HELIX's build command in verbose mode so that you can see compiler and linker output and correct any errors you may encounter:

helix build blueprint cmake-cpp novel-component -c novel-component -v

Documentation

To build the full HELIX documentation, after installing HELIX with development extras enabled, from the docs/ directory, run:

make html

Or other supported Sphinx output formats.

Testing

You can expose tests for your Components and Transforms by adding a subclass of helix.tests.UnitTestCase to the entrypoint helix.tests. Some useful testing mixins are provided in helix/tests.py and for some examples see the tests referenced in setup.py.

To test the HELIX interfaces and utilities, run:

helix test system

To test Components, Blueprints, and Transforms, run:

helix test unit

Disclaimer

DISTRIBUTION STATEMENT A. Approved for public release: distribution unlimited.

© 2021 Massachusetts Institute of Technology

  • Subject to FAR 52.227-11 – Patent Rights – Ownership by the Contractor (May 2014)
  • SPDX-License-Identifier: MIT

This material is based upon work supported by the Department of Defense under Air Force Contract No. FA8721-05-C-0002 and/or FA8702-15-D-0001. Any opinions, findings, conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the Department of Defense.

MIT License

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

helix-1.2.0.tar.gz (43.8 kB view details)

Uploaded Source

Built Distribution

helix-1.2.0-py3-none-any.whl (66.5 kB view details)

Uploaded Python 3

File details

Details for the file helix-1.2.0.tar.gz.

File metadata

  • Download URL: helix-1.2.0.tar.gz
  • Upload date:
  • Size: 43.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for helix-1.2.0.tar.gz
Algorithm Hash digest
SHA256 2bf30e303b6d4187e7201c16d8c5164ce968777c6330f694ac3b0c1c14cb0f93
MD5 72d85191f8dc255d2c8e1d5bf9092b46
BLAKE2b-256 d089cf4f3c311c3d1ea49c1c42c8eacec83333e9f6df1b34b9e9848027e059f7

See more details on using hashes here.

File details

Details for the file helix-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: helix-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 66.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for helix-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9715b6e3a1751d692fd2e2d1ec06fb8652d87ebb743e4d99b4c72018998d76d2
MD5 f25bc2911364f7ce4c39a912a00081c9
BLAKE2b-256 ee1e08d075d13416807a8eeb59025a8e2e7c685028085660a6bc1d4aa8bc603f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page