Merge lp:~therp-nl/openupgrade-server/7.0-move_the_docs into lp:openupgrade-server

Proposed by Stefan Rijnhart (Opener)
Status: Merged
Merged at revision: 4645
Proposed branch: lp:~therp-nl/openupgrade-server/7.0-move_the_docs
Merge into: lp:openupgrade-server
Diff against target: 333 lines (+67/-46)
5 files modified
openerp/openupgrade/doc/source/API.rst (+25/-15)
openerp/openupgrade/doc/source/conf.py (+3/-3)
openerp/openupgrade/doc/source/index.rst (+2/-2)
openerp/openupgrade/doc/source/modules61-70.rst (+20/-20)
openerp/openupgrade/openupgrade.py (+17/-6)
To merge this branch: bzr merge lp:~therp-nl/openupgrade-server/7.0-move_the_docs
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) Approve
Review via email: mp+208775@code.launchpad.net

Commit message

[UPD] Move public location to https://doc.therp.nl/openupgrade
[UPD] Update old references to 6.1
[IMP] Docstrings
[IMP] Load docstrings of 7.0 specific API
[UPD] Coverage 7.0
[IMP] Increase TOC depth so that coverages are directly linked from main
 page

Description of the change

I'm proposing to move the docs to our own hosted https://doc.therp.nl/openupgrade. We have set up a nightly build process, so the docs are guaranteed to keep updated.

Readthedocs.org is a nice service, but in order to use Autodoc you need to configure a virtualenv and it has only worked for a very short time before it breaks again. Due to the lack of debug info, the reason for that was always unclear. Apart from that, bzr support has now been broken for 7 months[1] and the docs have not been updated during that time. I feel a bit bad about that last reason as I could probably have a look into that and try to fix the Readthedocs code, but it would not fix the first problem.

Apart from that, some general improvements in the docs.

[1] https://github.com/rtfd/readthedocs.org/issues/435#issuecomment-22916939

To post a comment you must log in.
Revision history for this message
Sylvain LE GAL (GRAP) (sylvain-legal) wrote :

Thanks !

LGTM.

Regards.

