GithubHelp home page GithubHelp logo

pombredanne / bulbs2-editorial-workflow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from theonion/bulbs2-editorial-workflow

0.0 2.0 0.0 96 KB

do not pass go; do not collect $200

License: MIT License

Python 100.00%

bulbs2-editorial-workflow's Introduction

bulbs2-editorial-workflow Build Status

do not pass go; do not collect $200

bulbs2-editorial-workflow is a companion app to bulbs2 that enforces a specific publishing workflow. The workflow is as follows:

  1. new content is in state draft
  2. draft content can be sent to the editors, moving it to waiting for editor
  3. waiting for editor content can move to: (a) approved for publication status, or (b) be sent back to the author and back to draft status

This is handled through a Finite State Machine. However, approving content for publication does not automatically assign a publication date: that needs to be done separately by the implementation. It also does not contain any logic for notification.

Unlike the base bulbs2, this is opinionated: hence why is is not in the main package. This is specifically what I meant when I said prescriptive code should be refactored to its own repo.

A great example of how this is useful is the distinction of workflow between Onion Studios and The Onion. Both have content that needs to be published (so they would rely on the base bulbs2 dependency), but Onion Studios does not need to have an enforced editorial-approval workflow while The Onion does. So, The Onion would add this as a dependency and Onion Studios would not. Their base content would still have the same mixins, but The Onion would add this to control its approval process.

Getting the Code

You can clone the code via git:

$ git clone https://github.com/theonion/bulbs2-editorial-workflow.git

Alternatively, if you just want to use it in a Django application, you can install it via pip:

$ pip install -e git+https://github.com/theonion/bulbs2-editorial-workflow.git#egg=bulbs2-editorial-workflow

Note: since this is a far-afield project that may or may not be brought to production, I am refraining from adding it to the PyPI index.

Testing the Code

To run the tests, clone the repository from GitHub (see steps above). You should then create a virtual environment with Python 3 and install the project to that:

$ cd /path/to/virtualenvs
$ virtualenv -p python3 bulbs2-editorial-workflow
$ source bulbs2/bin/activate
$ cd /path/to/bulbs2-editorial-workflow
$ python setup.py install
$ pip install -r requirements-dev.txt
$ py.test tests

If you don't have Python 3 on your system, you can brew install it:

$ brew install python3
$ brew linkapps

If you don't have virtualenv on you system, you can pip install that:

$ pip install virtualenv

If you don't have brew installed, you can get that via:

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

If you don't have pip, install Python 2 and Python 3 via brew:

$ brew install python2 python3
$ brew linkapps

bulbs2-editorial-workflow's People

Watchers

James Cloos 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.