graphql-python/graphene-sqlalchemy

Simplify installation and add tests to examples

Cito opened this issue · 3 comments

Cito commented

We should replace requirements.txt with a Pipfile to make the installation of the examples even easier with Pipenv (the READMEs the should be adapted, too).

And we should add tests for the examples (e.g. running this default_query) that can be run with Travis so we notice when this breaks again, and that also demonstrate how the example servers can be consumed by a client.

Note: a lot of things are possible with setup.cfg and it's possible to automatically install packages when running virtualenv venv, base one the [Install] section.

So maybe we could also just use this "less opinionated" tool ?

(I love pipenv, but I feel, in the "current" conflict between pyproject.toml and setup.cfg, that this last one need a boost of popularity, so ... ;))

Cito commented

Actually pipenv uses neither setup.cfg nor pyproject.toml, but Pipfiles. The advantage of pipenv is that you don't need to explicitly setup a virtualenv, you just say pipenv install and then pipenv run app.py. For installing applications, like these example apps, Pipenv seems to be the right tool. But I'm not really up to date with Python packaging and find it all confusing.

@Cito I've loved pipenv. I use it for all my projects. One approach I've seen is also to dockerize examples. (that would probably be overkill for trivial examples)

I feel like pipenv is suited for instances and examples and setup / venv is more library packaging.

I'm possibly not completely up to date, either