diff --git a/Makefile b/Makefile index 08a45dc..ed2c33e 100644 --- a/Makefile +++ b/Makefile @@ -29,8 +29,13 @@ build-dep-fed: python3-boto3 \ python3-lxml -test: -# TODO: add tests +test: copyright + +.PHONY: copyright +copyright: + $(eval MISSING_COPYRIGHT := $(shell git ls-files "*.py" | xargs grep -EL "Copyright \(c\) 20.* Aiven|Aiven license OK")) + @if [ "$(MISSING_COPYRIGHT)" != "" ]; then echo Missing Copyright statement in files: $(MISSING_COPYRIGHT) ; false; fi + unittest: $(generated) $(PYTHON) -m pytest $(PYTEST_ARG) test/ diff --git a/rpm_s3_mirror/__init__.py b/rpm_s3_mirror/__init__.py index e69de29..dc47a8d 100644 --- a/rpm_s3_mirror/__init__.py +++ b/rpm_s3_mirror/__init__.py @@ -0,0 +1 @@ +# Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/ diff --git a/rpm_s3_mirror/__main__.py b/rpm_s3_mirror/__main__.py index de46780..8388787 100644 --- a/rpm_s3_mirror/__main__.py +++ b/rpm_s3_mirror/__main__.py @@ -1,3 +1,5 @@ +# Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/ + import argparse import logging diff --git a/rpm_s3_mirror/config.py b/rpm_s3_mirror/config.py index e2c05cf..3b2db38 100644 --- a/rpm_s3_mirror/config.py +++ b/rpm_s3_mirror/config.py @@ -1,3 +1,5 @@ +# Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/ + import json import os from abc import abstractmethod diff --git a/rpm_s3_mirror/mirror.py b/rpm_s3_mirror/mirror.py index e2719fe..c87784d 100644 --- a/rpm_s3_mirror/mirror.py +++ b/rpm_s3_mirror/mirror.py @@ -1,3 +1,5 @@ +# Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/ + import logging import time from collections import namedtuple diff --git a/rpm_s3_mirror/repository.py b/rpm_s3_mirror/repository.py index 2d5d53c..c8c67d2 100644 --- a/rpm_s3_mirror/repository.py +++ b/rpm_s3_mirror/repository.py @@ -1,3 +1,5 @@ +# Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/ + from collections import namedtuple from datetime import datetime from typing import Iterator, Dict diff --git a/rpm_s3_mirror/s3.py b/rpm_s3_mirror/s3.py index e930efb..038a854 100644 --- a/rpm_s3_mirror/s3.py +++ b/rpm_s3_mirror/s3.py @@ -1,3 +1,5 @@ +# Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/ + import base64 import functools import hashlib diff --git a/rpm_s3_mirror/statsd.py b/rpm_s3_mirror/statsd.py index d28ecde..9138196 100644 --- a/rpm_s3_mirror/statsd.py +++ b/rpm_s3_mirror/statsd.py @@ -1,3 +1,5 @@ +# Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/ + """ StatsD client diff --git a/rpm_s3_mirror/util.py b/rpm_s3_mirror/util.py index af78a32..a29dee1 100644 --- a/rpm_s3_mirror/util.py +++ b/rpm_s3_mirror/util.py @@ -1,3 +1,5 @@ +# Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/ + import datetime import hashlib diff --git a/setup.py b/setup.py index bc580a2..a7fecae 100644 --- a/setup.py +++ b/setup.py @@ -1,3 +1,5 @@ +# Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/ + from setuptools import setup import setuptools