← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jcsackett/launchpad/questions-on-webservice into lp:launchpad

 

j.c.sackett has proposed merging lp:~jcsackett/launchpad/questions-on-webservice into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~jcsackett/launchpad/questions-on-webservice/+merge/54278

Summary
=======

An ongoing effort to ease Maintenance rotation and remove work from the LOSAs includes providing an API means of hiding question message spam. The method to this is relatively simple, but first Questions must be exposed on the webservice.

This branch exposes (very minimally) the Question model over the API.

Preimplementation
=================

Spoke with Curtis Hovey about what needed exposing. Spoke with Leonard Richardson about the particulars of how to do it.

Implementation
==============

lib/canonical/launchpad/browser/message.py
lib/lp/answers/configure.zcml
lib/lp/answers/interfaces/question.py
lib/lp/answers/interfaces/webservice.py
---------------------------------------
Added export entries to the question interfaces, updated configuration file to include those exported entries in the webservice data, and added an adapter so that QuestionMessages could be traversed by the webservice.

lib/lp/answers/tests/test_question_webservice.py
------------------------------------------------
Tests.

lib/lp/services/database/bulk.py
--------------------------------
Drive by fix to an item that needed to be included in __all__

Tests
=====

bin/test -vvct test_question_webservice

QA
==

Access a question via the API.

As an example, this question,
https://answers.launchpad.net/launchpad/+question/149920
can be accessed via this url on the api,
https://api.launchpad.net/1.0/launchpad/+question/149920

You should at a minimum see the question's title.

Lint
====

make lint output:

= Launchpad lint =

Checking for conflicts and issues in changed files.

Linting changed files:
  lib/canonical/launchpad/browser/message.py
  lib/lp/answers/configure.zcml
  lib/lp/answers/interfaces/question.py
  lib/lp/answers/interfaces/webservice.py
  lib/lp/answers/tests/test_question_webservice.py
  lib/lp/services/database/bulk.py
-- 
https://code.launchpad.net/~jcsackett/launchpad/questions-on-webservice/+merge/54278
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jcsackett/launchpad/questions-on-webservice into lp:launchpad.



Follow ups