Skip to content

Instantly share code, notes, and snippets.

Hayden Flinner haydenflinner

Block or report user

Report or block haydenflinner

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View maketask.md

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
haydenflinner / doc.md
Created Sep 23, 2018
invoke-magic.md
View doc.md

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
haydenflinner / tasks.py
Created Sep 22, 2018
A pyinoke tasks.py that implements make-like file dependencies.
View tasks.py
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):
"""
You can’t perform that action at this time.