Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace download links for the datasets #80

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/build-test-conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and test using Conda

on:
push:
branches: [ main, development ]
pull_request:
branches: [ main, development ]

jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file env-prod.yml --name base
- name: Lint with flake8
run: |
conda install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
conda install pytest
pytest
39 changes: 39 additions & 0 deletions .github/workflows/codecov-conda.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Upload coverage to Codecov

on: [push]

jobs:
run:
runs-on: ubuntu-latest
env:
OS: ubuntu-latest
PYTHON: '3.9'
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.9
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies
run: |
conda env update --file env-prod.yml --name base
- name: Generate coverage report
run: |
conda install -c conda-forge pytest pytest-cov -y
pytest --cov=./ --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./coverage1.xml,./coverage2.xml
flags: unittests
name: codecov-umbrella
path_to_write_report: ./coverage/codecov_report.txt
verbose: true
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '19 17 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
16 changes: 16 additions & 0 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Greetings

on: [pull_request, issues]

jobs:
greeting:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Welcome to RUBEM community! Thanks so much for creating your first issue :)'
pr-message: 'Thanks so much for creating your first PR, the RUBEM community thanks you :)'
25 changes: 25 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Close inactive issues
on:
schedule:
- cron: "30 1 * * *"

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v3
with:
days-before-issue-stale: 30
days-before-issue-close: 14
stale-issue-label: "stale"
stale-pr-label: 'stale'
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
stale-pr-message: "This pull request is stale because it has been open for 45 days with no activity."
close-pr-message: "This pull request was closed because it has been inactive for 30 days since being marked as stale."
days-before-pr-stale: 45
days-before-pr-close: 30
repo-token: ${{ secrets.GITHUB_TOKEN }}
9 changes: 4 additions & 5 deletions LICENSE.md → LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -631,9 +631,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
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
Rainfall rUnoff Balance Enhanced Model distributed hydrological model
Copyright (C) 2020-2021 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
Expand All @@ -653,7 +652,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-2021 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.
Expand All @@ -672,4 +671,4 @@ into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.
29 changes: 23 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
<!-- PROJECT SHIELDS -->
[![Documentation Status][readthedocs-shield]][readthedocs-url]
[![Contributors][contributors-shield]][contributors-url]
[![GitHub Commit Activity][commit-activity-shield]][commit-activity-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![LabSid YouTube Channel][youtube-shield]][youtube-url]
<!-- [![GPL v3 License][license-shield]][license-url] -->

<!-- PROJECT LOGO -->
<br />
<p align="center">
<a href="https://github.com/LabSid-USP/RUBEM">
<img src="doc/source/_static/icon.png" alt="Logo" width="120" height="120">
</a>

<h1 align="center"><b>RUBEM</b></h1>
<h2 align="center">Rainfall rUnoff Balance Enhanced Model</h2>

<h1 align="center">RUBEM<br>Rainfall rUnoff Balance Enhanced Model</br></h1>
<p align="center">
RUBEM is a distributed hydrological model to calculate monthly flows with changes in land use over time.
<br />
Expand Down Expand Up @@ -42,7 +46,6 @@
<ul>
<li><a href="#prerequisites">Prerequisites</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#packaging">Packaging</a></li>
</ul>
</li>
<li><a href="#usage">Usage</a></li>
Expand Down Expand Up @@ -166,4 +169,18 @@ In any of our communication channels please abide by the [RUBEM Code of Conduct]

<!-- MARKDOWN LINKS & IMAGES -->
[readthedocs-shield]: https://readthedocs.org/projects/rubem/badge/?version=latest
[readthedocs-url]: https://rubem.readthedocs.io/en/latest/?badge=latest
[readthedocs-url]: https://rubem.readthedocs.io/en/latest/?badge=latest
[contributors-shield]: https://img.shields.io/github/contributors/LabSid-USP/RUBEM
[contributors-url]: https://github.com/LabSid-USP/RUBEM/graphs/contributors
[commit-activity-shield]: https://img.shields.io/github/commit-activity/m/LabSid-USP/RUBEM
[commit-activity-url]: https://github.com/LabSid-USP/RUBEM/pulse
[forks-shield]: https://img.shields.io/github/forks/LabSid-USP/RUBEM
[forks-url]: https://github.com/LabSid-USP/RUBEM/network/members
[stars-shield]: https://img.shields.io/github/stars/LabSid-USP/RUBEM
[stars-url]: https://github.com/LabSid-USP/RUBEM/stargazers
[issues-shield]: https://img.shields.io/github/issues/LabSid-USP/RUBEM
[issues-url]: https://github.com/LabSid-USP/RUBEM/issues
[license-shield]: https://img.shields.io/github/license/LabSid-USP/RUBEM
[license-url]: https://github.com/LabSid-USP/RUBEM/blob/master/LICENSE.md
[youtube-shield]: https://img.shields.io/youtube/channel/subscribers/UCZOGKRCW5mQOY9_w8L7lKJg
[youtube-url]: https://www.youtube.com/user/labsidengbr
2 changes: 1 addition & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ Sphinx==4.2.0
sphinx-rtd-theme==1.0.0
sphinxcontrib-email==0.3.5
sphinxcontrib-youtube==1.0.1
sphinx-autodoc-typehints=1.12.0
sphinx-autodoc-typehints==1.12.0
8 changes: 4 additions & 4 deletions doc/source/datasets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://www.hydroshare.org/resource/6f3670b8cd944e7ea72e03d1b9ca928f/data/contents/Upper%20Iguazu%20Basin>`__ | `Alternative link <https://drive.google.com/drive/folders/1FkiajNrMnmLpjOiS6WpfnFQFFc_CZH29?usp=sharing>`__
`Download here <https://drive.google.com/drive/folders/1FkiajNrMnmLpjOiS6WpfnFQFFc_CZH29?usp=sharing>`__ | `Alternative link <http://labsid.eng.br/rubemdataset/Upper_Iguazu_Basin.zip>`__

