All Projects → 18F → 2015-foia-hub

18F / 2015-foia-hub

Licence: other
A consolidated FOIA request hub.

Programming Languages

CSS
56736 projects
javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to 2015-foia-hub

2015-foia
Please check out https://github.com/18F/foia-hub/issues to track our work. This repo is for project wide discussion, blogging, and scratch space for 18F's FOIA modernization team.
Stars: ✭ 50 (+6.38%)
Mutual labels:  unmaintained, foia
build-relengapi
INACTIVE - http://mzl.la/ghe-archive - Your Interface to Release Engineering Automation -
Stars: ✭ 14 (-70.21%)
Mutual labels:  unmaintained
iris firefox
DEPRECATED - Test Suite for Firefox using Mozilla Iris
Stars: ✭ 41 (-12.77%)
Mutual labels:  unmaintained
golang-openshift
Template for running Go programs on OpenShift
Stars: ✭ 62 (+31.91%)
Mutual labels:  unmaintained
Prestan
PrestaShop Node.js API Library [UNMAINTAINED]
Stars: ✭ 21 (-55.32%)
Mutual labels:  unmaintained
ignite
OBSOLETE: use Void Linux
Stars: ✭ 69 (+46.81%)
Mutual labels:  unmaintained
pdf.js-bot
INACTIVE - http://mzl.la/ghe-archive - Cloud test scripts for the pdf.js project
Stars: ✭ 16 (-65.96%)
Mutual labels:  unmaintained
page-metadata-service
DEPRECATED - A RESTful service that returns the metadata about a given URL.
Stars: ✭ 18 (-61.7%)
Mutual labels:  unmaintained
soup
INACTIVE - http://mzl.la/ghe-archive - OpenWebApps on Android
Stars: ✭ 12 (-74.47%)
Mutual labels:  unmaintained
language-perl6fe
»ö« Atom Perl 6 Support - Forgotten Edition »ö«
Stars: ✭ 16 (-65.96%)
Mutual labels:  unmaintained
foia-recommendations
National FOIA Project: Research and Recommendations
Stars: ✭ 24 (-48.94%)
Mutual labels:  foia
layerscope
INACTIVE - http://mzl.la/ghe-archive - LayerScope Viewer
Stars: ✭ 16 (-65.96%)
Mutual labels:  unmaintained
gw2-api.com
Proxy-layer server for the official GuildWars 2 API.
Stars: ✭ 12 (-74.47%)
Mutual labels:  unmaintained
busybox
DEPRECATED - Fork of git://android.git.linaro.org/platform/external/busybox.git
Stars: ✭ 40 (-14.89%)
Mutual labels:  unmaintained
icongrid
INACTIVE - http://mzl.la/ghe-archive - IconGrid.js makes it easy to display a scrollable grid of icons!
Stars: ✭ 25 (-46.81%)
Mutual labels:  unmaintained
Campus-Program
INACTIVE - http://mzl.la/ghe-archive - Rocking out the campus campaign!
Stars: ✭ 21 (-55.32%)
Mutual labels:  unmaintained
oauthorizer
DEPRECATED - Enable easy use of oauth for other addons
Stars: ✭ 26 (-44.68%)
Mutual labels:  unmaintained
cleverbot
Deprecated/unmaintained. See https://www.cleverbot.com/api/
Stars: ✭ 23 (-51.06%)
Mutual labels:  unmaintained
calculator
INACTIVE - http://mzl.la/ghe-archive - Resurrection of the calculator app that was pulled from gaia
Stars: ✭ 16 (-65.96%)
Mutual labels:  unmaintained
silan
audio file [silence] analyzer
Stars: ✭ 33 (-29.79%)
Mutual labels:  unmaintained

openFOIA

Coverage Status

A starting place for FOIA in the US government.

This project is currently working on getting people to the right place in the government to file their FOIA request.

Outside Contributors

Hello! If you're interested in learning more about this project, check out some related repos and don't be afraid to ask us questions (general questions usually go here: foia).

If you'd like to contribute to our project, please check out our [foia-hub] (https://github.com/18F/foia-hub) repo. We try to tag things that are easy to pick up without being entrenched in our project with a "help wanted" tag. Things in our backlog are usually also up for grabs, so let us know if you'd like to pick something up from there.

For those interested in contributing, please check out our contributing guidelines we use to guide our development processes internally.

Our Repos

  • foia - A discussion forum where we can discuss the project. Also includes miscellaneous resources and scrapers.
  • foia-hub - Where our work happens. We create issues related to each sprint and our backlog here. If you're interested in contribution, please look for "help wanted" tags or ask!

How is this different from other stuff?

There are some fantastic open source tools out there for processing FOIA requests, like Postcode's RecordTrac (which powers FOI for the City of Oakland) and mySociety's Alavateli (used all over the world).

Our platform, while still in its infancy, plans to be heavily optimized for the US federal government. It also plans to not be a backend tool for FOIA processing offices. In other words, there's no plans to allow government employees to log in to this system.

Instead, our tool will focus on a small, US-focused user experience, and API-driven integration for tools to submit, and receive submissions, through the US Freedom of Information Act.

