Open giosce opened 3 years ago
Steps to implement this:
Projects
abstract class like its peers File
, GitHubTopic
, and GitHubOrganization
doMap
, and when loaded should be a map of ProjectId -> ProjectData
where ProjectData is just an unstructured JSON data objecttrue
when its canLoadFromOrganization
method is passed an entry from organizations.json
is then in charge of loading a list of projects for that entryorganizations.json
and add the DemocracyLab projects repository class to the top position in the registry and hardcode it to just detect the democracylab entry and handle loading it. We can check that organization.projects_list_url == 'https://www.democracylab.org/api/projects'
organizations.json
that contains one case per type of projects repository, we'll want to add DemocracyLab there so we can test the DemocracyLab projects reader: https://github.com/codeforamerica/brigade-project-index/blob/master/crawler/lib/repositories/organizations/__fixtures__/test-organizations.jsonThese docs cover how to test/debug changes like this locally: https://brigade.cloud/projects/crawler/contributing/crawler/
DemocracyLab has provided an API to fetch projects that they host. Mark Frischmuth told us is fine to call https://www.democracylab.org/api/projects every hour.