django-rest-marshmallow icon indicating copy to clipboard operation
django-rest-marshmallow copied to clipboard

WIP Azure Pipelines trigger (forked)

Open davidzwa opened this issue 5 years ago • 6 comments

Fork and own work on other PR by sloria

davidzwa avatar Apr 12 '20 19:04 davidzwa

So I find the templates given in which refer to job--python-tox quite complex and I notice there is no step to just simply 'install dependencies', which the base pytest-azure-pipelines does automatically.

I see no issue in just using the azure pytest basic template? We can use pytest-lint and something else for the docs. We'd need to find a way to export the coverage and test output artifact, if you are in need of that info.

You should hook up Pypi service when you feel ready for it as it requires editing the Azure project.

davidzwa avatar Apr 12 '20 21:04 davidzwa

@sloria it'd be great to hear your thoughts!

davidzwa avatar Apr 15 '20 20:04 davidzwa

Sorry haven't had a chance to look yet... it'd be great if this could be put in line with the other marshmallow-code repos, i.e. use the same templates.

The idea with the tox jobs is that they use tox to create an virtualenv and install dependencies, rather than installing in the "global" virtual environment. This is very convenient for reproducing issues locally.

sloria avatar Apr 15 '20 20:04 sloria

The tox template fails (I tried) because it misses installing the dependencies of requirements.txt. So I'd need to extend the template, or you'd need to add it to your repo.

I will do the extension, although I am new to it. Nice to learn.

davidzwa avatar Apr 16 '20 09:04 davidzwa

Rather than modify the AP templates, I think the better approach is to bring this project in line with the rest of marshmallow-code, i.e. use setup.py instead of requirements.txt.

Example: https://github.com/marshmallow-code/flask-marshmallow/blob/dev/setup.py#L6-L22

This allows each tox environment to only install the minimum necessary requirements. Note: you'll also need to update tox.ini.

sloria avatar Apr 16 '20 13:04 sloria

I've recovered my energy to work and will look at this tomorrow evening.

davidzwa avatar Apr 22 '20 13:04 davidzwa