- **Data Format:** GeoTIFF and PCRaster raster files, .txt;
- **Size:** 222 MB
Expand Down Expand Up @@ -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 <https://www.hydroshare.org/resource/6f3670b8cd944e7ea72e03d1b9ca928f/data/contents/Piracicaba%20Basin>`__ | `Alternative link <https://drive.google.com/drive/folders/1u-jbmzv_gflAn9loPCJFEBCKbvEXE7-N?usp=sharing>`__
`Download here <https://drive.google.com/drive/folders/1u-jbmzv_gflAn9loPCJFEBCKbvEXE7-N?usp=sharing>`__ | `Alternative link <http://labsid.eng.br/rubemdataset/Piracicaba_Basin.zip>`__

- **Data Format:** GeoTIFF and PCRaster raster files, .txt;
- **Size:** 1,73 GB
Expand Down Expand Up @@ -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 <https://www.hydroshare.org/resource/6f3670b8cd944e7ea72e03d1b9ca928f/data/contents/Ipojuca%20Basin>`__ | `Alternative link <https://drive.google.com/drive/folders/1HppA2FOeSVe1qihoixTbXjGXOwNQ7T7Q?usp=sharing>`__
`Download here <https://drive.google.com/drive/folders/1HppA2FOeSVe1qihoixTbXjGXOwNQ7T7Q?usp=sharing>`__ | `Alternative link <http://labsid.eng.br/rubemdataset/Ipojuca_Basin.zip>`__


- **Data Format:** GeoTIFF and PCRaster raster files, .txt;
Expand All @@ -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 <cite-us>`
- **References:** :any:`Mello Júnior et al. 2021 <cite-us>`
2 changes: 1 addition & 1 deletion doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Welcome to Rainfall rUnoff Balance Enhanced Model (RUBEM)'s documentation!

RUBEM stands for "Rainfall rUnoff Balance Enhanced Model". It is a distributed hydrological model to calculate the hydrological mass balance. The physical process of the mass balance in the soil layer is described to calculate the recharge, interception, evapotranspiration, and runoff.

Development and maintenance of the current official version of the RUBEM is led by the `Laboratório de Sistemas de Suporte a Decisões em Engenharia Ambiental e Recursos Hídricos (LabSid) <http://labsid.eng.br/Contato.aspx>`_ in the `Departamento de Engenharia Hidráulica e Ambiental <http://www.pha.poli.usp.br/>`_ at the `Escola Politécnica da Universidade de São Paulo <http://www.poli.usp.br/>`_. The RUBEM Hydrological plugin for QGIS is an open source development project, which means that contributions are welcome, including to the plugin documentation.
Development and maintenance of the current official version of the RUBEM is led by the `Laboratório de Sistemas de Suporte a Decisões em Engenharia Ambiental e Recursos Hídricos (LabSid) <http://labsid.eng.br/Contato.aspx>`_ in the `Departamento de Engenharia Hidráulica e Ambiental <http://www.pha.poli.usp.br/>`_ at the `Escola Politécnica da Universidade de São Paulo <http://www.poli.usp.br/>`_. The RUBEM distributed hydrological model is an open source development project, which means that contributions are welcome, including to the plugin documentation.

All development activity is coordinated via the `RUBEM Github page <https://github.com/LabSid-USP/RUBEM#readme>`_, where you can also find all archived, current, beta, and development versions of this model.

Expand Down
8 changes: 8 additions & 0 deletions env-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
channels:
- conda-forge
- defaults
dependencies:
- python=3.10
- gdal
- pandas
- pcraster
8 changes: 8 additions & 0 deletions env-prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
channels:
- conda-forge
- defaults
dependencies:
- python=3.9
- gdal=3.*
- pandas=1.*
- pcraster=4.*