Skip to content
Mjumbe Poe edited this page Aug 7, 2013 · 1 revision

It's time for a source tree audit so that I can put together a plan for cleaning this project up and making it easier to build on top of.

I've started on an architecture change for Councilmatic. In this change, the core project becomes a Django app instead of a stand-alone Django project. This allows the project to be more maintainable: Local instances won't have to fork the entire Councilmatic repository and make city-specific changes in core. Instead, all cities can refer to the same core, and use pluggable apps to customize their instances. This keeps city-specific glue in a city's Django project, and makes it easier for app code to be general enough to be shared across cities. This is a first but necessary project improvement.

Folders at the Root

  • councilmatic
    The primary project source folder (should be called src?).
  • crons
    Contains a script to be scheduled as a nightly cron job. This script does periodic tasks like running the scraper for a city's LMS, updating search indexes, and sending out subscription emails.
  • doc
    Project documentation
  • scripts -- DELETE ME
    Nothing in here is needed any longer. Make sure that nothing refers to it and delete it.
  • solr -- MOVE ME TO THE LOCAL INSTANCE CODE
    The configuration structure for the Solr setup. The file solr/conf/schema.xml is generated by the manage.py build_solr_schema command, and must be regenerated if the project search indexes change, e.g.:
    manage.py build_solr_schema > solr/conf/schema.xml
    
  • ci (Continuous Integration)
    Scripts for preparing the testing server. Does things like install PostGIS, set up the database, and set up a reasonable local settings file.

Files at the Root

  • .gitignore
  • .gitmodules -- DELETE ME
    I no longer want to be using formtatstic and such. There should currently be no required submodules.
  • .travis.yml
    Configuration file for Travis CI. Tests the master branch. Needs to be updated to test Councilmatic against Python 2.6, 2.7, and 3.3. Tests need a lot of updating. More on this later.
  • DIARY.rst
    Notes that I was keeping for myself while exploring a few things -- specifically Legistars SOAP API, and creating a subscription feed for search results. Both of these things are not so relevant anymore (though it might be nice to take another stab at exploring the SOAP API, since Philly's using the hosted Legistar now).
  • Procfile -- DELETE ME
    For setting up on Heroku. Not so relevant now; I'll delete.
  • dotcloud.yml -- MOVE ME TO THE LOCAL INSTANCE CODE
    For settup up on DotCloud. It would be nice if we had a setup structure for OpenShift and EC2 as well.
  • postinstall -- MOVE ME TO THE LOCAL INSTANCE CODE
    Again, DotCloud.
  • requirements.txt -- MOVE ME TO THE LOCAL INSTANCE CODE
    Development requirements for Councilmatic. These should be the same as in the setup.py file.
  • wsgi.py -- MOVE ME TO THE LOCAL INSTANCE CODE
    WSGI module for platforms like DotCloud that look for the WSGI module at the project root.

In the councilmatic Package

Non-app Folders

docs
I don't know why this is here. DELETE.
logs
This shouldn't be here either. Log files don't belong in the source folder. DELETE.

Sub-apps

activity_log
bookmarks
cm
cm_api
customizations
ebdata
opinions
This is the module for the user input on each legislative file. This is a perfect example of a thing that would be made a standalone app.
phillyleg
This was the original Councilmatic code folder. I hate that it's still called phillyleg. More later.
subscriptions
The app for managing email subscriptions to site content. This app has gone through a few revisions over the years -- cycles of complicating and simplifying. More later.
utils
The tool drawer; odds and ends.

Modules

The modules in this package hint at a desire to make the councilmatic app more unified.

api.py
The beginnings of a Django REST Framework 2.0-based API

Clone this wiki locally