Git Product home page Git Product logo

pun's Introduction

Pun

Documentation Status

Pun mini task to build, deploy or anything you like in your project

In development

Features

  • Run task (of course).
  • Run multiple tasks at once
  • Run a required task when a task need to run other task
  • load a fixture (like in pytest)

Usage

You need a punfile.py to run a task.

To create a sample punfile.py run:

$ pun init

After [ success ] init, you get you sample punfile.py in your current directory:

import pun


DEFAULT = 'default'


@pun.task()
def default():
    """
    Run default action.
    """

    text = "This is a sample punfile (you can edit)"

    pun.run('echo', text)

A task is a function decorated with @pun.task().

To run this default task, type:

$ pun default
$ # or just
$ pun

We can omit task name (default) because we set DEFAULT = 'default'.

DEFAULT is a variable to handle a default task name to run if we don't provide a task name in console.

As you can see pun.run() function run passed arguments in a shell, the first argument can be a callable and all arguments after it are passed to that callable.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

pun's People

Contributors

unviray avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.