From 6194b0f0f7d39a1b5df659b331ebb63bb94109de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Fri, 8 Feb 2019 12:46:11 +0000 Subject: Replace epydoc metadata with SPDX identifiers. Most of the epydoc metadata (author, copyright, email) is duplicate in the package's setup.py or README. These copies are more likely to get out of date, and increase the amount of work to keep them in line. The license information should rather be provided with an SPDX identifier, which is more similar to what the Linux kernel and other projects, such as pyserial, do. --- glucometer.py | 2 ++ glucometerutils/common.py | 7 ++----- glucometerutils/drivers/accuchek_reports.py | 7 ++----- glucometerutils/drivers/fsinsulinx.py | 7 ++----- glucometerutils/drivers/fslibre.py | 7 ++----- glucometerutils/drivers/fsoptium.py | 7 ++----- glucometerutils/drivers/fsprecisionneo.py | 7 ++----- glucometerutils/drivers/otultra2.py | 7 ++----- glucometerutils/drivers/otultraeasy.py | 7 ++----- glucometerutils/drivers/otverio2015.py | 7 ++----- glucometerutils/drivers/otverioiq.py | 7 ++----- glucometerutils/drivers/sdcodefree.py | 8 ++------ glucometerutils/exceptions.py | 7 ++----- glucometerutils/glucometer.py | 7 ++----- glucometerutils/support/construct_extras.py | 7 ++----- glucometerutils/support/freestyle.py | 7 ++----- glucometerutils/support/hiddevice.py | 8 +++----- glucometerutils/support/lifescan.py | 7 ++----- glucometerutils/support/lifescan_binary_protocol.py | 7 ++----- glucometerutils/support/serial.py | 7 ++----- setup.py | 2 ++ test/__init__.py | 7 ++----- test/test_common.py | 7 ++----- test/test_construct_extras.py | 7 ++----- test/test_lifescan.py | 7 ++----- test/test_otultra2.py | 7 ++----- test/test_otultraeasy.py | 7 ++----- 27 files changed, 55 insertions(+), 126 deletions(-) diff --git a/glucometer.py b/glucometer.py index 3b8bf70..1b48c62 100755 --- a/glucometer.py +++ b/glucometer.py @@ -1,5 +1,7 @@ #!/usr/bin/env python3 # -*- python -*- +# +# SPDX-License-Identifier: MIT from glucometerutils import glucometer diff --git a/glucometerutils/common.py b/glucometerutils/common.py index 0c7a0c6..ad56b8b 100644 --- a/glucometerutils/common.py +++ b/glucometerutils/common.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Common routines for data in glucometers.""" -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2013, Diego Elio Pettenò' -__license__ = 'MIT' - import datetime import enum import textwrap diff --git a/glucometerutils/drivers/accuchek_reports.py b/glucometerutils/drivers/accuchek_reports.py index 3ee8cdd..0b27196 100644 --- a/glucometerutils/drivers/accuchek_reports.py +++ b/glucometerutils/drivers/accuchek_reports.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Driver for Accu-Chek Mobile devices with reports mode. Supported features: @@ -12,11 +14,6 @@ The Accu-Chek Mobile meters should be set to "Reports" mode. """ -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2016, Diego Elio Pettenò' -__license__ = 'MIT' - import csv import datetime import glob diff --git a/glucometerutils/drivers/fsinsulinx.py b/glucometerutils/drivers/fsinsulinx.py index 7625949..76707ec 100644 --- a/glucometerutils/drivers/fsinsulinx.py +++ b/glucometerutils/drivers/fsinsulinx.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Driver for FreeStyle InsuLinx devices. Supported features: @@ -14,11 +16,6 @@ Xavier Claessens. """ -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2017, Diego Elio Pettenò' -__license__ = 'MIT' - import collections import datetime diff --git a/glucometerutils/drivers/fslibre.py b/glucometerutils/drivers/fslibre.py index 09d0866..f8e3117 100644 --- a/glucometerutils/drivers/fslibre.py +++ b/glucometerutils/drivers/fslibre.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Driver for FreeStyle Libre devices. Supported features: @@ -15,11 +17,6 @@ https://flameeyes.github.io/glucometer-protocols/abbott/freestyle-libre """ -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2017, Diego Elio Pettenò' -__license__ = 'MIT' - import datetime from glucometerutils import common diff --git a/glucometerutils/drivers/fsoptium.py b/glucometerutils/drivers/fsoptium.py index e7ebaf7..87ec0f6 100644 --- a/glucometerutils/drivers/fsoptium.py +++ b/glucometerutils/drivers/fsoptium.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Driver for FreeStyle Optium devices. Supported features: @@ -14,11 +16,6 @@ Further information on the device protocol can be found at https://flameeyes.github.io/glucometer-protocols/abbott/freestyle-optium """ -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2016-2017, Diego Elio Pettenò' -__license__ = 'MIT' - import datetime import logging import re diff --git a/glucometerutils/drivers/fsprecisionneo.py b/glucometerutils/drivers/fsprecisionneo.py index 4015461..b818f8f 100644 --- a/glucometerutils/drivers/fsprecisionneo.py +++ b/glucometerutils/drivers/fsprecisionneo.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Driver for FreeStyle Precision Neo devices. This driver may also work with FreeStyle Optium Neo devices, but it is currently @@ -18,11 +20,6 @@ https://flameeyes.github.io/glucometer-protocols/abbott/freestyle-precision-neo """ -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2017, Diego Elio Pettenò' -__license__ = 'MIT' - import collections import datetime diff --git a/glucometerutils/drivers/otultra2.py b/glucometerutils/drivers/otultra2.py index 19166ed..03e8c84 100644 --- a/glucometerutils/drivers/otultra2.py +++ b/glucometerutils/drivers/otultra2.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Driver for LifeScan OneTouch Ultra 2 devices. Supported features: @@ -11,11 +13,6 @@ Supported features: Expected device path: /dev/ttyUSB0 or similar serial port device. """ -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2013-2017, Diego Elio Pettenò' -__license__ = 'MIT' - import datetime import re diff --git a/glucometerutils/drivers/otultraeasy.py b/glucometerutils/drivers/otultraeasy.py index 76fcdd0..4005bdc 100644 --- a/glucometerutils/drivers/otultraeasy.py +++ b/glucometerutils/drivers/otultraeasy.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Driver for LifeScan OneTouch Ultra Easy devices. Also supports OneTouch Ultra Mini devices (different name, same device). @@ -13,11 +15,6 @@ Supported features: Expected device path: /dev/ttyUSB0 or similar serial port device. """ -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2014-2018, Diego Elio Pettenò' -__license__ = 'MIT' - import binascii import datetime import logging diff --git a/glucometerutils/drivers/otverio2015.py b/glucometerutils/drivers/otverio2015.py index f347763..7e77a02 100644 --- a/glucometerutils/drivers/otverio2015.py +++ b/glucometerutils/drivers/otverio2015.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Driver for LifeScan OneTouch Verio (2015) and Select Plus devices. Verio 2015 devices can be recognized by microUSB connectors. @@ -20,11 +22,6 @@ https://flameeyes.github.io/glucometer-protocols/lifescan/onetouch-verio-2015 """ -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2016-2018, Diego Elio Pettenò' -__license__ = 'MIT' - import binascii import datetime import logging diff --git a/glucometerutils/drivers/otverioiq.py b/glucometerutils/drivers/otverioiq.py index 4dece92..f74f51f 100644 --- a/glucometerutils/drivers/otverioiq.py +++ b/glucometerutils/drivers/otverioiq.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Driver for LifeScan OneTouch Verio IQ devices. Supported features: @@ -13,11 +15,6 @@ auto-detected. """ -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2018, Diego Elio Pettenò' -__license__ = 'MIT' - import binascii import datetime import logging diff --git a/glucometerutils/drivers/sdcodefree.py b/glucometerutils/drivers/sdcodefree.py index 2fb1dbc..8f67547 100644 --- a/glucometerutils/drivers/sdcodefree.py +++ b/glucometerutils/drivers/sdcodefree.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Driver for SD CodeFree devices by SD Biosensor. For SD Biosensor glucometers using the serial interface. @@ -13,12 +15,6 @@ IMPORTANT NOTE: the glucometer can be connected before starting the program, but it has to be turned on when the program asks you to. """ - -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2017, Diego Elio Pettenò' -__license__ = 'MIT' - import binascii import datetime import enum diff --git a/glucometerutils/exceptions.py b/glucometerutils/exceptions.py index c264231..415c97f 100644 --- a/glucometerutils/exceptions.py +++ b/glucometerutils/exceptions.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Common exceptions for glucometerutils.""" -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2013, Diego Elio Pettenò' -__license__ = 'MIT' - class Error(Exception): """Base class for the errors.""" diff --git a/glucometerutils/glucometer.py b/glucometerutils/glucometer.py index 1312248..3f4ad4d 100755 --- a/glucometerutils/glucometer.py +++ b/glucometerutils/glucometer.py @@ -1,12 +1,9 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Utility to manage glucometers' data.""" -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2013-2017, Diego Elio Pettenò' -__license__ = 'MIT' - import argparse import importlib import inspect diff --git a/glucometerutils/support/construct_extras.py b/glucometerutils/support/construct_extras.py index 4de7097..7abcd9e 100644 --- a/glucometerutils/support/construct_extras.py +++ b/glucometerutils/support/construct_extras.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Extra classes for Construct.""" -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2018, Diego Elio Pettenò' -__license__ = 'MIT' - import datetime import construct diff --git a/glucometerutils/support/freestyle.py b/glucometerutils/support/freestyle.py index 3aedbdc..816af81 100644 --- a/glucometerutils/support/freestyle.py +++ b/glucometerutils/support/freestyle.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Common routines to implement the FreeStyle common protocol. Protocol documentation available at @@ -6,11 +8,6 @@ https://flameeyes.github.io/glucometer-protocols/abbott/shared-hid-protocol.html """ -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2017, Diego Elio Pettenò' -__license__ = 'MIT' - import csv import datetime import logging diff --git a/glucometerutils/support/hiddevice.py b/glucometerutils/support/hiddevice.py index 3cf2e10..ecf989b 100644 --- a/glucometerutils/support/hiddevice.py +++ b/glucometerutils/support/hiddevice.py @@ -1,11 +1,9 @@ +# -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Common routines and base driver class for HID-based meters. """ -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2017, Diego Elio Pettenò' -__license__ = 'MIT' - import logging import os diff --git a/glucometerutils/support/lifescan.py b/glucometerutils/support/lifescan.py index 0ea6e5a..19155d4 100644 --- a/glucometerutils/support/lifescan.py +++ b/glucometerutils/support/lifescan.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Common utility functions for LifeScan meters.""" -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2013-2017, Diego Elio Pettenò' -__license__ = 'MIT' - from glucometerutils import exceptions diff --git a/glucometerutils/support/lifescan_binary_protocol.py b/glucometerutils/support/lifescan_binary_protocol.py index 62a4109..288da83 100644 --- a/glucometerutils/support/lifescan_binary_protocol.py +++ b/glucometerutils/support/lifescan_binary_protocol.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Support module for the LifeScan binary protocol. A number of LifeScan devices use a semi-compatible binary protocol to talk host @@ -7,11 +9,6 @@ and device, which is (vastly) compatible. This module implements an interface to send and receive these messages. """ -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2014-2018, Diego Elio Pettenò' -__license__ = 'MIT' - import construct from glucometerutils import common diff --git a/glucometerutils/support/serial.py b/glucometerutils/support/serial.py index fe27668..4566e54 100644 --- a/glucometerutils/support/serial.py +++ b/glucometerutils/support/serial.py @@ -1,12 +1,9 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Common routines and base driver class for serial-based meters. """ -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2017, Diego Elio Pettenò' -__license__ = 'MIT' - import logging try: diff --git a/setup.py b/setup.py index 86e817a..b06efc6 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT import sys diff --git a/test/__init__.py b/test/__init__.py index 314450e..139fd0c 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Add the top-level module to the PYTHONPATH.""" -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2018, Diego Elio Pettenò' -__license__ = 'MIT' - import os import sys diff --git a/test/test_common.py b/test/test_common.py index fe1b4c3..daa83c9 100644 --- a/test/test_common.py +++ b/test/test_common.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Tests for the common routines.""" -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2013-2018, Diego Elio Pettenò' -__license__ = 'MIT' - # pylint: disable=protected-access,missing-docstring import datetime diff --git a/test/test_construct_extras.py b/test/test_construct_extras.py index 7aa7d91..476d6f8 100644 --- a/test/test_construct_extras.py +++ b/test/test_construct_extras.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Tests for the common routines.""" -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2018, Diego Elio Pettenò' -__license__ = 'MIT' - # pylint: disable=protected-access,missing-docstring import datetime diff --git a/test/test_lifescan.py b/test/test_lifescan.py index a53b569..3dc0aa6 100755 --- a/test/test_lifescan.py +++ b/test/test_lifescan.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Tests for the LifeScan OneTouch Ultra Mini driver.""" -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2013-2017, Diego Elio Pettenò' -__license__ = 'MIT' - # pylint: disable=protected-access,missing-docstring import array diff --git a/test/test_otultra2.py b/test/test_otultra2.py index 14cfecc..6bea440 100644 --- a/test/test_otultra2.py +++ b/test/test_otultra2.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Tests for the LifeScan OneTouch Ultra 2 driver.""" -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2013-2018, Diego Elio Pettenò' -__license__ = 'MIT' - # pylint: disable=protected-access,missing-docstring from unittest import mock diff --git a/test/test_otultraeasy.py b/test/test_otultraeasy.py index 69b4294..252b7c7 100644 --- a/test/test_otultraeasy.py +++ b/test/test_otultraeasy.py @@ -1,11 +1,8 @@ # -*- coding: utf-8 -*- +# +# SPDX-License-Identifier: MIT """Tests for the LifeScan OneTouch Ultra Easy driver.""" -__author__ = 'Diego Elio Pettenò' -__email__ = 'flameeyes@flameeyes.com' -__copyright__ = 'Copyright © 2018, Diego Elio Pettenò' -__license__ = 'MIT' - # pylint: disable=protected-access,missing-docstring from absl.testing import absltest -- cgit v1.2.3