Setup

This is a Django app that uses Postgres, and depends on Python 3.4.

  • If using Ubuntu, you may need to install the following:
sudo apt-get install libpq-dev python3-dev
  • Install project requirements. It's recommended you use a virtualenv.
pip install -r requirements.txt
  • Install autoenv to automatically load the contents of .env as environment variables. Do not use the brew version of autoenv.

  • Copy env.example to .env to get your settings started.

cp env.example .env

Using SQLite

If you're using SQLite, you're already done! Jump to loading data.

Using Postgres

  • Switch to the postgres user:
sudo su - postgres
  • Create a foia database in Postgres:
createdb foia

Note, that the database encoding needs to be UTF8. If your default is set to something else, you can use:

create database foia with encoding 'UTF8' LC_COLLATE='en_US.UTF8' LC_CTYPE='en_US.UTF8' TEMPLATE=template0;

If you you get a could not connect to server error, you could be experiencing a number of issues. Ensure that $PGHOST is set to localhost, and that the Postgres service has been started.

  • Next, create user foia with some password:
psql -d foia -c "CREATE USER foia WITH PASSWORD '<<PASSWORD>>';"
  • Initialize your database schema:
python manage.py syncdb
  • Update the DATABASE_URL in .env with your Postgres connection string.

Running the server

  • Launch the server locally:
python manage.py runserver

Running the tests

python manage.py test --settings=foia_hub.settings.test

Loading Data

First, migrate the database:

python manage.py migrate

Agency contact data is stored in another repository as YAML files.

Clone the repository:

git clone [email protected]:18F/foia.git

Then run the data loading script, providing the path to contacts/data/ inside the foia repo you checked out above:

python manage.py load_agency_contacts /path/to/foia/contacts/data/

There's a small bash script which will check for changes to the repository, and if found, import the new data. This can be useful if combined with a cron script to run on a routine basis. The script expects to be ran from the foia-hub repository's root:

./check-new-data.sh <<path to foia repository>>

No repository parameter is needed if both the foia and foia-hub projects are cloned into the same directory. You should be able to run the server now:

python manage.py runserver

Access http://localhost:8000/api/agency/ to see the list of agencies in JSON format.

Front-end Dev Environment

We use Sass, Bourbon and Neat for our front-end stack.

You will need Ruby, and the following gems:

gem install sass bourbon neat

You will then need to pull down further Bourbon and Neat dependencies:

cd foia_hub/static/sass
bourbon install
neat install

While developing you can trigger a recompile or run a "watch" script, which will recompile as you make Sass changes:

python manage.py scss   # one-off

python manage.py scss watch   # will run continuously

During development, you will likely run both scss watch and runserver.

Deploying to Cloud Foundry

18F deploys this app to a self-hosted instance of Cloud Foundry.

You'll need to configure an app named foia in the space or org that makes sense for you. We already have a manifest.yml that assumes the app is named foia, and sets a memory size of 1GB.

18F setup

Point cf at 18F's API. You may need to use --skip-ssl

cf api https://api.cf.18f.us

If the cf api command below fails, add --skip-ssl-validation (this is temporary).

Work with the right "org" and "space":

cf target -o foia -s hub

Two production environments

To ensure zero downtime deploys, 18F uses two production environments, foia-a and foia-b.

A new deploy pushes code to the production environment not in use, and when the deploy has been concluded, URL routes are remapped to instantly switch from one app to another.

For each environment, set the app's environment variables.

  • DATABASE_URL: connection string to Postgres.
  • FOIA_ANALYTICS_ID: A Google Analytics profile ID.
  • FOIA_SECRET_SESSION_KEY: A random high-entropy string. Should be strong and unique for production.
  • DJANGO_SETTINGS_MODULE: Set to foia_hub.settings.dev in development, and to foia_hub.settings.production in production.
cf set-env foia-a DATABASE_URL [value]
cf set-env foia-a FOIA_ANALYTICS_ID [value]
cf set-env foia-a FOIA_SECRET_SESSION_KEY [value]
cf set-env foia-a DJANGO_SETTINGS_MODULE foia_hub.settings.dev

cf set-env foia-b DATABASE_URL [value]
cf set-env foia-b FOIA_ANALYTICS_ID [value]
cf set-env foia-b FOIA_SECRET_SESSION_KEY [value]
cf set-env foia-b DJANGO_SETTINGS_MODULE foia_hub.settings.dev

Deploy the app with:

./deploy.sh

This will:

  • Decide whether to deploy to foia-a or foia-b, based on whether foia-a is currently started.
  • Deploy the app from the directory you run the command (the server does not check out the app from source control).
  • Migrate the database.
  • Check out the latest data from 18f/foia and load the data into the database.
  • Start the app.
  • If the app successfully starts, the route will be mapped to the new environment, and the previous production environment will have its route unmapped, and then be stopped.

Watching the logs

You can tail the logs for a given production environment during the process with:

cf logs foia-a

Tailing the logs doesn't show past logs. To view recent logs (without tailing), run:

cf logs foia-a --recent

Public domain

This project is in the worldwide public domain. As stated in CONTRIBUTING:

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].