review: Approve (code review, no test)
Revision history for this message
Holger Brunn (Therp) (hbrunn) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'openerp/openupgrade/doc/source/API.rst'
2--- openerp/openupgrade/doc/source/API.rst 2012-11-24 22:22:00 +0000
3+++ openerp/openupgrade/doc/source/API.rst 2014-02-28 11:33:24 +0000
4@@ -1,22 +1,32 @@
5 OpenUpgrade API
6 +++++++++++++++
7
8-You can use the following functions in your pre and post scripts.
9-
10-Note that the path to the OpenUpgrade support library is different
11-in OpenERP 6 and OpenERP 6.1. For migration scripts that cover a
12-migration to OpenERP 6, please do support both paths using the
13-following stanza. Doing so enables the user to use your migration
14-script for migrating databases from OpenERP 5 to OpenERP 6.1 in one
15-step, provided that a migration script to 6.1 exists as well.
16-
17-.. code-block:: python
18-
19- try:
20- from openupgrade import openupgrade
21- except ImportError:
22- from openerp.openupgrade import openupgrade
23+In OpenUpgrade you can use the following functions in your pre and
24+post scripts. Use the following import from OpenUpgrade 6.1 on.
25+
26+.. code-block:: python
27+
28+ from openerp.openupgrade import openupgrade
29+
30+In OpenUpgrade 5.0 and 6.0, the import is slightly different.
31+
32+.. code-block:: python
33+
34+ from openupgrade import openupgrade
35+
36+General methods
37+---------------
38
39 .. automodule:: openupgrade
40 :members:
41
42+Methods for OpenUpgrade 7.0
43+---------------------------
44+
45+The following specific methods for 7.0 are available. These have been
46+developed to cover specific needs as per data model changes in that
47+release.
48+
49+.. automodule:: openupgrade_70
50+ :members:
51+
52
53=== modified file 'openerp/openupgrade/doc/source/conf.py'
54--- openerp/openupgrade/doc/source/conf.py 2013-02-08 12:27:54 +0000
55+++ openerp/openupgrade/doc/source/conf.py 2014-02-28 11:33:24 +0000
56@@ -37,15 +37,15 @@
57
58 # General substitutions.
59 project = 'OpenUpgrade'
60-copyright = '2012, The OpenUpgrade team'
61+copyright = '2012-2014, The OpenUpgrade team'
62
63 # The default replacements for |version| and |release|, also used in various
64 # other places throughout the built documents.
65 #
66 # The short X.Y version.
67-version = '6.1'
68+version = '7.0'
69 # The full version, including alpha/beta/rc tags.
70-release = '6.1'
71+release = '7.0'
72
73 # There are two options for replacing |today|: either, you set today to some
74 # non-false value, then it is used:
75
76=== modified file 'openerp/openupgrade/doc/source/index.rst'
77--- openerp/openupgrade/doc/source/index.rst 2013-11-12 20:53:56 +0000
78+++ openerp/openupgrade/doc/source/index.rst 2014-02-28 11:33:24 +0000
79@@ -10,7 +10,7 @@
80 Contents:
81
82 .. toctree::
83- :maxdepth: 2
84+ :maxdepth: 3
85
86 intro.rst
87 community.rst
88@@ -19,7 +19,7 @@
89 development.rst
90 API.rst
91
92-You should find the latest version of this documentation here: `<http://readthedocs.org/docs/openupgrade-server>`_
93+You should find the latest version of this documentation here: `<https://doc.therp.nl/openupgrade>`_
94
95 Indices and tables
96 ==================
97
98=== modified file 'openerp/openupgrade/doc/source/modules61-70.rst'
99--- openerp/openupgrade/doc/source/modules61-70.rst 2013-11-12 18:05:02 +0000
100+++ openerp/openupgrade/doc/source/modules61-70.rst 2014-02-28 11:33:24 +0000
101@@ -22,7 +22,7 @@
102 +-----------------------------------+-----------------------------------+
103 |account_accountant | Nothing to do |
104 +-----------------------------------+-----------------------------------+
105-|account_analytic_analysis | |
106+|account_analytic_analysis | Nothing to do |
107 +-----------------------------------+-----------------------------------+
108 |account_analytic_default | No change |
109 +-----------------------------------+-----------------------------------+
110@@ -32,7 +32,7 @@
111 +-----------------------------------+-----------------------------------+
112 |account_asset | |
113 +-----------------------------------+-----------------------------------+
114-|account_bank_statement_extensions | |
115+|account_bank_statement_extensions | Nothing to do |
116 +-----------------------------------+-----------------------------------+
117 |account_budget | |
118 +-----------------------------------+-----------------------------------+
119@@ -44,11 +44,11 @@
120 +-----------------------------------+-----------------------------------+
121 |account_followup | |
122 +-----------------------------------+-----------------------------------+
123-|account_payment | |
124+|account_payment | Nothing to do |
125 +-----------------------------------+-----------------------------------+
126 |account_sequence | |
127 +-----------------------------------+-----------------------------------+
128-|account_test | |
129+|account_test | Nothing to do |
130 +-----------------------------------+-----------------------------------+
131 |account_voucher | Nothing to do |
132 +-----------------------------------+-----------------------------------+
133@@ -66,7 +66,7 @@
134 +-----------------------------------+-----------------------------------+
135 |auth_crypt | |
136 +-----------------------------------+-----------------------------------+
137-|auth_ldap | |
138+|auth_ldap | Nothing to do |
139 +-----------------------------------+-----------------------------------+
140 |auth_oauth | |
141 +-----------------------------------+-----------------------------------+
142@@ -88,17 +88,17 @@
143 +-----------------------------------+-----------------------------------+
144 |base_report_designer | No change |
145 +-----------------------------------+-----------------------------------+
146-|base_setup | |
147+|base_setup | Nothing to do |
148 +-----------------------------------+-----------------------------------+
149 |base_status | No change |
150 +-----------------------------------+-----------------------------------+
151 |base_vat | No change |
152 +-----------------------------------+-----------------------------------+
153-|board | |
154+|board | Nothing to do |
155 +-----------------------------------+-----------------------------------+
156 |claim_from_delivery | |
157 +-----------------------------------+-----------------------------------+
158-|contacts | |
159+|contacts | Nothing to do |
160 +-----------------------------------+-----------------------------------+
161 |crm | work in progress |
162 +-----------------------------------+-----------------------------------+
163@@ -124,7 +124,7 @@
164 +-----------------------------------+-----------------------------------+
165 |document_webdav | No change |
166 +-----------------------------------+-----------------------------------+
167-|edi | |
168+|edi | Nothing to do |
169 +-----------------------------------+-----------------------------------+
170 |email_template | Done |
171 +-----------------------------------+-----------------------------------+
172@@ -144,7 +144,7 @@
173 +-----------------------------------+-----------------------------------+
174 |hr | Done |
175 +-----------------------------------+-----------------------------------+
176-|hr_attendance | |
177+|hr_attendance | Nothing to do |
178 +-----------------------------------+-----------------------------------+
179 |hr_contract | No change |
180 +-----------------------------------+-----------------------------------+
181@@ -160,11 +160,11 @@
182 +-----------------------------------+-----------------------------------+
183 |hr_recruitment | |
184 +-----------------------------------+-----------------------------------+
185-|hr_timesheet | |
186+|hr_timesheet | Nothing to do |
187 +-----------------------------------+-----------------------------------+
188 |hr_timesheet_invoice | |
189 +-----------------------------------+-----------------------------------+
190-|hr_timesheet_sheet | |
191+|hr_timesheet_sheet | Nothing to do |
192 +-----------------------------------+-----------------------------------+
193 |idea | |
194 +-----------------------------------+-----------------------------------+
195@@ -236,7 +236,7 @@
196 +-----------------------------------+-----------------------------------+
197 |l10n_mx | |
198 +-----------------------------------+-----------------------------------+
199-|l10n_nl | |
200+|l10n_nl | Nothing to do |
201 +-----------------------------------+-----------------------------------+
202 |l10n_pa | |
203 +-----------------------------------+-----------------------------------+
204@@ -268,7 +268,7 @@
205 +-----------------------------------+-----------------------------------+
206 |mail | Done |
207 +-----------------------------------+-----------------------------------+
208-|marketing | |
209+|marketing | Nothing to do |
210 +-----------------------------------+-----------------------------------+
211 |marketing_campaign | |
212 +-----------------------------------+-----------------------------------+
213@@ -276,7 +276,7 @@
214 +-----------------------------------+-----------------------------------+
215 |membership | |
216 +-----------------------------------+-----------------------------------+
217-|mrp | work in progress |
218+|mrp | Done |
219 +-----------------------------------+-----------------------------------+
220 |mrp_byproduct | |
221 +-----------------------------------+-----------------------------------+
222@@ -352,7 +352,7 @@
223 +-----------------------------------+-----------------------------------+
224 |project_timesheet | |
225 +-----------------------------------+-----------------------------------+
226-|purchase | work in progress |
227+|purchase | Done |
228 +-----------------------------------+-----------------------------------+
229 |purchase_analytic_plans | |
230 +-----------------------------------+-----------------------------------+
231@@ -366,7 +366,7 @@
232 +-----------------------------------+-----------------------------------+
233 |resource | No change |
234 +-----------------------------------+-----------------------------------+
235-|sale | work in progress |
236+|sale | Done |
237 +-----------------------------------+-----------------------------------+
238 |sale_analytic_plans | |
239 +-----------------------------------+-----------------------------------+
240@@ -376,11 +376,11 @@
241 +-----------------------------------+-----------------------------------+
242 |sale_margin | |
243 +-----------------------------------+-----------------------------------+
244-|sale_mrp | |
245+|sale_mrp | No change |
246 +-----------------------------------+-----------------------------------+
247 |sale_order_dates | No change |
248 +-----------------------------------+-----------------------------------+
249-|sale_stock | |
250+|sale_stock | Done |
251 +-----------------------------------+-----------------------------------+
252 |share | |
253 +-----------------------------------+-----------------------------------+
254@@ -402,7 +402,7 @@
255 +-----------------------------------+-----------------------------------+
256 |web_analytics | No change |
257 +-----------------------------------+-----------------------------------+
258-|web_linkedin | |
259+|web_linkedin | Nothing to do (new in 7.0) |
260 +-----------------------------------+-----------------------------------+
261 |web_shortcuts | No change |
262 +-----------------------------------+-----------------------------------+
263
264=== modified file 'openerp/openupgrade/openupgrade.py'
265--- openerp/openupgrade/openupgrade.py 2013-10-28 21:25:32 +0000
266+++ openerp/openupgrade/openupgrade.py 2014-02-28 11:33:24 +0000
267@@ -37,18 +37,20 @@
268 'load_data',
269 'rename_columns',
270 'rename_tables',
271+ 'rename_models',
272+ 'rename_xmlids',
273 'drop_columns',
274- 'table_exists',
275- 'column_exists',
276- 'logged_query',
277 'delete_model_workflow',
278+ 'warn_possible_dataloss',
279 'set_defaults',
280+ 'logged_query',
281+ 'column_exists',
282+ 'table_exists',
283 'update_module_names',
284 'add_ir_model_fields',
285- 'rename_models',
286- 'rename_xmlids',
287 'get_legacy_name',
288 'm2o_to_m2m',
289+ 'message',
290 ]
291
292 def load_data(cr, module_name, filename, idref=None, mode='init'):
293@@ -219,6 +221,8 @@
294 'table' : name of the table where the field is.
295 'field' : name of the field that are moving.
296 'new_module' : name of the new module
297+
298+ .. versionadded:: 7.0
299 """
300 module_obj = pool.get('ir.module.module')
301 for field in fields:
302@@ -316,6 +320,9 @@
303 write_value(ids, field, value)
304
305 def logged_query(cr, query, args=None):
306+ """
307+ Logs query and affected rows at level DEBUG
308+ """
309 if args is None:
310 args = []
311 res = cr.execute(query, args)
312@@ -392,6 +399,8 @@
313 :param table: The source table
314 :param field: The field name of the target model
315 :param source_field: the many2one column on the source table.
316+
317+ .. versionadded:: 7.0
318 """
319 cr.execute('SELECT id, %(field)s '
320 'FROM %(table)s '
321@@ -409,9 +418,11 @@
322 To be extended with logging to a table for reporting purposes.
323
324 :param module: the module name that the message concerns
325- :param table: the model that this message concerns (may be False,
326+ :param table: the model that this message concerns (may be False, \
327 but preferably not if 'column' is defined)
328 :param column: the column that this message concerns (may be False)
329+
330+ .. versionadded:: 7.0
331 """
332 argslist = list(args or [])
333 prefix = ': '

Subscribers

People subscribed via source and target branches