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

Lint licenses #1995

Merged
merged 13 commits into from
Jul 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions executor/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,11 @@ clean:

licenses/dep.txt:
go list -m all | cut -d ' ' -f 1 > licenses/dep.txt


lint: licenses/dep.txt
# Check if licenses have changed
git \
--no-pager diff \
--exit-code \
./licenses
20 changes: 19 additions & 1 deletion jenkins-x-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,22 @@ pipelineConfig:
args:
- -C python
- install_dev
- run_linter_check
- lint
- name: lint-operator
agent:
image: seldonio/core-builder:0.15
steps:
- name: lint-operator
command: make
args:
- -C operator
- lint
- name: lint-executor
agent:
image: seldonio/core-builder:0.15
steps:
- name: lint-executor
command: make
args:
- -C executor
- lint
7 changes: 7 additions & 0 deletions operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ show_image:

all: manager

lint: licenses/dep.txt
# Check if licenses have changed
git \
--no-pager diff \
--exit-code \
./licenses

# Run tests
test: generate fmt vet manifests generate-resources
ginkgo -r -outputdir=. -cover -coverprofile=cover.out ./controllers ./utils ./apis
Expand Down
11 changes: 8 additions & 3 deletions python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ install_dev:

.PHONY: licenses
licenses:
tox -e licenses
tox --recreate -e licenses

.PHONY: uninstall
uninstall:
Expand Down Expand Up @@ -95,16 +95,21 @@ push_conda:
setup_linter:
pip install black==19.3b0

run_linter:
fmt:
black \
./ ../testing ../operator/helm ../operator/seldon-operator/hack \
--exclude "(testing/scripts/proto|seldon_core/proto/|.eggs|.tox)"

run_linter_check:
lint: licenses
black \
--check ./ ../testing \
--exclude "(testing/scripts/proto|seldon_core/proto/|.eggs|.tox)"
flake8
# Check if licenses have changed
git \
--no-pager diff \
--exit-code \
./licenses

.PHONY: clean
clean:
Expand Down
10 changes: 5 additions & 5 deletions python/licenses/license.txt
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

cachetools
4.1.0
4.1.1
MIT License
The MIT License (MIT)

Expand Down Expand Up @@ -2717,7 +2717,7 @@ BSD License
UNKNOWN

idna
2.9
2.10
BSD License
License
-------
Expand Down Expand Up @@ -2756,7 +2756,7 @@ modification, are permitted provided that the following conditions are met:


importlib-metadata
1.6.1
1.7.0
Apache Software License
Copyright 2017-2019 Jason R. Coombs, Barry Warsaw

Expand Down Expand Up @@ -4739,7 +4739,7 @@ BSD License
UNKNOWN

seldon-core
1.2.1.dev0
1.2.2.dev0
Apache 2.0
UNKNOWN

Expand Down Expand Up @@ -5558,7 +5558,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


tensorboard-plugin-wit
1.6.0.post3
1.7.0
Apache 2.0
UNKNOWN

Expand Down
10 changes: 5 additions & 5 deletions python/licenses/license_info.csv
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"azure-common","1.1.25","MIT License"
"azure-storage-blob","2.1.0","MIT License"
"azure-storage-common","2.1.0","MIT License"
"cachetools","4.1.0","MIT License"
"cachetools","4.1.1","MIT License"
"certifi","2020.6.20","Mozilla Public License 2.0 (MPL 2.0)"
"cffi","1.14.0","MIT License"
"chardet","3.0.4","GNU Library or Lesser General Public License (LGPL)"
Expand All @@ -35,8 +35,8 @@
"grpcio-opentracing","1.1.4","Apache Software License"
"gunicorn","20.0.4","MIT License"
"h5py","2.10.0","BSD License"
"idna","2.9","BSD License"
"importlib-metadata","1.6.1","Apache Software License"
"idna","2.10","BSD License"
"importlib-metadata","1.7.0","Apache Software License"
"itsdangerous","1.1.0","BSD License"
"jaeger-client","4.1.0","Apache Software License"
"jsonschema","3.2.0","MIT License"
Expand All @@ -58,10 +58,10 @@
"requests-oauthlib","1.3.0","BSD License"
"rsa","4.6","Apache Software License"
"scipy","1.4.1","BSD License"
"seldon-core","1.2.1.dev0","Apache 2.0"
"seldon-core","1.2.2.dev0","Apache 2.0"
"six","1.15.0","MIT License"
"tensorboard","2.2.2","Apache Software License"
"tensorboard-plugin-wit","1.6.0.post3","Apache 2.0"
"tensorboard-plugin-wit","1.7.0","Apache 2.0"
"tensorflow","2.2.0","Apache Software License"
"tensorflow-estimator","2.2.0","Apache Software License"
"termcolor","1.1.0","MIT License"
Expand Down
3 changes: 2 additions & 1 deletion python/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ statistics = True

[tox:tox]
envlist =
py
py3
tensorflow
gcs
all
Expand All @@ -32,6 +32,7 @@ extras = gcs
extras = all

[testenv:licenses]
basepython = python3
deps =
pip-licenses
extras = all
Expand Down