Skip to content
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

[4.6] Improve output when parsing an ini configuration fails (#5650) #5652

Merged
merged 2 commits into from
Aug 1, 2019

Conversation

nicoddemus
Copy link
Member

Backport of #5650

Improve output when parsing an ini configuration fails
@nicoddemus
Copy link
Member Author

@RonnyPfannschmidt, any hints why setuptools-scm is producing pytest-0.1.dev57+g28ddc62?

.package create: /home/travis/build/pytest-dev/pytest/.tox/.package
.package installdeps: setuptools>=40.0, setuptools-scm, wheel
py36-xdist create: /home/travis/build/pytest-dev/pytest/.tox/py36-xdist
py36-xdist installdeps: pytest-xdist>=1.13
py36-xdist inst: /home/travis/build/pytest-dev/pytest/.tox/.tmp/package/1/pytest-0.1.dev57+g28ddc62.tar.gz
py36-xdist installed: apipkg==1.5,argcomplete==1.10.0,atomicwrites==1.3.0,attrs==19.1.0,certifi==2019.6.16,chardet==3.0.4,execnet==1.6.1,hypothesis==4.32.2,idna==2.8,importlib-metadata==0.19,more-itertools==7.2.0,nose==1.3.7,packaging==19.1,pluggy==0.12.0,py==1.8.0,pyparsing==2.4.2,pytest==0.1.dev57+g28ddc62,pytest-forked==1.0.2,pytest-xdist==1.29.0,requests==2.22.0,six==1.12.0,urllib3==1.25.3,wcwidth==0.1.7,zipp==0.5.2

@asottile
Copy link
Member

asottile commented Aug 1, 2019

the failure here is weird, did travis not fetch tags properly (or are there too many commits for setuptools-scm to find a closest?)

@blueyed
Copy link
Contributor

blueyed commented Aug 1, 2019

Related: pypa/setuptools-scm@2555a9f (but not released) - shows what it does though.

@RonnyPfannschmidt
Copy link
Member

@nicoddemus i vaugely recall travis adds only about 50 commits by default, which is a problem in some cases like this one

@RonnyPfannschmidt
Copy link
Member

https://travis-ci.org/pytest-dev/pytest/jobs/562618711#L160 <- depth of 50 - its lacking, i recall that travis has no describe equivalent so we are in a blind here

@RonnyPfannschmidt
Copy link
Member

@codecov
Copy link

codecov bot commented Aug 1, 2019

Codecov Report

Merging #5652 into 4.6-maintenance will increase coverage by 0.28%.
The diff coverage is 100%.

Impacted file tree graph

@@                 Coverage Diff                 @@
##           4.6-maintenance    #5652      +/-   ##
===================================================
+ Coverage            95.91%   96.19%   +0.28%     
===================================================
  Files                  115      115              
  Lines                26504    26512       +8     
  Branches              2613     2613              
===================================================
+ Hits                 25420    25502      +82     
+ Misses                 757      704      -53     
+ Partials               327      306      -21
Impacted Files Coverage Δ
src/_pytest/config/findpaths.py 95.14% <100%> (+1.14%) ⬆️
testing/test_config.py 99.83% <100%> (+0.33%) ⬆️
src/_pytest/fixtures.py 97.55% <0%> (+0.27%) ⬆️
testing/test_capture.py 99.25% <0%> (+0.29%) ⬆️
testing/test_terminal.py 99.84% <0%> (+0.31%) ⬆️
testing/test_pdb.py 99.22% <0%> (+0.38%) ⬆️
src/_pytest/pytester.py 91.66% <0%> (+0.42%) ⬆️
src/_pytest/assertion/rewrite.py 95.77% <0%> (+0.48%) ⬆️
testing/python/fixtures.py 99.09% <0%> (+0.56%) ⬆️
... and 13 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 459c5f4...2e345fd. Read the comment docs.

@nicoddemus
Copy link
Member Author

Done, if that works, we should cherry-pick it to master.

@nicoddemus
Copy link
Member Author

SIGH

setuptools-scm needs all tags to guess the version correctly
@asottile
Copy link
Member

asottile commented Aug 1, 2019

that's pretty unfortunate :/

though, I wonder the trade off on how much time shallow cloning saves vs the features setuptools-scm gives us (I'm not familiar with them enough to make a call here)

@nicoddemus
Copy link
Member Author

How much time does shallow cloning saves us?

setuptools-scm helps us with have a new version automatically just by pushing a tag, which I enjoy immensely.

@nicoddemus nicoddemus merged commit 829941a into pytest-dev:4.6-maintenance Aug 1, 2019
@nicoddemus nicoddemus deleted the backport-5650 branch August 1, 2019 15:28
@@ -13,6 +13,10 @@ env:
global:
- PYTEST_ADDOPTS=-vv

# setuptools-scm needs all tags in order to obtain a proper version
git:
depth: false
Copy link
Contributor

Choose a reason for hiding this comment

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

You could still limit it to 1000.
The default is 50.
Having additional merge commits for single commit changes (or even 5+ "updated X" commits for what should be a single commit, because you cannot easily squash-merge certainly does not help here ;))

But to be fair: for a stable branch it is easy to get away 50+ commits anyway.

@blueyed
Copy link
Contributor

blueyed commented Aug 15, 2019

setuptools-scm helps us with have a new version automatically just by pushing a tag, which I enjoy immensely.

FWIW I find https://github.com/zsimic/setupmeta/ to be even greater (with the same limitations here probably though).

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