Skip to content
This repository has been archived by the owner on Mar 1, 2018. It is now read-only.

Commit

Permalink
Merge branch 'master' into anaschwendler-new-format-documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
anaschwendler committed May 15, 2017
2 parents 5022df9 + 6e6f3dc commit 7a3661f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
.python-version
__pycache__/
htmlcov/

config.ini
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ For example, if you want to run `chamber_of_deputies` module, you should run thi
$ python rosie.py run chamber_of_deputies
```

The toolbox expects to find Amazon credentials in a `config.ini` file. If You get an error of missing `config.ini` you can just copy the `config.ini.example` to a `config.ini` and everything will run smoothly (don't bother about `AccessKey` and `SecretKey` unless you're planning to upload files to S3).

A `/tmp/serenata-data/irregularities.xz` file will be created. It's a compacted CSV with all the irregularities Rosie is able to find.

Also a target directory (where files are saved) can de passed 鈥斅爁or example:
Expand Down
5 changes: 5 additions & 0 deletions config.ini.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Amazon]
Bucket: serenata-de-amor-data
AccessKey: YOUR_ACCESS_KEY
Region: sa-east-1
SecretKey: YOUR_SECRET_KEY
4 changes: 3 additions & 1 deletion rosie.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ def test():
loader = unittest.TestLoader()
tests = loader.discover('rosie')
testRunner = unittest.runner.TextTestRunner()
testRunner.run(tests)
result = testRunner.run(tests)
if not result.wasSuccessful():
exit(1)


commands = {'run': run, 'test': test}
Expand Down
4 changes: 4 additions & 0 deletions setup
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env python3

import pip
from shutil import copyfile


copyfile('config.ini.example', 'config.ini')

pip.main(['install', '--upgrade', '-r', 'requirements.txt'])

0 comments on commit 7a3661f

Please sign in to comment.