Skip to content

Commit

Permalink
Merge pull request #1708 from nexB/111-new-version-notification
Browse files Browse the repository at this point in the history
New version notification #111 #1688

Signed-off-by: Philippe Ombredanne <[email protected]>
  • Loading branch information
pombredanne authored Sep 3, 2019
2 parents 7466489 + 6bb9822 commit 1af5ac8
Show file tree
Hide file tree
Showing 7 changed files with 617 additions and 9 deletions.
26 changes: 20 additions & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,39 @@ jobs:
bin/py.test -n 2 -vvs --reruns=3 --test-suite=all \
--ignore=tests/scancode \
--ignore=tests/cluecode \
--ignore=tests/licensedcode
--ignore=tests/licensedcode \
--cov=src --cov-report=term --cov-report=xml
bin/codecov --token "$CODECOV_TOKEN"
scancode: bin/py.test --reruns=3 -vvs --test-suite=all tests/scancode
scancode: |
bin/py.test --reruns=3 -vvs --test-suite=all tests/scancode \
--cov=src --cov-report=term --cov-report=xml
bin/codecov --token "$CODECOV_TOKEN"
cluecode: bin/py.test -n 2 --reruns=3 -vvs --test-suite=all tests/cluecode
cluecode: |
bin/py.test -n 2 --reruns=3 -vvs --test-suite=all tests/cluecode \
--cov=src --cov-report=term --cov-report=xml
bin/codecov --token "$CODECOV_TOKEN"
license_base: |
bin/py.test -n 2 --reruns=3 -vvs --test-suite=all \
--ignore=tests/licensedcode/test_zzzz_cache.py \
--ignore=tests/licensedcode/test_detection_datadriven1.py \
tests/licensedcode
tests/licensedcode \
--cov=src --cov-report=term --cov-report=xml
bin/codecov --token "$CODECOV_TOKEN"
license_main: |
bin/py.test -n 2 --reruns=3 -vvs --test-suite=all \
tests/licensedcode/test_detection_datadriven1.py
tests/licensedcode/test_detection_datadriven1.py \
--cov=src --cov-report=term --cov-report=xml
bin/codecov --token "$CODECOV_TOKEN"
license_cache: |
bin/py.test -n 2 --reruns=3 -vvs --test-suite=all \
tests/licensedcode/test_zzzz_cache.py
tests/licensedcode/test_zzzz_cache.py \
--cov=src --cov-report=term --cov-report=xml
bin/codecov --token "$CODECOV_TOKEN"
- template: etc/ci/azure-win.yml
parameters:
Expand Down
11 changes: 8 additions & 3 deletions src/scancode/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@ def scancode(ctx, input, # NOQA
Other **kwargs are passed down to plugins as CommandOption indirectly
through Click context machinery.
"""

success = False
try:
# Validate CLI UI options dependencies and other CLI-specific inits
Expand Down Expand Up @@ -513,6 +512,12 @@ def scancode(ctx, input, # NOQA
echo_func=echo_stderr,
*args, **kwargs)

# check for updates
from scancode.outdated import check_scancode_version
outdated = check_scancode_version()
if not quiet and outdated:
echo_stderr(outdated, fg='yellow')

except click.UsageError as e:
# this will exit
raise e
Expand Down Expand Up @@ -1180,7 +1185,7 @@ def scan_codebase(codebase, scanners, processes=1, timeout=DEFAULT_TIMEOUT,
location, rid, scan_errors, scan_time, scan_result, scan_timings = scans.next()
else:
location, rid, scan_errors, scan_time, scan_result, scan_timings = next(scans)

if TRACE_DEEP:
logger_debug(
'scan_codebase: location:', location, 'results:', scan_result)
Expand Down Expand Up @@ -1253,7 +1258,7 @@ def terminate_pool(pool):


def terminate_pool_with_backoff(pool, number_of_trials=3):
# try a few times to terminate,
# try a few times to terminate,
for trial in range(number_of_trials, 1):
try:
pool.terminate()
Expand Down
8 changes: 8 additions & 0 deletions src/scancode/outdated.ABOUT
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
about_resource: outdated.py
name: pip
version: 9974f2
download_url: https://raw.githubusercontent.com/pypa/pip/9974f274e1c86fb556b5d51dcfd2d4dc637b7b67/pip/utils/outdated.py
license: mit
notice_file: outdated.NOTICE
license_text_file: outdated.LICENSE
notes: this code was derived and heavily modified from pip/utils/outdated.py.
20 changes: 20 additions & 0 deletions src/scancode/outdated.LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyright (c) 2008-2014 The pip developers (see outdated.NOTICE file)

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
213 changes: 213 additions & 0 deletions src/scancode/outdated.NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
The following authors have contributed to pip:
Adam Wentz <[email protected]>
Aleks Bunin <[email protected]>
Alex Gaynor <[email protected]>
Alex Grönholm <[email protected]>
Alex Morega <[email protected]>
Alexandre Conrad <[email protected]>
Alli <[email protected]>
Anatoly Techtonik <[email protected]>
Andrei Geacar <[email protected]>
Andrey Bulgakov <[email protected]>
Anrs Hu <[email protected]>
Anton Patrushev <[email protected]>
Antonio Alvarado Hernandez <[email protected]>
Antti Kaihola <[email protected]>
Armin Ronacher <[email protected]>
Ashley Manton <[email protected]>
Baptiste Mispelon <[email protected]>
Ben Darnell <[email protected]>
Ben Rosser <[email protected]>
Bence Nagy <[email protected]>
Berker Peksag <[email protected]>
Bernardo B. Marques <[email protected]>
Bogdan Opanchuk <[email protected]>
Brad Erickson <[email protected]>
Bradley Ayers <[email protected]>
Brian Rosner <[email protected]>
Bruno Renié <[email protected]>
Buck Golemon <[email protected]>
Bussonnier Matthias <[email protected]>
Carl Meyer <[email protected]>
Chris Brinker <[email protected]>
Chris Jerdonek <[email protected]>
Chris McDonough <[email protected]>
Chris Wolfe <[email protected]>
Christian Oudard <[email protected]>
Clark Boylan <[email protected]>
Clay McClure <[email protected]>
Cody Soyland <[email protected]>
Cory Benfield <[email protected]>
Craig Kerstiens <[email protected]>
Cristian Sorinel <[email protected]>
Dan Savilonis <[email protected]>
Dan Sully <[email protected]>
Daniel Collins <[email protected]>
Daniel Hahler <[email protected]>
Daniel Holth <[email protected]>
Daniel Jost <[email protected]>
Daniele Procida <[email protected]>
Dav Clark <[email protected]>
Dave Abrahams <[email protected]>
David Aguilar <[email protected]>
David Black <[email protected]>
David Evans <[email protected]>
David Pursehouse <[email protected]>
David Wales <[email protected]>
Davidovich <[email protected]>
derwolfe <[email protected]>
Dmitry Gladkov <[email protected]>
Donald Stufft <[email protected]>
Dongweiming <[email protected]>
Dwayne Bailey <[email protected]>
Endoh Takanao <[email protected]>
enoch <[email protected]>
Eric Gillingham <[email protected]>
Eric Hanchrow <[email protected]>
Erik M. Bray <[email protected]>
Eugene Vereshchagin <[email protected]>
Florian Briand <[email protected]>
Francesco <[email protected]>
Gabriel de Perthuis <[email protected]>
Garry Polley <[email protected]>
Geoffrey Lehée <[email protected]>
George Song <[email protected]>
Georgi Valkov <[email protected]>
gizmoguy1 <[email protected]>
Guilherme Espada <[email protected]>
Guy Rozendorn <[email protected]>
Herbert Pfennig <[email protected]>
Hsiaoming Yang <[email protected]>
Hugo Lopes Tavares <[email protected]>
Hynek Schlawack <[email protected]>
Ian Bicking <[email protected]>
Ian Cordasco <[email protected]>
Igor Sobreira <[email protected]>
Ilya Baryshev <[email protected]>
INADA Naoki <[email protected]>
Ionel Cristian Mărieș <[email protected]>
Ionel Maries Cristian <[email protected]>
Jakub Stasiak <[email protected]>
Jakub Vysoky <[email protected]>
James Cleveland <[email protected]>
James Polley <[email protected]>
Jan Pokorný <[email protected]>
Jannis Leidel <[email protected]>
jarondl <[email protected]>
Jay Graves <[email protected]>
Jeff Dairiki <[email protected]>
Jim Garrison <[email protected]>
John-Scott Atlakson <[email protected]>
Jon Parise <[email protected]>
Jon Wayne Parrott <[email protected]>
Jonas Nockert <[email protected]>
Jorge Niedbalski <[email protected]>
Joseph Long <[email protected]>
Josh Bronson <[email protected]>
Josh Hansen <[email protected]>
Josh Schneier <[email protected]>
Jyrki Pulliainen <[email protected]>
Kamal Bin Mustafa <[email protected]>
Kelsey Hightower <[email protected]>
Kenneth Belitzky <[email protected]>
Kenneth Reitz <[email protected]>
Kevin Burke <[email protected]>
Kevin Frommelt <[email protected]>
Kumar McMillan <[email protected]>
Kyle Persohn <[email protected]>
Laurent Bristiel <[email protected]>
Leon Sasson <[email protected]>
Lev Givon <[email protected]>
Lincoln de Sousa <[email protected]>
Ludovic Gasc <[email protected]>
Luke Macken <[email protected]>
Marc Abramowitz <[email protected]>
Marc Tamlyn <[email protected]>
Marcus Smith <[email protected]>
Mark Kohler <[email protected]>
Markus Hametner <[email protected]>
Masklinn <[email protected]>
Matej Stuchlik <[email protected]>
Matt Good <[email protected]>
Matt Maker <[email protected]>
Matt Robenolt <[email protected]>
Matthew Einhorn <[email protected]>
Matthew Gilliard <[email protected]>
Matthew Iversen <[email protected]>
Matthew Trumbell <[email protected]>
Maxime Rouyrre <[email protected]>
Michael E. Karpeles <[email protected]>
Michael Williamson <[email protected]>
Miguel Araujo Perez <[email protected]>
Mihir Singh <[email protected]>
MinRK <[email protected]>
Monty Taylor <[email protected]>
Nick Stenning <[email protected]>
Nowell Strite <[email protected]>
Oliver Tonnhofer <[email protected]>
Olivier Girardot <[email protected]>
Ollie Rutherfurd <[email protected]>
Oren Held <[email protected]>
Oscar Benjamin <[email protected]>
Patrick Dubroy <[email protected]>
Patrick Jenkins <[email protected]>
Patrick Lawson <[email protected]>
patricktokeeffe <[email protected]>
Paul Moore <[email protected]>
Paul Nasrat <[email protected]>
Paul Oswald <[email protected]>
Paul van der Linden <[email protected]>
Pawel Jasinski <[email protected]>
Peter Waller <[email protected]>
Phaneendra Chiruvella <[email protected]>
Phil Freo <[email protected]>
Phil Whelan <[email protected]>
Philippe Ombredanne <[email protected]>
Pierre-Yves Rofes <[email protected]>
Piet Delport <[email protected]>
Preston Holmes <[email protected]>
Przemek Wrzos <hetmankp@none>
Qiangning Hong <[email protected]>
Rafael Caricio <[email protected]>
Ralf Schmitt <[email protected]>
Razzi Abuissa <[email protected]>
Remi Rampin <[email protected]>
Rene Dudfield <[email protected]>
Richard Jones <[email protected]>
RobberPhex <[email protected]>
Robert Collins <[email protected]>
Roey Berman <[email protected]>
Roman Bogorodskiy <[email protected]>
Romuald Brunet <[email protected]>
Ronny Pfannschmidt <[email protected]>
Rory McCann <[email protected]>
Ross Brattain <[email protected]>
schlamar <[email protected]>
Sergey Vasilyev <[email protected]>
Seth Woodworth <[email protected]>
Simeon Visser <[email protected]>
Simon Cross <[email protected]>
Stavros Korokithakis <[email protected]>
Stefan Scherfke <[email protected]>
Steven Myint <[email protected]>
Stéphane Klein <[email protected]>
Takayuki SHIMIZUKAWA <[email protected]>
Thomas Fenzl <[email protected]>
Thomas Guettler <[email protected]>
Thomas Johansson <devnull@localhost>
Thomas Kluyver <[email protected]>
Tim Harder <[email protected]>
Tomer Chachamu <[email protected]>
Toshio Kuratomi <[email protected]>
Travis Swicegood <[email protected]>
Valentin Haenel <[email protected]>
Victor Stinner <[email protected]>
Vinay Sajip <[email protected]>
Vitaly Babiy <[email protected]>
W. Trevor King <[email protected]>
Wil Tan <[email protected]>
Xavier Fernandez <[email protected]>
Yoval P <[email protected]>
Yu Jian <[email protected]>
Zearin <[email protected]>
Zhiping Deng <[email protected]>
Loading

0 comments on commit 1af5ac8

Please sign in to comment.