Skip to content

PRs of note

Samara Trilling edited this page Apr 21, 2022 · 6 revisions

There are a number of pull requests in the Tenant Platform repository that are particularly valuable to know about, either because they illustrate a common kind of task or feature, or because they changed the architecture in a significant way, or something else.

Note that it's impossible to list all notable pull requests here--in some sense, almost all PRs are potentially notable, given the right context. Fortunately, our engineering culture is such that we try to document all PRs as best we can, not just the ones we think might be notable later, so you're encouraged to search PRs if what you're looking for isn't here.

Another alternative is to look at the history of a file that you know is related to something you want to learn more about. For example, if you're puzzled by foo.py, look at the history of that file until you find a commit that sounds interesting, and click on its related PR to learn more about it. Code archaeology is fun!

With that said, here are some of the notable pull requests:

  • Add new, empty eviction free site. (#1800) At the time of this writing, the same server actually serves the content for app.justfix.nyc, norent.org, and evictionfreeny.org. If you want to know more about how this is done, check out this PR, which added a skeleton for the evictionfreeny.org site to the repository.

  • Add very basic server-side rendering. (#16) This was one of the first PRs made to the repository, and while the architecture has changed since this PR was made (most significantly, we moved to a long-lived HTTP process for SSR in #839) the very basics remain the same, at least at the time of this writing (August 2021).

  • Add typesafe GraphQL. (#21) This introduced GraphQL and Graphene-Django into the codebase, and the architecture hasn't changed much since. The PR description explains a lot of context around why things were done the way they were, what alternatives were tried, and so on.

    One alternative that was not mentioned is that I only really chose GraphQL because I wanted strong typing between server and client: I'd originally wanted to just use REST, but all the software I found for strongly typing REST API calls seemed to require arcane JVM-based tooling. Eventually I gave up and decided to use GraphQL instead, since it had strong typing built into its specification and Apollo provided NodeJS-based tooling to create TypeScript types from a GraphQL schema.

  • Add optional Celery integration. (#814) This is architecturally significant. Relatedly, see #1641 for an example of creating a retryable task with Celery, which caused me no small amount of frustration to write.

  • Add Lingui support, take 2. (#1376) This introduced Lingui, our internationalization framework, into the codebase. It also illustrates how we used a new ENABLE_WIP_LOCALES environment variable to make it possible for us to work on our in-progress Spanish localization without subjecting our users to it.

  • Add EFNY admin data downloads. (#1913) Sometimes we need to provide data downloads for our partners in CSV and/or JSON format. Here's an example of how to do that.

  • Add a shortlinks Django app. (#2167) This is a nice, small example of adding a new Django app to the project, as well as adding new permissions for a user group (Outreach Coordinators) to be able to edit its models in the Django admin.

  • Add a new issues form for LA Letter Builder. (#2269) This is a soup-to-nuts example of adding a new form that saves information to the database, including SessionUpdatingFormSubmitter, a new variable in AllSessionInfo, a new database table, a new commondata JSON file, and tests.

Clone this wiki locally