Piotr Kliczewski has posted comments on this change.

Change subject: yml: generate api doc from the schema
......................................................................


Patch Set 24:

(9 comments)

https://gerrit.ovirt.org/#/c/56387/24/automation/index.html
File automation/index.html:

Line 2: <BODY>
Line 3: <h4>VDSM Project Automation Build Reports</h4>
Line 4: <a href="htmlcov/index.html">Coverage Report</a>
Line 5: <BR/>
Line 6: <a href="vdsm-api.html">Api exposed by vdsm</a>
> This cannot harm, but this index.html is totally useless now, since it is d
the reason was to be consistent with other files exposed by jenkins. The goal 
is to let devs use it from their own file system.
Line 7: <BR/>
Line 8: <a href="functional_tests_stdout.fc23.log">Functional Tests Over Fedora 
23</a>
Line 9: <BR/>
Line 10: <a href="logs.tgz">Download Logs</a>


https://gerrit.ovirt.org/#/c/56387/24/lib/api/Makefile.am
File lib/api/Makefile.am:

Line 49: 
Line 50: vdsm-api.html: schema_to_html.py vdsm-api.yml
Line 51:        @echo "  Generate $@"
Line 52:        chmod u+w $(srcdir)
Line 53:        PYTHONDONTWRITEBYTECODE=1 
PYTHONPATH=$(srcdir)/../:$(srcdir)/../vdsm \
> Why do you need PYTHONDONTWRITEBYTECODE=1?
This is the same command which was used before. I removed it some time ago and 
here is an attempt to restore it.
Line 54:            $(PYTHON) $(srcdir)/schema_to_html.py \


Line 51:        @echo "  Generate $@"
Line 52:        chmod u+w $(srcdir)
Line 53:        PYTHONDONTWRITEBYTECODE=1 
PYTHONPATH=$(srcdir)/../:$(srcdir)/../vdsm \
Line 54:            $(PYTHON) $(srcdir)/schema_to_html.py \
Line 55:                      $(srcdir)/vdsm-api.yml $(srcdir)/$@
> If all the files are in this directory, you don't need to use absolute path
As above


https://gerrit.ovirt.org/#/c/56387/24/lib/api/schema_to_html.py
File lib/api/schema_to_html.py:

Line 22
Line 23
Line 24
Line 25
Line 26
> This is vdsm import, must be imported using:
Done


Line 1: #!/usr/bin/env python
Line 2: #
Line 3: # Copyright (C) 2012 - 2016 Adam Litke, IBM Corporation
> 2012-2016?
Done
Line 4: # Copyright 2016 Red Hat, Inc.
Line 5: #
Line 6: # This program is free software; you can redistribute it and/or modify
Line 7: # it under the terms of the GNU General Public License as published by


Line 21: #
Line 22: 
Line 23: from __future__ import absolute_import
Line 24: 
Line 25: from contextlib import contextmanager
> Move from import under stdlib module imports
Done
Line 26: 
Line 27: import six
Line 28: import sys
Line 29: import vdsmapi


Line 23: from __future__ import absolute_import
Line 24: 
Line 25: from contextlib import contextmanager
Line 26: 
Line 27: import six
> six is 3rd party, not stdlib, should be after the stdlib imports, in a sepa
Done
Line 28: import sys
Line 29: import vdsmapi
Line 30: 
Line 31: html_escape_table = {


https://gerrit.ovirt.org/#/c/56387/24/lib/api/vdsmapi.py
File lib/api/vdsmapi.py:

Line 156:             return self._methods[rep.id]
Line 157:         except KeyError:
Line 158:             raise MethodNotFound(rep.id)
Line 159: 
Line 160:     def get_all_methods(self):
> Should be a property
It should
Line 161:         return self._methods
Line 162: 
Line 163:     def get_type(self, type_name):
Line 164:         try:


Line 165:             return self._types[type_name]
Line 166:         except KeyError:
Line 167:             raise TypeNotFound(type_name)
Line 168: 
Line 169:     def get_all_types(self):
> Should be a property
It should
Line 170:         return self._types
Line 171: 
Line 172:     def _check_primitive_type(self, t, value, name):
Line 173:         condition = PRIMITIVE_TYPES.get(t)


-- 
To view, visit https://gerrit.ovirt.org/56387
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9e0cdd7322b06899a8fb895a5bfee4d2e0e3bc8c
Gerrit-PatchSet: 24
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/admin/lists/[email protected]

Reply via email to