From c0b5d7505eb79f256e256e5ba86cb4a43c380628 Mon Sep 17 00:00:00 2001 From: Elaine Hale Date: Thu, 7 Sep 2017 13:14:21 -0600 Subject: [PATCH] Updating license headers. --- bin/csv_to_gdx.py | 4 +-- bin/gdx_to_csv.py | 4 +-- dev/add_header.py | 4 +-- gdxpds/__init__.py | 10 +++---- gdxpds/gdx.py | 46 +++++++++++++++----------------- gdxpds/read_gdx.py | 47 ++++++++++++++++----------------- gdxpds/test/__init__.py | 10 +++---- gdxpds/test/test_conversions.py | 5 ++-- gdxpds/test/test_details.py | 41 ++++++++++++++++++++++++++++ gdxpds/test/test_read.py | 41 ++++++++++++++++++++++++++++ gdxpds/test/test_session.py | 41 ++++++++++++++++++++++++++++ gdxpds/tools.py | 4 +-- gdxpds/write_gdx.py | 46 +++++++++++++++----------------- 13 files changed, 205 insertions(+), 98 deletions(-) diff --git a/bin/csv_to_gdx.py b/bin/csv_to_gdx.py index 88b40b0..86719f1 100644 --- a/bin/csv_to_gdx.py +++ b/bin/csv_to_gdx.py @@ -1,8 +1,7 @@ ''' - [LICENSE] -Copyright (c) 2015, Alliance for Sustainable Energy. +Copyright (c) 2017, Alliance for Sustainable Energy. All rights reserved. Redistribution and use in source and binary forms, @@ -38,7 +37,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [/LICENSE] - ''' import pandas as pds diff --git a/bin/gdx_to_csv.py b/bin/gdx_to_csv.py index 57f14d3..c3cdff8 100644 --- a/bin/gdx_to_csv.py +++ b/bin/gdx_to_csv.py @@ -1,8 +1,7 @@ ''' - [LICENSE] -Copyright (c) 2015, Alliance for Sustainable Energy. +Copyright (c) 2017, Alliance for Sustainable Energy. All rights reserved. Redistribution and use in source and binary forms, @@ -38,7 +37,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [/LICENSE] - ''' import argparse diff --git a/dev/add_header.py b/dev/add_header.py index c012a44..ad33e63 100644 --- a/dev/add_header.py +++ b/dev/add_header.py @@ -162,9 +162,9 @@ def get_python_files(dirname): #iterate through files for current_file in python_files: if not args.remove: - print 'Adding license to: %s' % current_file + print('Adding license to: {}'.format(current_file)) else: - print 'Removing license from: %s' % current_file + print('Removing license from: {}'.format(current_file)) with open(current_file) as f: current_file_text = f.read() diff --git a/gdxpds/__init__.py b/gdxpds/__init__.py index d55b66b..2756650 100644 --- a/gdxpds/__init__.py +++ b/gdxpds/__init__.py @@ -1,8 +1,6 @@ ''' - -[LICENSE] - -Copyright (c) 2015, Alliance for Sustainable Energy. +[LICENSE] +Copyright (c) 2017, Alliance for Sustainable Energy. All rights reserved. Redistribution and use in source and binary forms, @@ -35,9 +33,9 @@ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +[/LICENSE] -[/LICENSE] ''' diff --git a/gdxpds/gdx.py b/gdxpds/gdx.py index e5cf709..ee13987 100644 --- a/gdxpds/gdx.py +++ b/gdxpds/gdx.py @@ -1,44 +1,42 @@ ''' - [LICENSE] -Copyright (c) 2015, Alliance for Sustainable Energy. +Copyright (c) 2017, Alliance for Sustainable Energy. All rights reserved. -Redistribution and use in source and binary forms, -with or without modification, are permitted provided +Redistribution and use in source and binary forms, +with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above -copyright notice, this list of conditions and the +1. Redistributions of source code must retain the above +copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the -above copyright notice, this list of conditions and the -following disclaimer in the documentation and/or other +2. Redistributions in binary form must reproduce the +above copyright notice, this list of conditions and the +following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the copyright holder nor the -names of its contributors may be used to endorse or -promote products derived from this software without +3. Neither the name of the copyright holder nor the +names of its contributors may be used to endorse or +promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND -CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [/LICENSE] - ''' from __future__ import absolute_import, print_function diff --git a/gdxpds/read_gdx.py b/gdxpds/read_gdx.py index a5db581..058931b 100644 --- a/gdxpds/read_gdx.py +++ b/gdxpds/read_gdx.py @@ -1,45 +1,44 @@ ''' - [LICENSE] -Copyright (c) 2015, Alliance for Sustainable Energy. +Copyright (c) 2017, Alliance for Sustainable Energy. All rights reserved. -Redistribution and use in source and binary forms, -with or without modification, are permitted provided +Redistribution and use in source and binary forms, +with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above -copyright notice, this list of conditions and the +1. Redistributions of source code must retain the above +copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the -above copyright notice, this list of conditions and the -following disclaimer in the documentation and/or other +2. Redistributions in binary form must reproduce the +above copyright notice, this list of conditions and the +following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the copyright holder nor the -names of its contributors may be used to endorse or -promote products derived from this software without +3. Neither the name of the copyright holder nor the +names of its contributors may be used to endorse or +promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND -CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [/LICENSE] - ''' + from collections import OrderedDict import copy import logging diff --git a/gdxpds/test/__init__.py b/gdxpds/test/__init__.py index 1fe43cf..45db8be 100644 --- a/gdxpds/test/__init__.py +++ b/gdxpds/test/__init__.py @@ -1,8 +1,6 @@ ''' - -[LICENSE] - -Copyright (c) 2015, Alliance for Sustainable Energy. +[LICENSE] +Copyright (c) 2017, Alliance for Sustainable Energy. All rights reserved. Redistribution and use in source and binary forms, @@ -35,9 +33,9 @@ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +[/LICENSE] -[/LICENSE] ''' diff --git a/gdxpds/test/test_conversions.py b/gdxpds/test/test_conversions.py index 524834d..fe4cbcf 100644 --- a/gdxpds/test/test_conversions.py +++ b/gdxpds/test/test_conversions.py @@ -1,8 +1,7 @@ ''' - [LICENSE] -Copyright (c) 2015, Alliance for Sustainable Energy. +Copyright (c) 2017, Alliance for Sustainable Energy. All rights reserved. Redistribution and use in source and binary forms, @@ -38,8 +37,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [/LICENSE] - ''' + import os import subprocess as subp diff --git a/gdxpds/test/test_details.py b/gdxpds/test/test_details.py index 2955583..dd97e90 100644 --- a/gdxpds/test/test_details.py +++ b/gdxpds/test/test_details.py @@ -1,3 +1,44 @@ +''' +[LICENSE] + +Copyright (c) 2017, Alliance for Sustainable Energy. +All rights reserved. + +Redistribution and use in source and binary forms, +with or without modification, are permitted provided +that the following conditions are met: + +1. Redistributions of source code must retain the above +copyright notice, this list of conditions and the +following disclaimer. + +2. Redistributions in binary form must reproduce the +above copyright notice, this list of conditions and the +following disclaimer in the documentation and/or other +materials provided with the distribution. + +3. Neither the name of the copyright holder nor the +names of its contributors may be used to endorse or +promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +[/LICENSE] +''' + import logging import os import subprocess as subp diff --git a/gdxpds/test/test_read.py b/gdxpds/test/test_read.py index f5a7636..88b4b28 100644 --- a/gdxpds/test/test_read.py +++ b/gdxpds/test/test_read.py @@ -1,3 +1,44 @@ +''' +[LICENSE] + +Copyright (c) 2017, Alliance for Sustainable Energy. +All rights reserved. + +Redistribution and use in source and binary forms, +with or without modification, are permitted provided +that the following conditions are met: + +1. Redistributions of source code must retain the above +copyright notice, this list of conditions and the +following disclaimer. + +2. Redistributions in binary form must reproduce the +above copyright notice, this list of conditions and the +following disclaimer in the documentation and/or other +materials provided with the distribution. + +3. Neither the name of the copyright holder nor the +names of its contributors may be used to endorse or +promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +[/LICENSE] +''' + import os import gdxpds.gdx diff --git a/gdxpds/test/test_session.py b/gdxpds/test/test_session.py index 6832d28..7b250ea 100644 --- a/gdxpds/test/test_session.py +++ b/gdxpds/test/test_session.py @@ -1,3 +1,44 @@ +''' +[LICENSE] + +Copyright (c) 2017, Alliance for Sustainable Energy. +All rights reserved. + +Redistribution and use in source and binary forms, +with or without modification, are permitted provided +that the following conditions are met: + +1. Redistributions of source code must retain the above +copyright notice, this list of conditions and the +following disclaimer. + +2. Redistributions in binary form must reproduce the +above copyright notice, this list of conditions and the +following disclaimer in the documentation and/or other +materials provided with the distribution. + +3. Neither the name of the copyright holder nor the +names of its contributors may be used to endorse or +promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +[/LICENSE] +''' + import os import shutil diff --git a/gdxpds/tools.py b/gdxpds/tools.py index ec67363..49174c0 100644 --- a/gdxpds/tools.py +++ b/gdxpds/tools.py @@ -1,8 +1,7 @@ ''' - [LICENSE] -Copyright (c) 2015, Alliance for Sustainable Energy. +Copyright (c) 2017, Alliance for Sustainable Energy. All rights reserved. Redistribution and use in source and binary forms, @@ -38,7 +37,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [/LICENSE] - ''' import logging diff --git a/gdxpds/write_gdx.py b/gdxpds/write_gdx.py index ca49a00..d703092 100644 --- a/gdxpds/write_gdx.py +++ b/gdxpds/write_gdx.py @@ -1,44 +1,42 @@ ''' - [LICENSE] -Copyright (c) 2015, Alliance for Sustainable Energy. +Copyright (c) 2017, Alliance for Sustainable Energy. All rights reserved. -Redistribution and use in source and binary forms, -with or without modification, are permitted provided +Redistribution and use in source and binary forms, +with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above -copyright notice, this list of conditions and the +1. Redistributions of source code must retain the above +copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the -above copyright notice, this list of conditions and the -following disclaimer in the documentation and/or other +2. Redistributions in binary form must reproduce the +above copyright notice, this list of conditions and the +following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the copyright holder nor the -names of its contributors may be used to endorse or -promote products derived from this software without +3. Neither the name of the copyright holder nor the +names of its contributors may be used to endorse or +promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND -CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND +CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [/LICENSE] - ''' import logging