Skip to content

Commit

Permalink
Merge pull request #48 from lsst/tickets/DM-20941
Browse files Browse the repository at this point in the history
DM-20941: Cleanups (fix third-party deps in table file; remove dependency on future; update license statements)
  • Loading branch information
jonathansick committed Aug 8, 2019
2 parents 3a169a2 + 44ef913 commit 7b7a99b
Show file tree
Hide file tree
Showing 53 changed files with 416 additions and 582 deletions.
18 changes: 8 additions & 10 deletions bin.src/dispatch_verify.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env python
#
# LSST Data Management System
# This file is part of verify.
#
# This product includes software developed by the
# LSST Project (http://www.lsst.org/).
#
# See COPYRIGHT file at the top of the source tree.
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# 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
Expand All @@ -17,11 +18,8 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the LSST License Statement and
# the GNU General Public License along with this program. If not,
# see <https://www.lsstcorp.org/LegalNotices/>.
#

# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
from lsst.verify.bin.dispatchverify import main

if __name__ == '__main__':
Expand Down
17 changes: 8 additions & 9 deletions bin.src/lint_metrics.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env python
#
# LSST Data Management System
# This file is part of verify.
#
# This product includes software developed by the
# LSST Project (http://www.lsst.org/).
#
# See COPYRIGHT file at the top of the source tree.
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# 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
Expand All @@ -17,10 +18,8 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the LSST License Statement and
# the GNU General Public License along with this program. If not,
# see <https://www.lsstcorp.org/LegalNotices/>.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

from lsst.verify.bin.lintmetrics import main

Expand Down
18 changes: 8 additions & 10 deletions python/lsst/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This file is part of verify.
#
# LSST Data Management System
#
# This product includes software developed by the
# LSST Project (http://www.lsst.org/).
#
# See COPYRIGHT file at the top of the source tree.
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# 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
Expand All @@ -16,10 +16,8 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the LSST License Statement and
# the GNU General Public License along with this program. If not,
# see <https://www.lsstcorp.org/LegalNotices/>.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

try:
# verify does not formally use on lsstimport, but we still attempt
Expand Down
18 changes: 8 additions & 10 deletions python/lsst/verify/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This file is part of verify.
#
# LSST Data Management System
#
# This product includes software developed by the
# LSST Project (http://www.lsst.org/).
#
# See COPYRIGHT file at the top of the source tree.
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# 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
Expand All @@ -16,10 +16,8 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the LSST License Statement and
# the GNU General Public License along with this program. If not,
# see <https://www.lsstcorp.org/LegalNotices/>.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""LSST Science Pipelines Verification Framework."""

try:
Expand Down
18 changes: 8 additions & 10 deletions python/lsst/verify/bin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This file is part of verify.
#
# LSST Data Management System
#
# This product includes software developed by the
# LSST Project (http://www.lsst.org/).
#
# See COPYRIGHT file at the top of the source tree.
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# 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
Expand All @@ -16,7 +16,5 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the LSST License Statement and
# the GNU General Public License along with this program. If not,
# see <https://www.lsstcorp.org/LegalNotices/>.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
18 changes: 8 additions & 10 deletions python/lsst/verify/bin/dispatchverify.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This file is part of verify.
#
# LSST Data Management System
#
# This product includes software developed by the
# LSST Project (http://www.lsst.org/).
#
# See COPYRIGHT file at the top of the source tree.
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# 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
Expand All @@ -16,10 +16,8 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the LSST License Statement and
# the GNU General Public License along with this program. If not,
# see <https://www.lsstcorp.org/LegalNotices/>.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""Upload LSST Science Pipelines Verification `~lsst.verify.Job` datasets to
the SQUASH dashboard.
Expand Down
1 change: 0 additions & 1 deletion python/lsst/verify/bin/inspectjob.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

"""Print the measurements and metadata in lsst.verify JSON files.
This script takes as arguments one or more lsst.verify JSON files, and prints
Expand Down
3 changes: 1 addition & 2 deletions python/lsst/verify/bin/lintmetrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

import argparse

import lsst.pex.exceptions
from lsst.utils import getPackageDir
from lsst.verify import MetricSet, SpecificationSet

Expand All @@ -51,7 +50,7 @@ def build_argparser():
"""
try:
default_metrics_package_dir = getPackageDir('verify_metrics')
except lsst.pex.exceptions.NotFoundError:
except LookupError:
default_metrics_package_dir = None

