-
Notifications
You must be signed in to change notification settings - Fork 38
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
chore: tweak configs to match pyramid #89
Conversation
Suppress warnings where possible (some still emitted by 'build', but they match those from Pyramid).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left inline comments.
$ python3 -m venv env | ||
$ env/bin/pip install -e .[docs,testing] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't install a local copy. I don't during dev. tox
will install and run tests in their own virtualenvs across the supported versions of Python.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lots of development requires being able to do things like set breakpoints in code to examine state: this environment is intended to support that, not automated testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even within a tox
run you can set breakpoints and the like, and now you are actually testing what the end result will be (a wheel) vs potential other things that are in the python path because of the directory you are in. I know we switched to src directory on purpose, but tox makes it cleaner and easier to not accidentally be testing/validating something that is not the same as what will be tested in CI/CD.
|
||
4. Create a branch for local development:: | ||
|
||
$ git checkout -b name-of-your-bugfix-or-feature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ git checkout -b name-of-your-bugfix-or-feature | |
$ git switch -c name-of-your-bugfix-or-feature |
Using git checkout
is not recommend by git
anymore due to confusion related to what it means to do a checkout
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you point me to a reference for that recommendation? The basic branching and merging chapter of the official git book still uses checkout -b
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://linuxhandbook.com/git-switch-checkout/
https://git-scm.com/docs/git-switch
git switch was explicitly added to stop confusion around what "checkout" does since checkout was overloaded.
|
||
To run a subset of tests:: | ||
|
||
$ env/bin/py.test tests.test_venusian |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tox -e py38 -- tests.test_venusian
Will do the same thing, and doesn't require a local installation that may be out of date, and will cause tox to update the right versions of dependencies and the like.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above: I don't use tox
this way, but always have a separate virtual env for actual development. The fact that tox does not install a development copy is the entire point of having a virtual env which does.
Suppress warnings where possible (some still emitted by 'build', but they match those from Pyramid).
Discovered while chasing down local tox failures on my machine.