Remove all configuration from Tox file #165

Merged
witten merged 2 commits from :cifix/tox-remove-config into master 2019-05-14 16:45:24 +00:00
Contributor

This puts tool configuration in their familiar and standard locations and simplifies the Tox configuration to just laying out the environments and factors.

This also allows users who do not want to deal with overhead of Tox (for whatever reasons ...) to run pytest/black/etc. and have the same behaviour.

This puts tool configuration in their familiar and standard locations and simplifies the Tox configuration to just laying out the environments and factors. This also allows users who do not want to deal with overhead of Tox (for whatever reasons ...) to run pytest/black/etc. and have the same behaviour.
Author
Contributor

Opened up witten/borgmatic#166 for a discussion on "officially" supporting more versions.

Opened up https://projects.torsion.org/witten/borgmatic/issues/166 for a discussion on "officially" supporting more versions.
Author
Contributor

CI failure is quite an annoying ...

Obtaining file:///drone/src/projects.torsion.org/witten/borgmatic
ERROR: Error installing 'file:///drone/src/projects.torsion.org/witten/borgmatic': editable mode is not supported for pyproject.toml-style projects. pip is processing this project as pyproject.toml-style because it has a pyproject.toml file. Since the project has a setup.py and the pyproject.toml has no "build-backend" key for the "build_system" value, you may pass --no-use-pep517 to opt out of pyproject.toml-style processing. See PEP 517 for details on pyproject.toml-style projects.

See https://github.com/pypa/pip/issues/6434.

I'll add the recommended work-around.

CI failure is quite an annoying ... > Obtaining file:///drone/src/projects.torsion.org/witten/borgmatic ERROR: Error installing 'file:///drone/src/projects.torsion.org/witten/borgmatic': editable mode is not supported for pyproject.toml-style projects. pip is processing this project as pyproject.toml-style because it has a pyproject.toml file. Since the project has a setup.py and the pyproject.toml has no "build-backend" key for the "build_system" value, you may pass --no-use-pep517 to opt out of pyproject.toml-style processing. See PEP 517 for details on pyproject.toml-style projects. See https://github.com/pypa/pip/issues/6434. I'll add the recommended work-around.
witten reviewed 2019-05-13 23:56:49 +00:00
@ -0,0 +1,4 @@
[tool.black]
line-length = 100
target-version = ['py37']
Owner

Doesn't that mean the output formatted files will only support Python 3.7? I think the default behavior when this option is omitted is probably fine. From the black docs: "default: per-file auto-detection". Alternatively, if that's not good enough, 'py35' probably works as a target version here.

Doesn't that mean the output formatted files will only support Python 3.7? I think the default behavior when this option is omitted is probably fine. From the [black docs](https://github.com/python/black#command-line-options): "default: per-file auto-detection". Alternatively, if that's not good enough, 'py35' probably works as a target version here.
@ -0,0 +1,4 @@
[tool.black]
line-length = 100
target-version = ['py37']
skip-string-normalization = true
Owner

What on Earth is a pyproject.toml file? Seems like I'm not the first person to ask that question.

What on Earth is a `pyproject.toml` file? [Seems like I'm not the first person to ask that question.](https://github.com/python/black#what-on-earth-is-a-pyprojecttoml-file)
Author
Contributor

hehe ... "the future" apparently ...

hehe ... "the future" apparently ...
Owner

Thank you so much for doing this! Looks like a good improvement.

Thank you so much for doing this! Looks like a good improvement.
Author
Contributor

Cool! Comments addressed 👍

Cool! Comments addressed :thumbsup:
witten closed this pull request 2019-05-14 16:45:24 +00:00
decentral1se deleted branch cifix/tox-remove-config 2019-05-14 16:57:43 +00:00
Owner

See https://github.com/pypa/pip/issues/6434.

I’ll add the recommended work-around.

Looks like the work-around doesn't work on older versions of pip:

$ pip --version
pip 19.0.3 from /usr/lib/python3.7/site-packages/pip (python 3.7)
$ tox -r
py3 create: /home/witten/code/borgmatic/.tox/py3
py3 installdeps: -rtest_requirements.txt
ERROR: invocation failed (exit code 2), logfile: /home/witten/code/borgmatic/.tox/py3/log/py3-1.log
=================================================================== log start ====================================================================

Usage:   
  /home/witten/code/borgmatic/.tox/py3/bin/python -m pip install [options] <requirement specifier> [package-index-options] ...
  /home/witten/code/borgmatic/.tox/py3/bin/python -m pip install [options] -r <requirements file> [package-index-options] ...
  /home/witten/code/borgmatic/.tox/py3/bin/python -m pip install [options] [-e] <vcs project url> ...
  /home/witten/code/borgmatic/.tox/py3/bin/python -m pip install [options] [-e] <local project path> ...
  /home/witten/code/borgmatic/.tox/py3/bin/python -m pip install [options] <archive url/path> ...

no such option: --no-use-pep517
...
> See https://github.com/pypa/pip/issues/6434. > I’ll add the recommended work-around. Looks like the work-around doesn't work on older versions of pip: ``` $ pip --version pip 19.0.3 from /usr/lib/python3.7/site-packages/pip (python 3.7) $ tox -r py3 create: /home/witten/code/borgmatic/.tox/py3 py3 installdeps: -rtest_requirements.txt ERROR: invocation failed (exit code 2), logfile: /home/witten/code/borgmatic/.tox/py3/log/py3-1.log =================================================================== log start ==================================================================== Usage: /home/witten/code/borgmatic/.tox/py3/bin/python -m pip install [options] <requirement specifier> [package-index-options] ... /home/witten/code/borgmatic/.tox/py3/bin/python -m pip install [options] -r <requirements file> [package-index-options] ... /home/witten/code/borgmatic/.tox/py3/bin/python -m pip install [options] [-e] <vcs project url> ... /home/witten/code/borgmatic/.tox/py3/bin/python -m pip install [options] [-e] <local project path> ... /home/witten/code/borgmatic/.tox/py3/bin/python -m pip install [options] <archive url/path> ... no such option: --no-use-pep517 ... ```
Author
Contributor

Hmmmm ... some notes in https://pypi.org/project/tox-pip-version/.

Do you expose VIRTUALENV_NO_DOWNLOAD=1? It should get the latest ...

Hmmmm ... some notes in https://pypi.org/project/tox-pip-version/. Do you expose `VIRTUALENV_NO_DOWNLOAD=1`? It should get the latest ...
Owner

Not using VIRTUALENV_NO_DOWNLOAD. I thought any given virtualenv pins a particular version of pip?

Not using `VIRTUALENV_NO_DOWNLOAD`. I thought any given virtualenv pins a particular version of pip?
Owner

Well, it's not pretty, but this appears to work: witten/borgmatic#175

Well, it's not pretty, but this appears to work: https://projects.torsion.org/witten/borgmatic/pulls/175
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#165
No description provided.