Skip to content

Update Tox, Add MyPy, .pre-commit configurations #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 13 commits into from

Conversation

ProjectCheshire
Copy link
Member

99% consistent with graphene

Copy link

@dan98765 dan98765 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks great! Mostly just questions.

"pytest-benchmark",
"pytest-cov",
"pytest-mock",
"snapshottest",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are all of these really required to run tests? In the before diff there was only pytest.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not all of them, but we weren't running coverage before. (coverage is at 66pct with the current config, which seems low for a graphql python lib)

deps =
pre-commit>0.12.0
setenv =
LC_CTYPE=en_US.UTF-8

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are these 3 environment vars for?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So graphene has the locale set for en US I, I believe, however when running on a system that handles the others (which are preferred) black has issues. I'll dig out the error I had tomorrow that made these go away


[testenv:flake8]
basepython=python3.6
deps = flake8
commands =
pip install -e .

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't usually see pip install in a tox.ini testenv since tox takes care of creating virtualenv for you with the deps specified. I'm not that familiar with this so feel free to ignore this comment, but is there a more tox-y way to do this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so, can we make the same change on graphene? I was referring to that as the source of truth on how to do it :)
https://github.com/graphql-python/graphene/blob/master/tox.ini

@Cito Cito force-pushed the master branch 2 times, most recently from d21bdd4 to c781f01 Compare May 4, 2019 16:37
@jkimbo
Copy link
Member

jkimbo commented Mar 16, 2020

Superseded by #35

@jkimbo jkimbo closed this Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants