Skip to content

Commit

Permalink
finished part 1 of the tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
toumorokoshi committed Jan 17, 2015
1 parent 2d0b1de commit 860ee46
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 deletions.
33 changes: 33 additions & 0 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,41 @@ This tutorial is an introduction to the basic concepts around Uranium.

Let's start with a simple example: setting up a virtualenv and install an egg.

We'll use unix-based commands for the tutorial, but we will attempt to
describe the steps so these steps can be replicated on other operating
systems.

For the purpose of the tutorial, let's create a root directory:

.. code-block:: bash
$ mkdir -p /tmp/uranium-tut/ && cd /tmp/uranium-tut/
We first start by downloading the warmup. Warmup is a python script that handles the following:

* downloading and setting up a virtualenv
* installing the uranium script into the virtualenv
* running uranium for the first time.

You can get the warmup script here:

https://raw.githubusercontent.com/toumorokoshi/uranium/master/scripts/warmup

You should download a copy and add the script into the root directory:

.. code-block:: bash
$ curl -s https://raw.githubusercontent.com/toumorokoshi/uranium/master/scripts/warmup > warmup
$ chmod +x warmup # the script should be executable.
Now you need a uranium.yaml file. Let's make one now:

$ touch uranium.yaml

This is all you need to run warmup. Let's run them now:

$ ./warmup

And congrats, you've had your first Uranium run! Of course, all this
did was run virtualend and install Uranium. Now let's get some real
functionality done.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
]

setup(name='uranium',
version='0.0.23',
version='0.0.24',
description='a build system for python',
long_description='a build system for python',
author='Yusuke Tsutsumi',
Expand Down
2 changes: 1 addition & 1 deletion uranium/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


def load_config_from_string(string):
config_dict = yaml.load(string)
config_dict = yaml.load(string) or {}
return Config(config_dict)


Expand Down
8 changes: 8 additions & 0 deletions uranium/tests/config/test_load.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from uranium.config import load_config_from_string


class TestConfigLoad(object):

def test_load_empty_string(self):
""" make sure that loading an empty string works """
load_config_from_string("")

0 comments on commit 860ee46

Please sign in to comment.