Skip to content

Instantly share code, notes, and snippets.


Hayden Flinner haydenflinner

  • NYC
View GitHub Profile

An invoke.task replacement that supports make-like file dependencies.

make_task works just like GNU-make: by checking the timestamps on the last update of each file that you depend on against the timestamp of the files you create, we can decide whether or not you need to run.

@param outputs: List of strings that will be used to index into your ctx to determine the filepath that you output to. Example:

haydenflinner /
Created Sep 23, 2018

This decorator is used to derive parameters to your function from the ctx argument to the function. This is best shown by example. Suppose this configuration:

    ctx = {
        "myfuncname" : {
            "param1" : 392,
            "namedparam1" : 199
haydenflinner /
Created Sep 22, 2018
A pyinoke that implements make-like file dependencies.
from invoke import task, Collection
import invoke
import functools, itertools
import structlog
import os
log = structlog.get_logger()
def create_timestamp_differ(file_outputs_query, file_inputs_query, precursor=None):