[openstack-dev] [Fuel] Python code in fuel-library
Jay Pipes
jaypipes at gmail.com
Wed Feb 18 13:53:16 UTC 2015
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
More information about the OpenStack-dev
mailing list