Skip to content

brettviren/moo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5f5c779 · Nov 2, 2020
Oct 28, 2020
Sep 24, 2020
May 24, 2020
Jun 12, 2020
Nov 2, 2020
May 2, 2020
May 5, 2020
May 2, 2020
Oct 21, 2020
Jun 16, 2020
May 2, 2020
Oct 28, 2020
Nov 2, 2020
Nov 2, 2020
Oct 27, 2020
Oct 27, 2020
Sep 30, 2020
May 2, 2020
Sep 11, 2020
Sep 11, 2020
Nov 2, 2020
Oct 23, 2020
Sep 11, 2020
Sep 11, 2020
Oct 26, 2020
Oct 26, 2020
Oct 28, 2020
Oct 28, 2020
Sep 24, 2020
Sep 18, 2020
Nov 2, 2020
Sep 11, 2020
Nov 2, 2020
Sep 24, 2020
Sep 11, 2020
May 28, 2020

Repository files navigation

moo 無 model oriented objects

Overview

moo is a tool for managing data structures. moo operates on:

schema
data structures describing the structure of data (including schema).
model
data structure matching schema to a template.
templates
marked up text in some target format which is parameterized by a model and from which a document (eg, C++ code file) may be generated.
codegen
generated artifacts

Version

The current moo version is

moo version
0.1.0

Installation

moo requires Python 3.5 or newer and python below is assumed to provide that.

moo installs in to your favorite Python environment in most of the usual ways. Some examples are given below. Due to a name conflict (this) moo is not expected to be distributed through PyPI.

Python environment

Here, python is assumed to be Python 3. Use whatever your favorite Python environment is to assure that. Some suggestions:

Python3 built in virtual environment

$ python3 -m venv venv
$ source venv/bin/activiate

Direnv

Install direnv and activate it in your shell, then:

$ echo "layout python3" > .envrc
$ direnv allow

See more at https://github.com/direnv/direnv

Install dependencies

To install the dependencies, you may use the latest requirements.txt file or one from a release.

$ python -m pip install -r https://raw.githubusercontent.com/brettviren/moo/master/requirements.txt

Install a release

$ python -m pip install https://github.com/brettviren/moo/archive/0.3.0.tar.gz

Install development

$ python -m pip install git+git://github.com/brettviren/moo.git#egg=moo

Or, to allow working on the code:

$ git clone git@github.com:brettviren/moo.git
$ cd moo
$ pyton -m pip install -e .

Quick start

The moo command line interface provides various commands and online help:

$ moo --help

See documentation section for details.

Documentation

Links

Etc

The name moo is a play on the Japanese term 無 which may be interpreted to English in a few ways. Some are listed below along with how the meaning reflects on aspects of moo.

Untainted pure mind
moo avoids being “opinionated”, is centered on ideas expressed as abstract data structures and so can be used for a wide variety of things from generating code, documents or package skeletons. moo forms its data structures by ingesting most of the popular file formats likely to be used. And, moo can produce any file format for which a user may create a template.
No strings attached
moo is not intended to be an invasive tool. moo artifacts can be generated as desired and moo may be left behind. moo does not lock-in particular formats. moo extends this freedom to your own applications. By adopting moo codegen philosophy an app need not lock-in itself to particular data formats, representations, or serializations technologies.
Nothingness
moo is not really anything itself but rather it is the bits that go between other real things which perform the “heavy lifting” (Jsonnet, anyconfig, Jinja, JSON Schema, user templates). moo lets apps embrace the power of this nothingness by switching developer effort away from repetitive programming tasks and toward data structure and template development and then through code generation that effort gains multiplicative power.