From 0650c5985e387cef935616a48fc977283187330b Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 22 Mar 2021 13:42:42 +0200 Subject: [PATCH] Add SPDX short license identifier to all Python files See: https://spdx.github.io/spdx-spec/appendix-V-using-SPDX-short-identifiers-in-source-files/ --- dspace_statistics_api/app.py | 2 ++ dspace_statistics_api/config.py | 2 ++ dspace_statistics_api/database.py | 2 ++ dspace_statistics_api/indexer.py | 18 +----------------- dspace_statistics_api/stats.py | 2 ++ dspace_statistics_api/util.py | 2 ++ tests/test_api_collections.py | 2 ++ tests/test_api_communities.py | 2 ++ tests/test_api_docs.py | 2 ++ tests/test_api_items.py | 2 ++ 10 files changed, 19 insertions(+), 17 deletions(-) diff --git a/dspace_statistics_api/app.py b/dspace_statistics_api/app.py index 736eed1..9ada088 100644 --- a/dspace_statistics_api/app.py +++ b/dspace_statistics_api/app.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-only + import json import math diff --git a/dspace_statistics_api/config.py b/dspace_statistics_api/config.py index e5d8937..2f1eed0 100644 --- a/dspace_statistics_api/config.py +++ b/dspace_statistics_api/config.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-only + import os # Check if Solr connection information was provided in the environment diff --git a/dspace_statistics_api/database.py b/dspace_statistics_api/database.py index ab991a9..94f7a7c 100644 --- a/dspace_statistics_api/database.py +++ b/dspace_statistics_api/database.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-only + import falcon import psycopg2 import psycopg2.extras diff --git a/dspace_statistics_api/indexer.py b/dspace_statistics_api/indexer.py index 77f9352..99d8072 100644 --- a/dspace_statistics_api/indexer.py +++ b/dspace_statistics_api/indexer.py @@ -1,23 +1,7 @@ +# SPDX-License-Identifier: GPL-3.0-only # # indexer.py # -# Copyright 2018 Alan Orth. -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . -# -# --- -# # Connects to a DSpace Solr statistics core and ingests views and downloads for # communities, collections, and items into a PostgreSQL database. # diff --git a/dspace_statistics_api/stats.py b/dspace_statistics_api/stats.py index b56320e..a7abafb 100644 --- a/dspace_statistics_api/stats.py +++ b/dspace_statistics_api/stats.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-only + import requests from .config import SOLR_SERVER diff --git a/dspace_statistics_api/util.py b/dspace_statistics_api/util.py index 3078d41..8fd1203 100644 --- a/dspace_statistics_api/util.py +++ b/dspace_statistics_api/util.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-only + import datetime import json import re diff --git a/tests/test_api_collections.py b/tests/test_api_collections.py index 6b8b82e..bd487d2 100644 --- a/tests/test_api_collections.py +++ b/tests/test_api_collections.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-only + import json from unittest.mock import patch diff --git a/tests/test_api_communities.py b/tests/test_api_communities.py index 418c010..56b6d80 100644 --- a/tests/test_api_communities.py +++ b/tests/test_api_communities.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-only + import json from unittest.mock import patch diff --git a/tests/test_api_docs.py b/tests/test_api_docs.py index 3dfa626..6525222 100644 --- a/tests/test_api_docs.py +++ b/tests/test_api_docs.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-only + import pytest from falcon import testing diff --git a/tests/test_api_items.py b/tests/test_api_items.py index dd52c7a..08bad96 100644 --- a/tests/test_api_items.py +++ b/tests/test_api_items.py @@ -1,3 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-only + import json from unittest.mock import patch