MuckRock's source code
Switch branches/tags
agency-reply-2 agency-reply agency-users assignment-layout attachments concurrency crowdfund dashboard dev dj19 email env exemptions fix-nested-inlines fm-import foi95 foiamachine-hosts foiamachine lists maps master mitchelljkotler-patch-1 nav newvm node oauth-client optimize orgs per-page-rss pip-tools projects proxies pyup-config pyup-initial-update pyup-update-amqp-1.4.9-to-2.3.2 pyup-update-astroid-1.4.8-to-1.6.5 pyup-update-babel-2.5.1-to-2.6.0 pyup-update-backports.functools-lru-cache-1.2.1-to-1.5 pyup-update-billiard- pyup-update-bleach-2.1.2-to-2.1.3 pyup-update-boto-2.42.0-to-2.48.0 pyup-update-celery-3.1.23-to-4.2.0 pyup-update-certifi-2017.4.17-to-2018.4.16 pyup-update-chardet-3.0.3-to-3.0.4 pyup-update-click-6.6-to-6.7 pyup-update-contextlib2-0.5.4-to-0.5.5 pyup-update-coverage-4.2-to-4.5.1 pyup-update-cssselect-0.9.2-to-1.0.3 pyup-update-cssutils-1.0.1-to-1.0.2 pyup-update-decorator-4.0.10-to-4.2.1 pyup-update-dill-0.2.5-to- pyup-update-dj-inmemorystorage-1.4.0-to-1.4.1 pyup-update-django-1.11.4-to-2.0.7 pyup-update-django-activity-stream-0.6.4-to-0.6.5 pyup-update-django-celery-3.2.1-to-3.2.2 pyup-update-django-celery-email-1.1.5-to-2.0.0 pyup-update-django-compat-1.0.14-to-1.0.15 pyup-update-django-compressor-2.1-to-2.2 pyup-update-django-constance-2.0.0-to-2.2.0 pyup-update-django-cors-headers-1.3.1-to-2.3.0 pyup-update-django-debug-toolbar-1.8-to-1.9.1 pyup-update-django-debug-toolbar-request-history-0.0.5-to-0.0.7 pyup-update-django-email-bandit-1.2.0-to-1.5 pyup-update-django-filter-1.0.4-to-1.1.0 pyup-update-django-geojson-2.9.1-to-2.11.0 pyup-update-django-hijack-2.1.4-to-2.1.9 pyup-update-django-hosts-2.0-to-3.0 pyup-update-django-leaflet-0.19.0-to-0.24.0 pyup-update-django-localflavor-1.3-to-2.0 pyup-update-django-nose-1.4.4-to-1.4.5 pyup-update-django-opensearch-0.4.0-to-0.4.1 pyup-update-django-phonenumber-field-1.3.0-to-2.0.0 pyup-update-django-querycount-0.4.1-to-0.7.0 pyup-update-django-reversion-1.10.2-to-2.0.13 pyup-update-django-robots-2.0-to-3.0 pyup-update-django-storages-1.5.1-to-1.6.6 pyup-update-django-taggit-0.20.1-to-0.22.2 pyup-update-django-watson-1.4.1-to-1.5.2 pyup-update-django-webpack-loader-0.3.0-to-0.6.0 pyup-update-djangorestframework-3.4.7-to-3.8.2 pyup-update-dogslow-0.9.7-to-1.2 pyup-update-easy-thumbnails-2.4.1-to-2.5 pyup-update-fabric-1.12.0-to-2.1.3 pyup-update-factory-boy-2.7.0-to-2.11.1 pyup-update-fake-factory-0.7.2-to-9999.9.9 pyup-update-freezegun-0.3.8-to-0.3.10 pyup-update-furl-1.0.1-to-1.2 pyup-update-fuzzywuzzy-0.14.0-to-0.16.0 pyup-update-google-api-python-client-1.6.5-to-1.7.3 pyup-update-gunicorn-19.6.0-to-19.8.1 pyup-update-httplib2-0.10.3-to-0.11.3 pyup-update-idna-2.5-to-2.7 pyup-update-ipaddress-1.0.17-to-1.0.21 pyup-update-ipdb-0.10.1-to-0.11 pyup-update-ipython-5.1.0-to-6.4.0 pyup-update-ipython-genutils-0.1.0-to-0.2.0 pyup-update-isort-4.2.5-to-4.3.4 pyup-update-jsonfield-1.0.3-to-2.0.2 pyup-update-kombu-3.0.35-to-4.2.1 pyup-update-lazy-object-proxy-1.2.2-to-1.3.1 pyup-update-lxml-3.6.4-to-4.2.3 pyup-update-markdown-2.6.7-to-2.6.11 pyup-update-mccabe-0.5.2-to-0.6.1 pyup-update-newrelic- pyup-update-numpy-1.9.1-to-1.14.5 pyup-update-olefile-0.44-to-0.45.1 pyup-update-orderedmultidict-0.7.11-to-1.0 pyup-update-packaging-16.8-to-17.1 pyup-update-paramiko-1.17.2-to-2.4.1 pyup-update-pathlib2-2.1.0-to-2.3.2 pyup-update-pbr-1.10.0-to-4.1.0 pyup-update-pexpect-4.2.1-to-4.6.0 pyup-update-phonenumberslite-8.8.2-to-8.9.9 pyup-update-pillow-4.2.1-to-5.2.0 pyup-update-premailer-3.0.0-to-3.2.0 pyup-update-prompt-toolkit-1.0.7-to-2.0.3 pyup-update-psycopg2-2.7.4-to-2.7.5 pyup-update-ptyprocess-0.5.1-to-0.6.0 pyup-update-pyasn1-0.4.2-to-0.4.3 pyup-update-pyasn1-modules-0.2.1-to-0.2.2 pyup-update-pygments-2.1.3-to-2.2.0 pyup-update-pylibmc-1.5.1-to-1.5.2 pyup-update-pylint-1.6.4-to-1.9.2 pyup-update-pylint-django-0.7.2-to-0.11.1 pyup-update-pylint-plugin-utils-0.2.4-to-0.3 pyup-update-pymdown-extensions-1.2-to-4.11 pyup-update-python-dateutil-2.5.3-to-2.7.3 pyup-update-python-magic-0.4.12-to-0.4.15 pyup-update-pytz-2017.2-to-2018.5 pyup-update-pyyaml-3.12-to-3.13 pyup-update-raven-5.27.1-to-6.9.0 pyup-update-redis-2.10.5-to-2.10.6 pyup-update-reportlab-3.4.0-to-3.5.0 pyup-update-requests-2.18.1-to-2.19.1 pyup-update-requests-mock-1.3.0-to-1.5.0 pyup-update-rules-1.1.1-to-1.3 pyup-update-scikit-learn-0.16.1-to-0.19.1 pyup-update-scipy-0.14.0-to-1.1.0 pyup-update-simplejson-3.8.2-to-3.16.0 pyup-update-six-1.10.0-to-1.11.0 pyup-update-smart-open-1.4.0-to-1.6.0 pyup-update-smartypants-1.8.6-to-2.0.1 pyup-update-stripe-1.75.0-to-2.0.1 pyup-update-traitlets-4.3.0-to-4.3.2 pyup-update-unidecode-0.4.19-to-1.0.22 pyup-update-urllib3-1.21.1-to-1.22 pyup-update-wrapt-1.10.8-to-1.10.11 pyup-update-yapf-0.20.1-to-0.21.0 pyup-update-yet-another-django-profiler-1.0.3-to-1.1.0 request-remodel rules staging tasks update-django
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.


