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

Add validation rules for input rasters #111

Merged
merged 29 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c359d87
Change output file format enum values
soaressgabriel Feb 15, 2024
dfcfb6d
Refactor raster data rules enum
soaressgabriel Feb 15, 2024
9c3d99b
Add raster map validation handlers
soaressgabriel Feb 15, 2024
5f4aed2
Merge branch 'main' into feat/109-add-validation-rules-for-input-rasters
soaressgabriel Feb 19, 2024
d4ad9fc
Update RasterMapValidator and handler methods
soaressgabriel Feb 20, 2024
f76e5b0
Update input file formats docs
soaressgabriel Feb 20, 2024
7bbdea5
Update fileformats and userguide docs
soaressgabriel Feb 20, 2024
9bf1565
Remove VS project files
soaressgabriel Feb 20, 2024
9682571
Update userguide and fileformats doc pages
soaressgabriel Feb 21, 2024
32eabb1
Update output file format constants
soaressgabriel Feb 22, 2024
50059d8
Add unit tests for AllOnesValidatorHandler
soaressgabriel Feb 22, 2024
680a9e9
Add unit tests for AllZeroesValidatorHandler
soaressgabriel Feb 22, 2024
d20313e
Add unit tests for NoDataValidatorHandler
soaressgabriel Feb 22, 2024
36f1b1b
Add unit tests for ValueRangeValidatorHandler
soaressgabriel Feb 22, 2024
e947e1d
Fix `ModelConfiguration` unit tests
soaressgabriel Feb 22, 2024
9944ef7
Add unit tests for RasterMap class
soaressgabriel Feb 22, 2024
efc0bb0
Add unit tests for RasterBand class
soaressgabriel Feb 22, 2024
81f7234
Add Dependabot configuration for GitHub Actions
soaressgabriel Feb 22, 2024
fad1ddf
Add unit test workflow using Micromamba
soaressgabriel Feb 22, 2024
98a574b
Update build-test-micromamba.yml
soaressgabriel Feb 22, 2024
2648a46
Update environment files
soaressgabriel Feb 22, 2024
2ff053d
Add shell command to run pytest with bash
soaressgabriel Feb 22, 2024
e728ba7
Remove unused test_pcraster_map.py file
soaressgabriel Feb 22, 2024
3831e52
Refactor output directory validation and error handling
soaressgabriel Feb 22, 2024
ef3ea0e
Refactor unit tests for model configuration and raster map classes
soaressgabriel Feb 22, 2024
5948dca
Fix mocker.patch syntax error in test_raster_map.py
soaressgabriel Feb 22, 2024
7e76f47
Fix `TestOutputDataDirectory` tests
soaressgabriel Feb 22, 2024
a4e8ea0
Fix unit test for string representation of `OutputDataDirectory`
soaressgabriel Feb 22, 2024
5639e2a
Merge branch 'main' into feat/109-add-validation-rules-for-input-rasters
soaressgabriel Feb 22, 2024
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
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
day: monday
time: "08:00"
timezone: America/Sao_Paulo
reviewers:
- "soaressgabriel"
labels:
- "dependencies"
- "github_actions"
commit-message:
prefix: "[actions] "
open-pull-requests-limit: 100
33 changes: 33 additions & 0 deletions .github/workflows/build-test-micromamba.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Unit tests

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

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

steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
environment-file: env-dev.yml
init-shell: bash
cache-environment: true
post-cleanup: "all"
- name: Test with pytest
run: pytest -x -l -ra --junitxml="TestResults-Rubem.xml"
shell: bash -el {0}

- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: pytest-results-rubem
path: "TestResults-Rubem.xml"
retention-days: 1
if: ${{ always() }}
236 changes: 0 additions & 236 deletions RUBEM.pyproj

This file was deleted.

23 changes: 0 additions & 23 deletions RUBEM.sln

This file was deleted.

26 changes: 4 additions & 22 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,3 @@
# coding=utf-8
# RUBEM is a distributed hydrological model to calculate monthly
# flows with changes in land use over time.
# Copyright (C) 2020-2024 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# Contact: rubem.hydrological@labsid.eng.br

"""RUBEM help setup"""

# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
Expand Down Expand Up @@ -316,3 +294,7 @@
1,
)
]

# -- Options for Auto Section Label Extension ----------------------------------

autosectionlabel_prefix_document = True
Loading