[openstack-dev] [Fuel] Python code in fuel-library

Aleksandr Didenko adidenko at mirantis.com
Wed Feb 18 15:01:04 UTC 2015


Hi,

I agree that we need a better testing for python tasks/code. There should
be no problems adding py.test tests into fuel-library CI, we already have
one [1] up and running. So I'm all in and ready to help with such testing
implementation.

[1] https://fuel-jenkins.mirantis.com/job/fuellib_tasks_graph_check/

Regards,
Aleksandr

On Wed, Feb 18, 2015 at 4:02 PM, Vladimir Kuklin <vkuklin at mirantis.com>
wrote:

> Hi, Seb
>
> Very fair point, thank you. We need to add this to our jobs for unittests
> run and syntax check. I am adding Aleksandr Didenko into the loop as he is
> currently working on the similar task.
>
> On Wed, Feb 18, 2015 at 4:53 PM, Jay Pipes <jaypipes at gmail.com> wrote:
>
>> On 02/18/2015 04:57 AM, Sebastian Kalinowski wrote:
>>
>>> Hello Fuelers,
>>>
>>> There is more and more Python code appearing in fuel-library [1] that is
>>> used in our Puppet manifests. Now, with introduction of Granular
>>> Deployment feature it could appear more often as
>>> writing some tasks as a Python script is a nice option.
>>>
>>> First problem that I see is that in some cases this code is getting
>>> merged without a positive review from a Python developer from Fuel team.
>>> My proposition of the solution is simple:
>>> fuel-library core reviewers shouldn't merge such code if there is no a
>>> +1 from a Python developer from fuel-core group [2].
>>>
>>> Second problem is that there are no automatic tests for this code.
>>> Testing it manually and by running deployment when that code is used is
>>> not enough since those scripts could be quite large and complicated and
>>> some of them are executed in specific situations so it is hard for
>>> reviewers to check how they will work.
>>> In fuel-library we already have tests for Puppet modules: [3].
>>> I suggest that we should introduce similar checks for Python code:
>>>   - there will be one global 'test-requirements.txt' file (if there will
>>> be a need to, we could introduce more granular split, like per module)
>>>   - py.test [4] will be used as a test runner
>>>   - (optional, but advised) flake8+hacking checks [5] (could be limited
>>> to just run flake8/pyflakes checks)
>>>
>>> Looking forward to your opinions on those two issues.
>>>
>>
>> Hi Seba,
>>
>> All those suggestions look fine to me. I'd also add to improve the
>> documentation on how to write and run Python tests to help out those
>> developers who are not as familiar with Python as Ruby or other languages.
>>
>> Best,
>> -jay
>>
>> ____________________________________________________________
>> ______________
>> OpenStack Development Mailing List (not for usage questions)
>> Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:
>> unsubscribe
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>>
>
>
>
> --
> Yours Faithfully,
> Vladimir Kuklin,
> Fuel Library Tech Lead,
> Mirantis, Inc.
> +7 (495) 640-49-04
> +7 (926) 702-39-68
> Skype kuklinvv
> 45bk3, Vorontsovskaya Str.
> Moscow, Russia,
> www.mirantis.com <http://www.mirantis.ru/>
> www.mirantis.ru
> vkuklin at mirantis.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150218/4c2204d6/attachment.html>


More information about the OpenStack-dev mailing list