Metadata-Version: 2.1
Name: ymm
Version: 0.5.0
Summary: Composable Query Meta Language
Home-page: https://github.com/TheSwanFactory/ymm
Author: Ernest Prabhakar
Author-email: ernest.prabhakar@gmail.com
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/TheSwanFactory/ymm/issues
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: nbformat
Requires-Dist: pandas
Requires-Dist: pyspark
Requires-Dist: pytz
Requires-Dist: quilt3

# ymm
YAML Mimics Makefiles

YMM is one of the first examples of YAAPL: YAML as a Programming Language

YMM uses standard YAML files with a few special conventions to function as a task runner.
In addition to simply creating lists and dictionaries, YMM can execute commands (and thus return values) based on the 'contral character' at the beginning of a line.

## Data Structures

YMM files have a top-level dictionary, whose keys are called "actions."
Type `$ ymm <action>` to execute and return the results of that action, which can be a dictionary or a list.
Dictionaries will set the results of that action to the key, which can be accessed as a `{variable}` in future actions.

There are also two special actions:
* `init` which is always executed before any other action
* `default` which is executed if no action is specified

## Scope

Variables cascade via the following rules

1. Built-in Actions (see `src/ymm/builtin.yml`)
2. Environment variables (which are loaded at runtime)
3. init
4. prior actions
5. current action

## Control Characters

1. '.' run this YMM action
2. '+' execute this Python string (use '"""' for docstrings)
3. '$' run this in the shell
4. '^' pipe the prior result into this shell command
5. '~' pipe the prior result into this jquery path

## Motivation

Because I love YAML, and miss `rake`.
I tried PyPyr, which is brilliant but painfully verbose.
I was going to write a preprocessor, then realized it was simpler to just execute the commands myself.