parser = argparse.ArgumentParser(
Expand Down
26 changes: 10 additions & 16 deletions python/lsst/verify/blob.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This file is part of verify.
#
# LSST Data Management System
#
# This product includes software developed by the
# LSST Project (http://www.lsst.org/).
#
# See COPYRIGHT file at the top of the source tree.
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# 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
Expand All @@ -16,16 +16,10 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the LSST License Statement and
# the GNU General Public License along with this program. If not,
# see <https://www.lsstcorp.org/LegalNotices/>.
#
from __future__ import print_function, division

# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
__all__ = ['Blob']

from past.builtins import basestring

import uuid

from .jsonmixin import JsonSerializationMixin
Expand All @@ -52,7 +46,7 @@ def __init__(self, name, **datums):
# Internal read-only instance ID, access with the name attribute
self._id = uuid.uuid4().hex

if not isinstance(name, basestring):
if not isinstance(name, str):
message = 'Blob name {0!r} must be a string'.format(name)
raise TypeError(message)
self._name = name
Expand Down Expand Up @@ -121,7 +115,7 @@ def json(self):
return json_doc

def __setitem__(self, key, value):
if not isinstance(key, basestring):
if not isinstance(key, str):
message = 'Key {0!r} is not a string.'.format(key)
raise KeyError(message)

Expand Down
20 changes: 8 additions & 12 deletions python/lsst/verify/blobset.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This file is part of verify.
#
# LSST Data Management System
#
# This product includes software developed by the
# LSST Project (http://www.lsst.org/).
#
# See COPYRIGHT file at the top of the source tree.
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# 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
Expand All @@ -16,12 +16,8 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the LSST License Statement and
# the GNU General Public License along with this program. If not,
# see <https://www.lsstcorp.org/LegalNotices/>.
#
from __future__ import print_function, division

# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
__all__ = ['BlobSet']

from .blob import Blob
Expand Down
31 changes: 12 additions & 19 deletions python/lsst/verify/datum.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This file is part of verify.
#
# LSST Data Management System
#
# This product includes software developed by the
# LSST Project (http://www.lsst.org/).
#
# See COPYRIGHT file at the top of the source tree.
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# 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
Expand All @@ -16,25 +16,18 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the LSST License Statement and
# the GNU General Public License along with this program. If not,
# see <https://www.lsstcorp.org/LegalNotices/>.
#
from __future__ import print_function, division

# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
__all__ = ['Datum']

from builtins import object
from past.builtins import basestring

import numpy as np
from astropy.tests.helper import quantity_allclose
import astropy.units as u

from .jsonmixin import JsonSerializationMixin


class QuantityAttributeMixin(object):
class QuantityAttributeMixin:
"""Mixin with common attributes for classes that wrap an
`astropy.units.Quantity`.
Expand All @@ -53,7 +46,7 @@ def quantity(self):
def _is_non_quantity_type(q):
"""Test if a quantity is a acceptable (`str`, `bool`, `int`, or
`None`), but not `astropy.quantity`."""
return isinstance(q, basestring) or isinstance(q, bool) or \
return isinstance(q, str) or isinstance(q, bool) or \
isinstance(q, int) or q is None

@quantity.setter
Expand Down Expand Up @@ -226,7 +219,7 @@ def label(self):

@label.setter
def label(self, value):
assert isinstance(value, basestring) or value is None
assert isinstance(value, str) or value is None
self._label = value

@property
Expand All @@ -236,7 +229,7 @@ def description(self):

@description.setter
def description(self, value):
assert isinstance(value, basestring) or value is None
assert isinstance(value, str) or value is None
self._description = value

def __eq__(self, other):
Expand Down
18 changes: 8 additions & 10 deletions python/lsst/verify/errors.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This file is part of verify.
#
# LSST Data Management System
#
# This product includes software developed by the
# LSST Project (http://www.lsst.org/).
#
# See COPYRIGHT file at the top of the source tree.
# Developed for the LSST Data Management System.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# 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
Expand All @@ -16,10 +16,8 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the LSST License Statement and
# the GNU General Public License along with this program. If not,
# see <https://www.lsstcorp.org/LegalNotices/>.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
"""Exceptions for the lsst.verify namespace."""

__all__ = ['VerifyError',
Expand Down

0 comments on commit 7b7a99b

Please sign in to comment.