Skip to content

Instantly share code, notes, and snippets.

@rhelmer
rhelmer / contribs.py
Created April 10, 2012 00:36
contrib/collab
#!/usr/bin/python
"""
Show a graph of external contributions - that is, commits from usernames
not listed as "collaborators" on github.
Example: ./contribs.py --since=2011-01-31
Outputs:
JSON data suitable for graphing in flot
import shlex
import re
from cStringIO import StringIO
c1 = 'jobname|1d|4:30'
c2 = 'jobname | 1d | 4:30'
def tokenize(t):
if re.match('(\d+)d', t): return 'DAY'
if re.match('(\d+)h', t): return 'HOUR'
#! /usr/bin/env python
"""
Create, prepare and load schema for Socorro PostgreSQL database.
"""
import psycopg2
import psycopg2.extensions
from psycopg2 import ProgrammingError
import sys
import re
def test_execute_postgres_with_acceptable_errors(self):
config_manager = self._setup_config_manager()
with config_manager.context() as config:
with setupdb_app.PostgreSQLManager('postgres') as db:
db.execute('CREATE DATABASE blah', ['not so good things'])
calls = self.psycopg2.mock_calls
self.assertEqual(calls[1], mock.call().set_isolation_level(0))
diff --git a/Makefile b/Makefile
index abf4037..010be88 100644
--- a/Makefile
+++ b/Makefile
@@ -25,10 +25,10 @@ test: setup-test phpunit
phpunit:
phpunit webapp-php/tests/
-install: java_analysis reinstall
+install: java_analysis reinstall
diff --git a/Makefile b/Makefile
index 89cb22b..9cb81eb 100644
--- a/Makefile
+++ b/Makefile
@@ -25,9 +25,9 @@ test: setup-test phpunit
phpunit:
phpunit webapp-php/tests/
-thirdparty:
+thirdparty: virtualenv
diff --git a/Makefile b/Makefile
index 89cb22b..0e590d8 100644
--- a/Makefile
+++ b/Makefile
@@ -26,6 +26,7 @@ phpunit:
phpunit webapp-php/tests/
thirdparty:
+ virtualenv $(VIRTUALENV)
# install production dependencies
@rhelmer
rhelmer / socorro-localdev-mac10_6.txt
Created May 9, 2012 16:35
Socorro Mac install instructions
#
# Installing a Socorro dev environment on Mac OS X 10.6 (Snow Leopard)
#
# Note that this installs DB, UI and Middleware only - collection and processing are not supported.
#
----------------- PostgreSQL 9.0 -----------------
Install PostgreSQL from: http://get.enterprisedb.com/postgresql/postgresql-9.0.7-1-osx.dmg
diff --git a/config/crontabber.ini b/config/crontabber.ini
index 3421e42..72c2ed9 100644
--- a/config/crontabber.ini
+++ b/config/crontabber.ini
@@ -14,7 +14,9 @@ database_class=socorro.external.postgresql.connection_context.ConnectionContext
# name: jobs
# doc: None
# converter: class_list_converter
-jobs='''socorro.cron.jobs.weekly_reports_partitions.WeeklyReportsPartitionsCronApp|7d'''
+jobs='''socorro.cron.jobs.weekly_reports_partitions.WeeklyReportsPartitionsCronApp|7d
diff --git a/config/crontabber.ini b/config/crontabber.ini
index 3421e42..72c2ed9 100644
--- a/config/crontabber.ini
+++ b/config/crontabber.ini
@@ -14,7 +14,9 @@ database_class=socorro.external.postgresql.connection_context.ConnectionContext
# name: jobs
# doc: None
# converter: class_list_converter
-jobs='''socorro.cron.jobs.weekly_reports_partitions.WeeklyReportsPartitionsCronApp|7d'''
+jobs='''socorro.cron.jobs.weekly_reports_partitions.WeeklyReportsPartitionsCronApp|7d