Skip to content

DAGWorks-Inc/hamilton-pre-commit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hamilton pre-commit hooks

This repository contains pre-commit hooks to improve the development experience with the open source dataflow library Hamilton.

Installation

Using pre-commit-hooks with pre-commit

Install pre-commit and add this to your .pre-commit-config.yaml

- repo: https://github.com/dagworks-inc/hamilton-pre-commit
  rev: v0.1.3  # use a ref >= 0.1.3
  hooks:
  - id: cli-command
    name: Hamilton CLI command
    args: [
      hamilton build my_module.py,  # commands to execute
      hamilton build my_module2.py,  # they are executed in order
      hamilton validate --context config.json my_module.py my_module2.py,  # exits on the first failure
    ]

You can specify hamilton CLI commands to execute in a list. The hook will execute them in order. It's most useful with hamilton build to check for valid Hamilton syntax and hamilton validate to verify a specific dataflow path. More thorough validation should be done using tests given pre-commits are meant to be lightweight.

Using the CLI manually

If you are interested in the command line tool, use pip install sf-hamilton[cli] and see the main Hamilton repository.

License

Distributed under the terms of the MIT license, hamilton-pre-commit is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages