GithubHelp home page GithubHelp logo

fablib's Introduction

FabLib is a suite of tools created to help with KnightLab software development and deployment. After we made it, we realized that there is already something on pypi with the same name, but we didn't really create it for general use anyway.

We're making the repository public mostly so that people who want to work on our javascript code can use it to build the javascript and CSS files the same way that we do.

Installing

KnightLab projects are written to assume that this directory is "alongside" directories (checked out git repositories) that use it. Gradually, we'll probably switch to using PIP SSH urls to make it available as an install, but for now, you may need to clone it accordingly.

If you're just using this because it's needed by StoryMapJS or another javascript project, you don't need to read further.

Setup

Add the AWS pem file to your ssh agent:

ssh-add <pemfile>

Set your AWS credentials in environment variables AWS_ACCESS_SECRET_KEY and AWS_SECRET_ACCESS_KEY, or in one of these boto config files (do not quote key strings in these files):

/etc/boto.cfg
~/.boto

Set a WORKON_HOME environment variable to the root directory of your local virtual environments. If you use virtualenvwrapper, this is already set for you. Else, set it manually.

It is assumed that all of your repositories are in a common directory and that you have checked out the secrets repository into that standard location.

Usage

Each project should contain a fabfile.py at the top level of the project repository. It should look like the following sample below. Typically, you would only need to make sure that env.django is set to the proper value of True or False depending on whether or not your project uses django.

Once you have created your project fabfile.py, you can run fab -l to see the available Fabric commands.

from os.path import abspath, basename, dirname, join
import sys
from fabric.api import env

#
# Project-specific settings, alter as needed
#
env.project_name = basename(dirname(__file__))
env.django = True

#
# Add paths
#
def add_paths(*args):
    """Make paths are in sys.path."""
    for p in args:
        if p not in sys.path:
            sys.path.append(p)

project_path = dirname(abspath(__file__))
repos_path = dirname(project_path)

add_paths(project_path, repos_path)

#
# Import from fablib
#
from fablib import *

fablib's People

Contributors

joegermuska avatar

Watchers

 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.