Skip to content

Instantly share code, notes, and snippets.

@theresaanna
theresaanna / gist:93111f733a5d2e94eb6d9fbacb48b114
Last active September 27, 2016 17:15
Schema Specification
<h1>Software Inventory Schema v1.0 Specification</h1>
<h2>File location and contents</h2>
<ul>
<li><code>code.json</code> must live in the root directory of your agency's website.</li>
<li><code>code.json</code> must include a single object represented as JSON, with key-value pairs according to the list below.</li>
</ul>
<h2>Fields</h2>
<h3>Required</h3>
<ul>
<li><code>agency</code>: [string] The agency acronym
@theresaanna
theresaanna / inventory.json
Last active September 18, 2016 04:25
Alpha Software Inventory Schema - Project Open Data style
{
"agency": "FAKE1",
"projects": [
{
"vcs": "git",
"repository": "https://github.com/presidential-innovation-fellows/mygov",
"landingPage": "https://agency.gov/project-homepage",
"downloadURL": "https://agency.gov/project/dist.tar.gz",
"title": "mygov",
"description": "A Platform for Conecting People and Government",
@theresaanna
theresaanna / code.json
Last active September 23, 2016 20:10
Alpha Software Inventory Schema - DC civic.json style
{
"agency": "DOABC",
"projects": [
{
"status": "Alpha",
"vcs": "git",
"repository": "https://github.com/presidential-innovation-fellows/mygov",
"homepage": "https://agency.gov/project-homepage",
"downloadURL": "https://agency.gov/project/dist.tar.gz",
"name": "mygov",
{
"_id": {
"$oid": "57bcc60ef36d283b6d8c58c0"
},
"agencyAcronym": "FAKE1",
"projects": [
{
"vcs": "git",
"repoPath": "https://github.com/presidential-innovation-fellows/mygov",
"repoName": "mygov",

This is a rough outline of how I envision the plugin implementation for eRegs, sans parser. There’s plenty here that is just a starting point, and that I have not thought through fully. The main point that I want to make is that we can reuse patterns and code that we already have to give plugin writers the option to add their own content in ways that have been validated by user feedback.

I’m thinking about a first implementation, not a final vision. The idea is to rework code we have, add foundational plugin code, and document how we expect people to write a plugin and what controls they have available to them. The motivation is to be able to relatively quickly and cleanly spin up instances of eRegs, with an eye toward many agencies having instances in the future. Each agency seems to have its own specific set of documents that are important to them, and my hope is that we can identify a set of feature types that match content we have now and will meet many of the immediate needs that agencies have.

Using

(calc)vagrant@ubuntu-14:~/calc$ make test
python manage.py collectstatic --noinput --link > /dev/null
python manage.py test \
--nologcapture --liveserver=localhost:8081 \
nosetests --nologcapture --verbosity=1
Creating test database for alias 'default'...
...........................................Traceback (most recent call last):
File "/usr/lib/python3.4/wsgiref/handlers.py", line 138, in run
self.finish_response()
@theresaanna
theresaanna / gist:86be7e29214a7f31ab73
Created March 31, 2015 23:26
Boilerplate issue tasks
- Extend and write new unit tests
- Extend and write new Selenium tests
- Document changes by adding/updating docstrings
- Document changes in the README
- Document changes in the environment setup Google doc
@theresaanna
theresaanna / gist:aaa2b10b3ee45b1c8440
Last active August 29, 2015 14:12
The National tally
The National
  • Beautiful Head 5
  • Cold Girl Fever 3
  • The Perfect Song 1
  • American Mary 2
  • Son 1
  • Pay For Me 2
  • Bitters & Absolut 5
  • John's Star 5
  • Watching You Well 2
var loadSingleEntity = function(e) {
var urls = [];
urls.push(callAPI(buildURL(e)));
urls.push(callAPI(url for committee info));
$.when.apply($, urls).done(function() {
var i,
len = arguments.length;
@theresaanna
theresaanna / gist:9bcc904e28634ac7b091
Created November 6, 2014 00:25
Mac nginx openFEC + openFEC-web-app setup
brew install nginx
sudo cp -v /usr/local/opt/nginx/*.plist /Library/LaunchDaemons/
sudo chown root:wheel /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
sudo mkdir /usr/local/etc/nginx/vhosts
sudo cp openFEC/webservices/setup/nginx_conf_default_no_ssl /usr/local/etc/nginx/vhosts/default.conf
sudo ln -s /usr/local/etc/nginx/vhosts/default.conf /usr/local/etc/nginx/sites-available/default
sudo rm /usr/local/etc/nginx/nginx.conf
sudo ln -s /usr/local/etc/nginx/vhosts/default.conf /usr/local/etc/nginx/nginx.conf
sudo launchctl start /Library/LaunchDaemons/homebrew.mxcl.nginx.plist