Skip to content

Commit 1af5ac8

Browse files
authored
Merge pull request #1708 from nexB/111-new-version-notification
New version notification #111 #1688 Signed-off-by: Philippe Ombredanne <[email protected]>
2 parents 7466489 + 6bb9822 commit 1af5ac8

File tree

7 files changed

+617
-9
lines changed

7 files changed

+617
-9
lines changed

azure-pipelines.yml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,39 @@ jobs:
1515
bin/py.test -n 2 -vvs --reruns=3 --test-suite=all \
1616
--ignore=tests/scancode \
1717
--ignore=tests/cluecode \
18-
--ignore=tests/licensedcode
18+
--ignore=tests/licensedcode \
19+
--cov=src --cov-report=term --cov-report=xml
20+
bin/codecov --token "$CODECOV_TOKEN"
1921
20-
scancode: bin/py.test --reruns=3 -vvs --test-suite=all tests/scancode
22+
scancode: |
23+
bin/py.test --reruns=3 -vvs --test-suite=all tests/scancode \
24+
--cov=src --cov-report=term --cov-report=xml
25+
bin/codecov --token "$CODECOV_TOKEN"
2126
22-
cluecode: bin/py.test -n 2 --reruns=3 -vvs --test-suite=all tests/cluecode
27+
cluecode: |
28+
bin/py.test -n 2 --reruns=3 -vvs --test-suite=all tests/cluecode \
29+
--cov=src --cov-report=term --cov-report=xml
30+
bin/codecov --token "$CODECOV_TOKEN"
2331
2432
license_base: |
2533
bin/py.test -n 2 --reruns=3 -vvs --test-suite=all \
2634
--ignore=tests/licensedcode/test_zzzz_cache.py \
2735
--ignore=tests/licensedcode/test_detection_datadriven1.py \
28-
tests/licensedcode
36+
tests/licensedcode \
37+
--cov=src --cov-report=term --cov-report=xml
38+
bin/codecov --token "$CODECOV_TOKEN"
2939
3040
license_main: |
3141
bin/py.test -n 2 --reruns=3 -vvs --test-suite=all \
32-
tests/licensedcode/test_detection_datadriven1.py
42+
tests/licensedcode/test_detection_datadriven1.py \
43+
--cov=src --cov-report=term --cov-report=xml
44+
bin/codecov --token "$CODECOV_TOKEN"
3345
3446
license_cache: |
3547
bin/py.test -n 2 --reruns=3 -vvs --test-suite=all \
36-
tests/licensedcode/test_zzzz_cache.py
48+
tests/licensedcode/test_zzzz_cache.py \
49+
--cov=src --cov-report=term --cov-report=xml
50+
bin/codecov --token "$CODECOV_TOKEN"
3751
3852
- template: etc/ci/azure-win.yml
3953
parameters:

src/scancode/cli.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,6 @@ def scancode(ctx, input, # NOQA
483483
Other **kwargs are passed down to plugins as CommandOption indirectly
484484
through Click context machinery.
485485
"""
486-
487486
success = False
488487
try:
489488
# Validate CLI UI options dependencies and other CLI-specific inits
@@ -513,6 +512,12 @@ def scancode(ctx, input, # NOQA
513512
echo_func=echo_stderr,
514513
*args, **kwargs)
515514

515+
# check for updates
516+
from scancode.outdated import check_scancode_version
517+
outdated = check_scancode_version()
518+
if not quiet and outdated:
519+
echo_stderr(outdated, fg='yellow')
520+
516521
except click.UsageError as e:
517522
# this will exit
518523
raise e
@@ -1180,7 +1185,7 @@ def scan_codebase(codebase, scanners, processes=1, timeout=DEFAULT_TIMEOUT,
11801185
location, rid, scan_errors, scan_time, scan_result, scan_timings = scans.next()
11811186
else:
11821187
location, rid, scan_errors, scan_time, scan_result, scan_timings = next(scans)
1183-
1188+
11841189
if TRACE_DEEP:
11851190
logger_debug(
11861191
'scan_codebase: location:', location, 'results:', scan_result)
@@ -1253,7 +1258,7 @@ def terminate_pool(pool):
12531258

12541259

12551260
def terminate_pool_with_backoff(pool, number_of_trials=3):
1256-
# try a few times to terminate,
1261+
# try a few times to terminate,
12571262
for trial in range(number_of_trials, 1):
12581263
try:
12591264
pool.terminate()

src/scancode/outdated.ABOUT

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
about_resource: outdated.py
2+
name: pip
3+
version: 9974f2
4+
download_url: https://raw.githubusercontent.com/pypa/pip/9974f274e1c86fb556b5d51dcfd2d4dc637b7b67/pip/utils/outdated.py
5+
license: mit
6+
notice_file: outdated.NOTICE
7+
license_text_file: outdated.LICENSE
8+
notes: this code was derived and heavily modified from pip/utils/outdated.py.

src/scancode/outdated.LICENSE

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2008-2014 The pip developers (see outdated.NOTICE file)
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be
12+
included in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

src/scancode/outdated.NOTICE

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
The following authors have contributed to pip:
2+
Adam Wentz <[email protected]>
3+
Aleks Bunin <[email protected]>
4+
Alex Gaynor <[email protected]>
5+
Alex Grönholm <[email protected]>
6+
Alex Morega <[email protected]>
7+
Alexandre Conrad <[email protected]>
8+
9+
Anatoly Techtonik <[email protected]>
10+
Andrei Geacar <[email protected]>
11+
Andrey Bulgakov <[email protected]>
12+
13+
Anton Patrushev <[email protected]>
14+
Antonio Alvarado Hernandez <[email protected]>
15+
Antti Kaihola <[email protected]>
16+
Armin Ronacher <[email protected]>
17+
Ashley Manton <[email protected]>
18+
Baptiste Mispelon <[email protected]>
19+
Ben Darnell <[email protected]>
20+
Ben Rosser <[email protected]>
21+
Bence Nagy <[email protected]>
22+
Berker Peksag <[email protected]>
23+
Bernardo B. Marques <[email protected]>
24+
Bogdan Opanchuk <[email protected]>
25+
Brad Erickson <[email protected]>
26+
Bradley Ayers <[email protected]>
27+
Brian Rosner <[email protected]>
28+
Bruno Renié <[email protected]>
29+
Buck Golemon <[email protected]>
30+
Bussonnier Matthias <[email protected]>
31+
Carl Meyer <[email protected]>
32+
Chris Brinker <[email protected]>
33+
Chris Jerdonek <[email protected]>
34+
Chris McDonough <[email protected]>
35+
Chris Wolfe <[email protected]>
36+
Christian Oudard <[email protected]>
37+
Clark Boylan <[email protected]>
38+
Clay McClure <[email protected]>
39+
Cody Soyland <[email protected]>
40+
Cory Benfield <[email protected]>
41+
Craig Kerstiens <[email protected]>
42+
Cristian Sorinel <[email protected]>
43+
Dan Savilonis <[email protected]>
44+
Dan Sully <[email protected]>
45+
Daniel Collins <[email protected]>
46+
Daniel Hahler <[email protected]>
47+
Daniel Holth <[email protected]>
48+
Daniel Jost <[email protected]>
49+
Daniele Procida <[email protected]>
50+
Dav Clark <[email protected]>
51+
Dave Abrahams <[email protected]>
52+
David Aguilar <[email protected]>
53+
David Black <[email protected]>
54+
David Evans <[email protected]>
55+
David Pursehouse <[email protected]>
56+
David Wales <[email protected]>
57+
Davidovich <[email protected]>
58+
59+
Dmitry Gladkov <[email protected]>
60+
Donald Stufft <[email protected]>
61+
Dongweiming <[email protected]>
62+
Dwayne Bailey <[email protected]>
63+
Endoh Takanao <[email protected]>
64+
65+
Eric Gillingham <[email protected]>
66+
Eric Hanchrow <[email protected]>
67+
Erik M. Bray <[email protected]>
68+
Eugene Vereshchagin <[email protected]>
69+
Florian Briand <[email protected]>
70+
Francesco <[email protected]>
71+
Gabriel de Perthuis <[email protected]>
72+
Garry Polley <[email protected]>
73+
Geoffrey Lehée <[email protected]>
74+
George Song <[email protected]>
75+
Georgi Valkov <[email protected]>
76+
gizmoguy1 <[email protected]>
77+
Guilherme Espada <[email protected]>
78+
Guy Rozendorn <[email protected]>
79+
Herbert Pfennig <[email protected]>
80+
Hsiaoming Yang <[email protected]>
81+
Hugo Lopes Tavares <[email protected]>
82+
Hynek Schlawack <[email protected]>
83+
Ian Bicking <[email protected]>
84+
Ian Cordasco <[email protected]>
85+
Igor Sobreira <[email protected]>
86+
Ilya Baryshev <[email protected]>
87+
INADA Naoki <[email protected]>
88+
Ionel Cristian Mărieș <[email protected]>
89+
Ionel Maries Cristian <[email protected]>
90+
Jakub Stasiak <[email protected]>
91+
Jakub Vysoky <[email protected]>
92+
James Cleveland <[email protected]>
93+
James Polley <[email protected]>
94+
Jan Pokorný <[email protected]>
95+
Jannis Leidel <[email protected]>
96+
97+
Jay Graves <[email protected]>
98+
Jeff Dairiki <[email protected]>
99+
Jim Garrison <[email protected]>
100+
John-Scott Atlakson <[email protected]>
101+
Jon Parise <[email protected]>
102+
Jon Wayne Parrott <[email protected]>
103+
Jonas Nockert <[email protected]>
104+
Jorge Niedbalski <[email protected]>
105+
Joseph Long <[email protected]>
106+
Josh Bronson <[email protected]>
107+
Josh Hansen <[email protected]>
108+
Josh Schneier <[email protected]>
109+
Jyrki Pulliainen <[email protected]>
110+
Kamal Bin Mustafa <[email protected]>
111+
Kelsey Hightower <[email protected]>
112+
Kenneth Belitzky <[email protected]>
113+
Kenneth Reitz <[email protected]>
114+
Kevin Burke <[email protected]>
115+
Kevin Frommelt <[email protected]>
116+
Kumar McMillan <[email protected]>
117+
Kyle Persohn <[email protected]>
118+
Laurent Bristiel <[email protected]>
119+
Leon Sasson <[email protected]>
120+
Lev Givon <[email protected]>
121+
Lincoln de Sousa <[email protected]>
122+
Ludovic Gasc <[email protected]>
123+
Luke Macken <[email protected]>
124+
Marc Abramowitz <[email protected]>
125+
Marc Tamlyn <[email protected]>
126+
Marcus Smith <[email protected]>
127+
Mark Kohler <[email protected]>
128+
Markus Hametner <[email protected]>
129+
130+
Matej Stuchlik <[email protected]>
131+
Matt Good <[email protected]>
132+
Matt Maker <[email protected]>
133+
Matt Robenolt <[email protected]>
134+
Matthew Einhorn <[email protected]>
135+
Matthew Gilliard <[email protected]>
136+
Matthew Iversen <[email protected]>
137+
Matthew Trumbell <[email protected]>
138+
Maxime Rouyrre <[email protected]>
139+
Michael E. Karpeles <[email protected]>
140+
Michael Williamson <[email protected]>
141+
Miguel Araujo Perez <[email protected]>
142+
Mihir Singh <[email protected]>
143+
144+
Monty Taylor <[email protected]>
145+
Nick Stenning <[email protected]>
146+
Nowell Strite <[email protected]>
147+
Oliver Tonnhofer <[email protected]>
148+
Olivier Girardot <[email protected]>
149+
Ollie Rutherfurd <[email protected]>
150+
Oren Held <[email protected]>
151+
Oscar Benjamin <[email protected]>
152+
Patrick Dubroy <[email protected]>
153+
Patrick Jenkins <[email protected]>
154+
Patrick Lawson <[email protected]>
155+
patricktokeeffe <[email protected]>
156+
Paul Moore <[email protected]>
157+
Paul Nasrat <[email protected]>
158+
Paul Oswald <[email protected]>
159+
Paul van der Linden <[email protected]>
160+
Pawel Jasinski <[email protected]>
161+
Peter Waller <[email protected]>
162+
Phaneendra Chiruvella <[email protected]>
163+
Phil Freo <[email protected]>
164+
Phil Whelan <[email protected]>
165+
Philippe Ombredanne <[email protected]>
166+
Pierre-Yves Rofes <[email protected]>
167+
Piet Delport <[email protected]>
168+
Preston Holmes <[email protected]>
169+
Przemek Wrzos <hetmankp@none>
170+
Qiangning Hong <[email protected]>
171+
Rafael Caricio <[email protected]>
172+
Ralf Schmitt <[email protected]>
173+
Razzi Abuissa <[email protected]>
174+
Remi Rampin <[email protected]>
175+
Rene Dudfield <[email protected]>
176+
Richard Jones <[email protected]>
177+
RobberPhex <[email protected]>
178+
Robert Collins <[email protected]>
179+
Roey Berman <[email protected]>
180+
Roman Bogorodskiy <[email protected]>
181+
Romuald Brunet <[email protected]>
182+
Ronny Pfannschmidt <[email protected]>
183+
Rory McCann <[email protected]>
184+
Ross Brattain <[email protected]>
185+
186+
Sergey Vasilyev <[email protected]>
187+
Seth Woodworth <[email protected]>
188+
Simeon Visser <[email protected]>
189+
Simon Cross <[email protected]>
190+
Stavros Korokithakis <[email protected]>
191+
Stefan Scherfke <[email protected]>
192+
Steven Myint <[email protected]>
193+
Stéphane Klein <[email protected]>
194+
Takayuki SHIMIZUKAWA <[email protected]>
195+
Thomas Fenzl <[email protected]>
196+
Thomas Guettler <[email protected]>
197+
Thomas Johansson <devnull@localhost>
198+
Thomas Kluyver <[email protected]>
199+
Tim Harder <[email protected]>
200+
Tomer Chachamu <[email protected]>
201+
Toshio Kuratomi <[email protected]>
202+
Travis Swicegood <[email protected]>
203+
Valentin Haenel <[email protected]>
204+
Victor Stinner <[email protected]>
205+
Vinay Sajip <[email protected]>
206+
Vitaly Babiy <[email protected]>
207+
W. Trevor King <[email protected]>
208+
209+
Xavier Fernandez <[email protected]>
210+
211+
212+
213+
Zhiping Deng <[email protected]>

0 commit comments

Comments
 (0)