Codeship Status for MuckRock/muckrock

Software Versions

The following instructions were tested to work with the following software versions:

  1. Vagrant 1.9.3
  2. VirtualBox 5.0.32


  1. Check out the git repository - git clone
  2. Enter the directory - cd muckrock
  3. Set up your virtual machine
    1. Install Vagrant and VirtualBox
    2. Run vagrant up (this will take a while)
      1. You will see the following error: ==> default: mesg: ttyname failed: Inappropriate ioctl for device. It can be safely ignored.
    3. Run vagrant ssh to ssh into the virtual machine
  4. You may edit the file ~/muckrock/ if you would like to set up accounts and passwords for any external providers - you should be able to develop without these unless you specifically need to use and test them

You should have a fully populated MuckRock site set up locally now. The code checked out from GitHub is synced between the virtual machine and your host machine, so you may edit the code using your favorite text editor locally while running the code from within the virtual machine.



  1. The following commands should be run from the MuckRock directory inside the virtual machine: cd muckrock
  2. Run npm run build to rebuild the javascript and css
    • NOTE: This only needs to be run if you change any javascript or scss files, it will be built for you initially
  3. Run fab mail to start a background email server (in order to log email sent during development)
  4. Run fab celery to start a background task queue (in order to use celery during development)
  5. Run fab runserver to start a server instance
  6. Navigate your web browser (from the host machine) to localhost:8000
  7. You may log in as a super user with the username super and password abc

Update search index

The index should stay updated. If a new model is registered with watson, then build the index (fab manage:buildwatson). This command should be run on any staging or production servers when pushing code that updates the registration.

Add dependencies

To add a dependency, list it in one of the two .in files inside the pip folder. The file is used for local libraries, like testing suites. The file is used for production libraries—stuff that should run on Heroku.

When entering a dependency, make sure to append a comment explaining its purpose. This is hugely helpful when it comes to navigating dependency hell.

After entering your dependency in the .in file, run fab pip-compile to canonize your change.

Test and lint

  • Test your code in one of two ways:
    • Run fab test to run all the tests.
    • Run fab test:muckrock.<app> to test a particular application.
    • Run fab test:muckrock,1 to reuse the database between tests, which saves a ton of time.
  • Lint your Python by running fab pylint.
  • Lint your Javascript by running npm run lint.
  • All code should be formatted by yapf and isort. You can format your code by running fab format. It may be helpful to set up your editor to autoformat your code upon saving.


The master branch represents our product code. master should only ever be updated by merges from the dev branch, which tracks it. New features should be branched from dev, then merged back into dev once they are tested and linted. Any feature branch pushed to GitHub will be evaluated by Codeship. If the staging branch is pushed, the staging server will be updated. If the master branch is pushed, the production server will be updated.