From 5b292c2ca5f02eafcb8503598da9213d5f37a587 Mon Sep 17 00:00:00 2001 From: Gabriel Soares <70075435+soaressgabriel@users.noreply.github.com> Date: Tue, 22 Mar 2022 15:33:51 -0300 Subject: [PATCH 1/4] Update dataset download links --- doc/source/datasets.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/source/datasets.rst b/doc/source/datasets.rst index 7239ecf..0ed9341 100644 --- a/doc/source/datasets.rst +++ b/doc/source/datasets.rst @@ -12,7 +12,7 @@ Upper Iguaçu River Basin (UIRB) Upper Iguaçu basin is located in the south portion of Brazil. The Iguaçu River is a tributary of the Paraná River and is also the longest river in the state of Paraná. It is formed by the meeting of the Iraí and Atuba rivers, in the eastern part of the Paraná municipality of Curitiba. Among the main tributaries are: Itaqui, Piraquara, Atuba, Palmital, Barigui, Miringuava, Passaúna and Verde rivers. The basin provides the water consumed in the metropolitan area of Curitiba. -`Download here `__ | `Alternative link `__ +`Download here `__ | `Alternative link `__ - **Data Format:** GeoTIFF and PCRaster raster files, .txt; - **Size:** 222 MB @@ -42,7 +42,7 @@ Piracicaba River Basin (PRB) The Piracicaba River Basin is located in the southeastern portion of Brazil in a continental plateau regime. The Piracicaba River is a tributary of the Tietê River, and is an interstate river as some sources of the rivers that make up its basin are found in the State of Minas Gerais. The Piracicaba river basin is formed by the sub-basins of the Jaguari, Atibaia, Piracicaba, Camanducaia and Corumbataí rivers. Three important dams located at the basin, provide an expressive portion of the water consumed in the metropolitan area of Sao Paulo. -`Download here `__ | `Alternative link `__ +`Download here `__ | `Alternative link `__ - **Data Format:** GeoTIFF and PCRaster raster files, .txt; - **Size:** 1,73 GB @@ -75,7 +75,7 @@ The route of the Ipojuca River, with about 320 km, oriented in the west-east dir Its main tributaries, on the right bank, are Liberal stream, Taquara stream and Mel stream and, on the left bank, Coutinho stream, Mocós stream, Muxoxo stream and Pata Choca stream. Liberal creek, its most important tributary, has its sources in the municipality of Alagoinha. It drains along its 47km of extension, areas of the municipalities of Alagoinha, Pesqueira and Sanharó, and flows into the Ipojuca river.The basin provides an expressive portion of the water consumed in the metropolitan area of Recife. -`Download here `__ | `Alternative link `__ +`Download here `__ | `Alternative link `__ - **Data Format:** GeoTIFF and PCRaster raster files, .txt; @@ -97,4 +97,4 @@ Its main tributaries, on the right bank, are Liberal stream, Taquara stream and - Maps of Gridded Basin Characteristics (Land use maps, Soil map, DEM); - Tables of soil and landuse parameters. -- **References:** :any:`Mello Júnior et al. 2021 ` \ No newline at end of file +- **References:** :any:`Mello Júnior et al. 2021 ` From ae970dc1913fce663d4c21b2d3ac3a4c443cadb1 Mon Sep 17 00:00:00 2001 From: Gabriel Soares <70075435+soaressgabriel@users.noreply.github.com> Date: Wed, 23 Mar 2022 20:44:10 -0300 Subject: [PATCH 2/4] Resolve #74 Update copyright string --- COPYING.md | 62 ++++++++++++++-------------- LICENSE.md | 4 +- doc/source/conf.py | 35 +++++++++++----- doc/source/license.rst | 4 +- rubem/__init__.py | 2 +- rubem/__version__.py | 2 +- rubem/_dynamic_model.py | 2 +- rubem/cli.py | 4 +- rubem/core.py | 2 +- rubem/date/__init__.py | 2 +- rubem/date/_date_calc.py | 2 +- rubem/file/__init__.py | 2 +- rubem/file/_file_convertions.py | 2 +- rubem/file/_file_generators.py | 2 +- rubem/modules/__init__.py | 2 +- rubem/modules/_evapotranspiration.py | 2 +- rubem/modules/_interception.py | 2 +- rubem/modules/_soil.py | 6 +-- rubem/modules/_surface_runoff.py | 5 +-- rubem/preprocessing/__init__.py | 2 +- rubem/preprocessing/kriging.py | 6 ++- rubem/preprocessing/pcrtss2tif.py | 6 ++- rubem/preprocessing/tif2map.py | 2 +- rubem/preprocessing/tif2pcrtss.py | 6 ++- rubem/validation/_schemas.py | 2 +- tests/unit/test_version.py | 2 +- 26 files changed, 95 insertions(+), 75 deletions(-) diff --git a/COPYING.md b/COPYING.md index 56da376..f2d5f09 100644 --- a/COPYING.md +++ b/COPYING.md @@ -1,6 +1,6 @@ -Copyright (C) 2021 LabSid PHA EPUSP. All rights reserved. +Copyright (C) 2020-2022 LabSid PHA EPUSP. All rights reserved. -RUBEM is provided by the copyright holders "as is", without warranty +RUBEM is provided by the copyright holders "as is", without warranty of any kind, expressed or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or @@ -8,77 +8,77 @@ other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software. -The RUBEM source code in this repository is provided under the terms +The RUBEM source code in this repository is provided under the terms of the GNU GENERAL PUBLIC LICENSE (GPL) Version 3, see the [`LICENSE.md`](https://github.com/LabSid-USP/RUBEM/blob/main/LICENSE.md) file for more details. -Visit https://github.com/LabSid-USP/RUBEM for more information. +Visit for more information. ## Notice on third party software RUBEM uses open source software from third parties. These are to their -individual license agreements. Any binary packages of these third party tools are -subject to their individual licenses. RUBEM reserves the right to +individual license agreements. Any binary packages of these third party tools are +subject to their individual licenses. RUBEM reserves the right to change which third party tools are used. -- **GDAL** (https://www.gdal.org/) +- **GDAL** () > In general GDAL/OGR is licensed under an MIT/X style license with the following terms: -> +> > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -> +> > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -> +> > THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -- **NumPy** (https://www.numpy.org/) +- **NumPy** () -> Copyright (c) 2005-2021, NumPy Developers. +> Copyright (c) 2005-2021, NumPy Developers. > > 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. -- **Pandas** (https://www.pandas.pydata.org/) +- **Pandas** () > Copyright (c) 2008-2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team > > All rights reserved. > > Copyright (c) 2011-2021, Open source contributors. -> +> > 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. -- **Python** (https://www.python.org/) +- **Python** () > 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using Python 3.7.12 software in source or binary form and its associated documentation. -> +> > 2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 3.7.12 alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright © 2001-2021 Python Software Foundation; All Rights Reserved" are retained in Python 3.7.12 alone or in any derivative version prepared by Licensee. -> +> > 3. In the event Licensee prepares a derivative work that is based on or incorporates Python 3.7.12 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 3.7.12. -> +> > 4. PSF is making Python 3.7.12 available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 3.7.12 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. -> +> > 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 3.7.12 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 3.7.12, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. -> +> > 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. -> +> > 7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. -> +> > 8. By copying, installing or otherwise using Python 3.7.12, Licensee agrees to be bound by the terms and conditions of this License Agreement. diff --git a/LICENSE.md b/LICENSE.md index debf4cf..bf4af6f 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -633,7 +633,7 @@ the "copyright" line and a pointer to where the full notice is found. RUBEM is a distributed hydrological model to calculate monthly flows with changes in land use over time. - Copyright (C) 2020-2021 LabSid PHA EPUSP + Copyright (C) 2020-2022 LabSid PHA EPUSP 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 @@ -653,7 +653,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - RUBEM Copyright (C) 2020-2021 LabSid PHA EPUSP + RUBEM Copyright (C) 2020-2022 LabSid PHA EPUSP This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. diff --git a/doc/source/conf.py b/doc/source/conf.py index 57daa04..2ec4dc5 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 @@ -22,7 +22,7 @@ __author__ = "LabSid PHA EPUSP" __email__ = "rubem.hydrological@labsid.eng.br" -__copyright__ = "Copyright 2020-2021, LabSid PHA EPUSP" +__copyright__ = "Copyright 2020-2022, LabSid PHA EPUSP" __license__ = "GPL" __date__ = "2021-11-23" __version__ = "0.1.0" @@ -49,8 +49,15 @@ # -- Project information ----------------------------------------------------- project = "Rainfall rUnoff Balance Enhanced Model (RUBEM)" -copyright = "2021, Laboratório de Sistemas de Suporte a Decisões Aplicados à Engenharia Ambiental e de Recursos Hídricos (LabSid) PHA-EPUSP & contributors" -author = "Laboratório de Sistemas de Suporte a Decisões Aplicados à Engenharia Ambiental e de Recursos Hídricos (LabSid) PHA-EPUSP & contributors" +copyright = ( + "2020-2022, Laboratório de Sistemas de Suporte a Decisões Aplicados à" + " Engenharia Ambiental e de Recursos Hídricos (LabSid) PHA-EPUSP &" + " contributors" +) +author = ( + "Laboratório de Sistemas de Suporte a Decisões Aplicados à Engenharia" + " Ambiental e de Recursos Hídricos (LabSid) PHA-EPUSP & contributors" +) # -- General configuration --------------------------------------------------- @@ -77,7 +84,14 @@ # Turn on sphinx.ext.autosummary autosummary_generate = True -autodoc_mock_imports = ["pcraster", "osgeo", "skgstat", "pykrige", "numpy", "pandas"] +autodoc_mock_imports = [ + "pcraster", + "osgeo", + "skgstat", + "pykrige", + "numpy", + "pandas", +] # Add __init__ doc (ie. params) to class summaries autoclass_content = "both" # Remove 'view source code' from top of page (for html, not python) @@ -91,9 +105,7 @@ # Remove namespaces from class/method signatures add_module_names = False -mathjax_path = ( - "https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML" -) +mathjax_path = "https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML" # Add any paths that contain templates here, relative to this directory. templates_path = ["_templates"] @@ -241,7 +253,8 @@ "index", "RUBEMHydrological.tex", "RUBEM Hydrological Documentation", - "Laboratório de Sistemas de Suporte a Decisões Aplicados à Engenharia Ambiental e de Recursos Hídricos LabSid-PHA-EPUSP & contributors", + "Laboratório de Sistemas de Suporte a Decisões Aplicados à Engenharia" + " Ambiental e de Recursos Hídricos LabSid-PHA-EPUSP & contributors", "manual", ), ] @@ -280,7 +293,9 @@ "TemplateClass", "RUBEM Hydrological Documentation", [ - "Laboratório de Sistemas de Suporte a Decisões Aplicados à Engenharia Ambiental e de Recursos Hídricos LabSid-PHA-EPUSP & contributors" + "Laboratório de Sistemas de Suporte a Decisões Aplicados à" + " Engenharia Ambiental e de Recursos Hídricos LabSid-PHA-EPUSP &" + " contributors" ], 1, ) diff --git a/doc/source/license.rst b/doc/source/license.rst index 28f312f..c57f573 100644 --- a/doc/source/license.rst +++ b/doc/source/license.rst @@ -6,7 +6,7 @@ Software RUBEM is licensed under the `GNU General Public License, Version 3.0 or later `_. -Copyright (C) 2020-2021 Laboratório de Sistemas de Suporte a Decisões em Engenharia Ambiental e Recursos Hídricos (LabSid) +Copyright (C) 2020-2022 Laboratório de Sistemas de Suporte a Decisões em Engenharia Ambiental e Recursos Hídricos (LabSid) 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 1, or (at your option) any later version. @@ -19,7 +19,7 @@ Documentation This documentation is licensed under the `GNU Free Documentation License, Version 1.3 or later `_. -Copyright (C) 2020-2021 Laboratório de Sistemas de Suporte a Decisões em Engenharia Ambiental e Recursos Hídricos (LabSid) +Copyright (C) 2020-2022 Laboratório de Sistemas de Suporte a Decisões em Engenharia Ambiental e Recursos Hídricos (LabSid) Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". diff --git a/rubem/__init__.py b/rubem/__init__.py index 649b4e1..016a740 100644 --- a/rubem/__init__.py +++ b/rubem/__init__.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 diff --git a/rubem/__version__.py b/rubem/__version__.py index ec62ae4..b87c2b3 100644 --- a/rubem/__version__.py +++ b/rubem/__version__.py @@ -1,6 +1,6 @@ __author__ = "LabSid PHA EPUSP" __email__ = "rubem.hydrological@labsid.eng.br" -__copyright__ = "Copyright 2020-2021, LabSid PHA EPUSP" +__copyright__ = "Copyright 2020-2022, LabSid PHA EPUSP" __license__ = "GPL" __date__ = "2021-11-23" __version__ = "0.1.0" diff --git a/rubem/_dynamic_model.py b/rubem/_dynamic_model.py index e55fe20..cee14d2 100644 --- a/rubem/_dynamic_model.py +++ b/rubem/_dynamic_model.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 diff --git a/rubem/cli.py b/rubem/cli.py index b6202f4..538cbbd 100644 --- a/rubem/cli.py +++ b/rubem/cli.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 @@ -40,7 +40,7 @@ def main(): prog="rubem", description="Rainfall rUnoff Balance Enhanced Model (RUBEM)", epilog=( - f"RUBEM {__release__} Copyright (C) 2020-2021 - LabSid PHA EPUSP -" + f"RUBEM {__release__} Copyright (C) 2020-2022 - LabSid PHA EPUSP -" " This program comes with ABSOLUTELY NO WARRANTY. " " This is free software, and you are welcome to redistribute it " " under certain conditions." diff --git a/rubem/core.py b/rubem/core.py index 20c330d..4c4aae7 100644 --- a/rubem/core.py +++ b/rubem/core.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 diff --git a/rubem/date/__init__.py b/rubem/date/__init__.py index d5da88e..5298321 100644 --- a/rubem/date/__init__.py +++ b/rubem/date/__init__.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 diff --git a/rubem/date/_date_calc.py b/rubem/date/_date_calc.py index 5dea673..cef1eb8 100644 --- a/rubem/date/_date_calc.py +++ b/rubem/date/_date_calc.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 diff --git a/rubem/file/__init__.py b/rubem/file/__init__.py index d5da88e..5298321 100644 --- a/rubem/file/__init__.py +++ b/rubem/file/__init__.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 diff --git a/rubem/file/_file_convertions.py b/rubem/file/_file_convertions.py index a2afbca..8171d9d 100644 --- a/rubem/file/_file_convertions.py +++ b/rubem/file/_file_convertions.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 diff --git a/rubem/file/_file_generators.py b/rubem/file/_file_generators.py index 0cf4931..3ec1886 100644 --- a/rubem/file/_file_generators.py +++ b/rubem/file/_file_generators.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 diff --git a/rubem/modules/__init__.py b/rubem/modules/__init__.py index acda82a..a02249c 100644 --- a/rubem/modules/__init__.py +++ b/rubem/modules/__init__.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 diff --git a/rubem/modules/_evapotranspiration.py b/rubem/modules/_evapotranspiration.py index 4f7b4fd..10afb50 100644 --- a/rubem/modules/_evapotranspiration.py +++ b/rubem/modules/_evapotranspiration.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 diff --git a/rubem/modules/_interception.py b/rubem/modules/_interception.py index 14e99b1..6eec401 100644 --- a/rubem/modules/_interception.py +++ b/rubem/modules/_interception.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 diff --git a/rubem/modules/_soil.py b/rubem/modules/_soil.py index 5835431..992ea8c 100644 --- a/rubem/modules/_soil.py +++ b/rubem/modules/_soil.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 @@ -59,10 +59,10 @@ def recCalc( TUsat: pcr._pcraster.Field, ) -> pcr._pcraster.Field: """Return Recharge in the pixel [mm]. - + :param f: preferred flow direction parameter [-] :f type: float - + :param TUr: Actual soil moisture content non-saturated zone [mm] :TUr type: pcr._pcraster.Field PCRASTER_VALUESCALE=VS_SCALAR diff --git a/rubem/modules/_surface_runoff.py b/rubem/modules/_surface_runoff.py index 547499a..206242a 100644 --- a/rubem/modules/_surface_runoff.py +++ b/rubem/modules/_surface_runoff.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 @@ -107,8 +107,7 @@ def cperCalc( def cimpCalc( - ao: pcr._pcraster.Field, - ai: pcr._pcraster.Field + ao: pcr._pcraster.Field, ai: pcr._pcraster.Field ) -> pcr._pcraster.Field: """Return percentage of impervious surface per grid cell and\ the runoff coefficient of the impervious area (Cimp). diff --git a/rubem/preprocessing/__init__.py b/rubem/preprocessing/__init__.py index e4af8a0..3632303 100644 --- a/rubem/preprocessing/__init__.py +++ b/rubem/preprocessing/__init__.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 diff --git a/rubem/preprocessing/kriging.py b/rubem/preprocessing/kriging.py index 7880364..18dca15 100644 --- a/rubem/preprocessing/kriging.py +++ b/rubem/preprocessing/kriging.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 @@ -105,7 +105,9 @@ def dynamic(self): enable_plotting=False, coordinates_type="geographic", ) - self.z, ss = OK.execute("grid", self.gridx, (np.flip(self.gridy, axis=0))) + self.z, ss = OK.execute( + "grid", self.gridx, (np.flip(self.gridy, axis=0)) + ) self.z1 = np.where(self.z < 0, 0, self.z) self.rain = numpy2pcr(Scalar, self.z1, -999) diff --git a/rubem/preprocessing/pcrtss2tif.py b/rubem/preprocessing/pcrtss2tif.py index 2eb0415..21b90aa 100644 --- a/rubem/preprocessing/pcrtss2tif.py +++ b/rubem/preprocessing/pcrtss2tif.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 @@ -75,7 +75,9 @@ def pcrTss2Tif(inputFolder, demSrc): src = demSrc outpath = inputFolder print(outpath) - files_path = [os.path.join(outpath, fn) for fn in next(os.walk(outpath))[2]] + files_path = [ + os.path.join(outpath, fn) for fn in next(os.walk(outpath))[2] + ] for i in range(len(files_path)): print(files_path[i]) readFile = pcr.readmap(files_path[i]) diff --git a/rubem/preprocessing/tif2map.py b/rubem/preprocessing/tif2map.py index 1a1a054..0b38bc8 100644 --- a/rubem/preprocessing/tif2map.py +++ b/rubem/preprocessing/tif2map.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 diff --git a/rubem/preprocessing/tif2pcrtss.py b/rubem/preprocessing/tif2pcrtss.py index 106d9db..cb93827 100644 --- a/rubem/preprocessing/tif2pcrtss.py +++ b/rubem/preprocessing/tif2pcrtss.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 @@ -77,6 +77,8 @@ def dynamic(self): # Number of timesteps must match to number of files nrOfTimeSteps = 8 -myModel = Tif2pcrTss("/path/to/files/to/be/converted", "prefix", "/path/to/clone.map") +myModel = Tif2pcrTss( + "/path/to/files/to/be/converted", "prefix", "/path/to/clone.map" +) dynamicModel = DynamicFramework(myModel, nrOfTimeSteps) dynamicModel.run() diff --git a/rubem/validation/_schemas.py b/rubem/validation/_schemas.py index d8c982a..70fbd56 100644 --- a/rubem/validation/_schemas.py +++ b/rubem/validation/_schemas.py @@ -1,7 +1,7 @@ # coding=utf-8 # RUBEM is a distributed hydrological model to calculate monthly # flows with changes in land use over time. -# Copyright (C) 2020-2021 LabSid PHA EPUSP +# Copyright (C) 2020-2022 LabSid PHA EPUSP # 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 diff --git a/tests/unit/test_version.py b/tests/unit/test_version.py index 10c8cd7..063e91a 100644 --- a/tests/unit/test_version.py +++ b/tests/unit/test_version.py @@ -18,7 +18,7 @@ def test_email_str(self): def test_copyright_str(self): self.assertEqual( - "Copyright 2020-2021, LabSid PHA EPUSP", rbv.__copyright__ + "Copyright 2020-2022, LabSid PHA EPUSP", rbv.__copyright__ ) def test_license_str(self): From 124f8bebda3798ab08d2eb67cef7fc40d72773b2 Mon Sep 17 00:00:00 2001 From: Gabriel Soares <70075435+soaressgabriel@users.noreply.github.com> Date: Wed, 23 Mar 2022 21:57:00 -0300 Subject: [PATCH 3/4] Update version string --- doc/source/changelog.rst | 41 ++++++++++++++++++++++++++++---------- doc/source/conf.py | 4 ++-- doc/source/userguide.rst | 2 +- pyproject.toml | 2 +- rubem/__version__.py | 4 ++-- tests/unit/test_version.py | 6 +++--- 6 files changed, 39 insertions(+), 20 deletions(-) diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index b6a36f7..5a44b31 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -5,22 +5,41 @@ This is the list of changes to RUBEM between each release. For full details, see For a list of known issues and their fixes, visit the `Github issues page `__. +Version 0.1.3-alpha +------------------- + +**Date**: March 23, 2022 + +- `@soaressgabriel `__: Fix errors and inconsistencies in doc pages (`#82 `__); +- `@soaressgabriel `__: Update copyright strings (`#81 `__); +- `@soaressgabriel `__: Replace download links for the datasets (`#80 `__); + + Version 0.1.0-alpha ------------------- **Date**: November 23, 2021 -- `@soaressgabriel `__: Add help documentation pages (`#60 `__); -- `@LINAMARIAOSORIO `__: Refactoring: adopts camelCase naming standard (`#59 `__); -- `@LINAMARIAOSORIO `__: Add input data preprocessing scripts (`#58 `__); +- `@soaressgabriel `__: Update module doc string (`#27 `__); +- `@soaressgabriel `__: Add usage of configuration file via CLI (`#6 `__); +- `@soaressgabriel `__: Add reportMapSeries function (`#29 `__); +- `@soaressgabriel `__: Add user help documentation (`#60 `__); +- `@soaressgabriel `__: Add bug issue, feature request issue and pull request templates (`#67 `__); +- `@soaressgabriel `__: Add export format configuration (`#31 `__); +- `@soaressgabriel `__: Add dynamic readout of land use map-series files (`#30 `__); +- `@soaressgabriel `__: Add check if genTss files is enabled (`#50 `__); - `@LINAMARIAOSORIO `__: Add documentation strings to code (`#57 `__); +- `@LINAMARIAOSORIO `__: Add input data preprocessing scripts (`#58 `__); +- `@soaressgabriel `__: Fix header of the CSV files (`#33 `__); +- `@soaressgabriel `__: Fix area measurement unit (`#36 `__); +- `@soaressgabriel `__: Fix bug that did not consider the entire month in the simulation (`#39 `__); +- `@LINAMARIAOSORIO `__: Fix unusual values of the Recharge (`#43 `__); +- `@LINAMARIAOSORIO `__: Fix types of argument and return variables of functions in their docstrings (`#79 `__); - `@soaressgabriel `__: Adopt new project file structure (`#52 `__); -- `@soaressgabriel `__: Fix table export of selected output variables (`#50 `__); - `@LINAMARIAOSORIO `__: Remove Soil Porosity parameter (`#44 `__); -- `@LINAMARIAOSORIO `__: Fix bug affecting values of some model output variables (`#43 `__); -- `@soaressgabriel `__: Fix bug that ignores the end month of the simulation period (`#39 `__); -- `@soaressgabriel `__: Fix grid cell area measurement unit (`#36 `__); -- `@soaressgabriel `__: Add header to generated CSV files (`#33 `__); -- `@soaressgabriel `__: Fix raster series reading in the model's dynamic part (`#30 `__); -- `@LINAMARIAOSORIO `__: Add time series export of selected variables (`#29 `__); -- `@soaressgabriel `__: Add argument to CLI to point to configuration file (`#3 `__); +- `@soaressgabriel `__: Remove white background from favicon from user help page (`#70 `__); +- `@soaressgabriel `__: Refactoring unit tests (`#77 `__); +- `@soaressgabriel `__: Refactoring of core module (`#76 `__); +- `@soaressgabriel `__: Review of the source code base (`#5 `__); +- `@soaressgabriel `__: Clean up the source code base (`#18 `__); +- diff --git a/doc/source/conf.py b/doc/source/conf.py index 2ec4dc5..22d2ee8 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -24,8 +24,8 @@ __email__ = "rubem.hydrological@labsid.eng.br" __copyright__ = "Copyright 2020-2022, LabSid PHA EPUSP" __license__ = "GPL" -__date__ = "2021-11-23" -__version__ = "0.1.0" +__date__ = "2022-03-23" +__version__ = "0.1.3" __release__ = __version__ + "-alpha" # Configuration file for the Sphinx documentation builder. diff --git a/doc/source/userguide.rst b/doc/source/userguide.rst index 757d7b1..9ed0703 100644 --- a/doc/source/userguide.rst +++ b/doc/source/userguide.rst @@ -873,7 +873,7 @@ Use ``-V`` or ``--version`` to get the version of the RUBEM. .. code-block:: console $ python rubem.py --version - RUBEM v0.1.0 + RUBEM v0.1.3 Use ``-c`` or ``--configfile`` to set the path of the RUBEM configuration file. diff --git a/pyproject.toml b/pyproject.toml index 297459d..3a849ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "rubem" -version = "0.1.0" +version = "0.1.3" description = "Rainfall rUnoff Balance Enhanced Model (RUBEM) is a distributed hydrological model to calculate monthly flows with changes in land use over time" authors = ["LabSid PHA EPUSP "] license = "GPL v3" diff --git a/rubem/__version__.py b/rubem/__version__.py index b87c2b3..98eaf57 100644 --- a/rubem/__version__.py +++ b/rubem/__version__.py @@ -2,6 +2,6 @@ __email__ = "rubem.hydrological@labsid.eng.br" __copyright__ = "Copyright 2020-2022, LabSid PHA EPUSP" __license__ = "GPL" -__date__ = "2021-11-23" -__version__ = "0.1.0" +__date__ = "2022-03-23" +__version__ = "0.1.3" __release__ = __version__ + "-alpha" diff --git a/tests/unit/test_version.py b/tests/unit/test_version.py index 063e91a..678b025 100644 --- a/tests/unit/test_version.py +++ b/tests/unit/test_version.py @@ -25,10 +25,10 @@ def test_license_str(self): self.assertEqual("GPL", rbv.__license__) def test_date_str(self): - self.assertEqual("2021-11-23", rbv.__date__) + self.assertEqual("2022-03-23", rbv.__date__) def test_version_str(self): - self.assertEqual("0.1.0", rbv.__version__) + self.assertEqual("0.1.3", rbv.__version__) def test_release_str(self): - self.assertEqual("0.1.0-alpha", rbv.__release__) + self.assertEqual("0.1.3-alpha", rbv.__release__) From 83ff09fad14dc74cd8af36fd3f3e831a3cf8bb4a Mon Sep 17 00:00:00 2001 From: Gabriel Soares <70075435+soaressgabriel@users.noreply.github.com> Date: Wed, 23 Mar 2022 21:59:46 -0300 Subject: [PATCH 4/4] Remove empty line --- doc/source/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index 5a44b31..7c713b0 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -42,4 +42,4 @@ Version 0.1.0-alpha - `@soaressgabriel `__: Refactoring of core module (`#76 `__); - `@soaressgabriel `__: Review of the source code base (`#5 `__); - `@soaressgabriel `__: Clean up the source code base (`#18 `__); -- +