Skip to content

Commit

Permalink
Merge pull request #80 from Deltares/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
kdberends authored Apr 19, 2024
2 parents 13c3c72 + e95f584 commit 974707f
Show file tree
Hide file tree
Showing 74 changed files with 18,511 additions and 1,402 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@ name: ci
on: [push]

jobs:

CI:
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
poetry-version: ["1.8.2"]
os: [windows-latest]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -45,15 +44,26 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'

- name: Test with pytest
run: poetry run pytest --cov . --cov-report xml:coverage-reports/coverage-fm2prof-src.xml --junitxml=xunit-reports/xunit-result-fm2prof-src.xml
run: poetry run pytest --cov . --cov-report xml:.coverage-reports/coverage.xml

- name: Autoformat code if the check fails
if: ${{ (matrix.os == 'ubuntu-18.04') && (matrix.python-version == 3.7) }}
if: ${{ (matrix.os == 'ubuntu-18.04') && (matrix.python-version == 3.8) }}
run: |
poetry run isort .
poetry run black .
git config --global user.name '${{ github.actor }}'
git config --global user.email '${{ github.actor }}@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git checkout $GITHUB_HEAD_REF
git commit -am "autoformat: isort & black" && git push || true
git commit -am "autoformat: isort & black" && git push || true
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
args: >
-Dsonar.organization=deltares
-Dsonar.projectKey=Deltares_Fm2Prof
-Dsonar.python.coverage.reportPaths=.coverage-reports/coverage.xml
47 changes: 0 additions & 47 deletions .github/workflows/docs.yml

This file was deleted.

16 changes: 4 additions & 12 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
# This is the name and version displayed in the SonarCloud UI.
#sonar.projectKey=Deltares_Fm2Prof
#sonar.organization=Deltares
sonar.exclusions=docs/**, **.html,

# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.
# sonar.tests=tests/

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8
#sonar.coverage.exclusions=tests/**, coverage-reports/**, xunit-reports/**, **.yml
sonar.projectKey=Deltares_Fm2Prof
sonar.organization=deltares
sonar.python.coverage.reportPaths=coverage.xml
sonar.exclusions=docs/**, **.html,
250 changes: 132 additions & 118 deletions docs/CHANGELOG.rst → docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,118 +1,132 @@
## v2.2.7 (2023-10-03)

## v2.2.6 (2023-10-01)

- Fixed an issue where irregular station names like `MA_67.00Z` caused a sorting error in `utils.Compare1D2D`

## v2.2.5 (2023-07-28)

- FM2PROF now validates the "SkipMaps" parameter and throws error if its value is larger than the available number of maps
- Fixed bug that threw exception if roughness tables could not be produced during finalization step
- Fixed bug that prevented BranchRules file to be read if multiple empty lines existed at the end of the file
- Fixed bug where `utils.Compare1D2D` would throw exception if input netCDF files did not exist, but csv files did.
- Fixed bug in `utils.Compare1D2D` where execution failed if a QH relationship could not be produced
- Statistics are no longer computed on initialization of `utils.Compare1D2D`. Instead, they are not computed when requested during evaluation.

## v2.2.4 (2023-07-05)

- Implemented 'onlyFirst' and 'onlyLast' rules for BranchRules file

## v2.2.3 (2022-12-21)

- Implemented functionality to compare two 1D models for bed level change, Summer dike change and width change

## v2.2.2 (2022-08-26)

### Fix

- wrong method output type
- catching wrong exception
- exception in utils

## v2.2.1 (2022-08-24)

## v2.2.0 (2022-07-13)

### Fix

- log style now the same as stream, added support for tqdm
- added cross-section progress to log
- (#34)
- revised logger style (#34)
- first figure does not use correct style
- added 10 cm tolerance to section width correction
- main section width check
- output path compare1d2d discharge figure
- #33

## v2.1.2 (2022-07-05)

## v2.1.1 (2022-07-04)

### Fix

- missing index.rst

## v2.1.0 (2022-07-04)

### Fix

- macos/linux posixpath fail fix
- isolated set_locale and wrapped in try/except
- possibly fix posix path error with trailing whitespace
- run with ini suffix fix (#29)
- docs now only build on master

### Feat

- expanded cli
- groundwork for expansion of cli (#31, #30)
- overwrite option for output, single output folder (#31)
- added new tools to utils

## v2.0.0 (2022-06-28)

### Fix

- **IniFile**: fixed bug introduced by switching to pathlib
- output path now relative to config file

## v1.5.3 (2022-05-27)

### Fix

- adding cm accuracy to section width check (#23)

## v1.5.2 (2022-05-27)

### Fix

- adding cm accuracy to section width check (#23)
- main section width check
- fixed bug introduced by earlier fix :p
- files now relative to config file (#24)

## v1.5.1 (2022-05-26)

### Fix

- **CrossSection.py**: add main section width requirement (#23)

## v1.5.0 (2022-05-26)

### Fix

- **CrossSection.py**: add main section width requirement (#23)
- sc bug

### Feat

- **cli**: new cli with poetry script hook & python -m

## v1.4.4 (2022-05-03)

### Fix

- update black to 22.3 (#16)

## v1.4.3 (2021-11-29)
## v2.2.8 (2023-10-03)

This version update FM2PROF to Python 3.10 or higher. It removes unused dependencies and updates the package system `poetry` to version 1.8.2. Due to this switch, the commitizen workflow is currently not used, and the documentation system switch from sphinx to mkdocs.

This is the first version to be published to [PyPi](https://pypi.org/project/fm2prof/2.2.8/), which means that FM2PROF can now be installed using pip

`pip install fm2prof`

Known issues:

- The executable is not available for this version.

## v2.2.7 (2023-10-03)

This version adds the parameter stoptime to utils.Compare1D2D and makes both starttime and stoptime parameters optional. With these parameters users can crop the section of the results over which statistics will be computed and figures made.

## v2.2.6 (2023-10-01)

- Fixed an issue where irregular station names like `MA_67.00Z` caused a sorting error in `utils.Compare1D2D`

## v2.2.5 (2023-07-28)

- FM2PROF now validates the "SkipMaps" parameter and throws error if its value is larger than the available number of maps
- Fixed bug that threw exception if roughness tables could not be produced during finalization step
- Fixed bug that prevented BranchRules file to be read if multiple empty lines existed at the end of the file
- Fixed bug where `utils.Compare1D2D` would throw exception if input netCDF files did not exist, but csv files did.
- Fixed bug in `utils.Compare1D2D` where execution failed if a QH relationship could not be produced
- Statistics are no longer computed on initialization of `utils.Compare1D2D`. Instead, they are not computed when requested during evaluation.

## v2.2.4 (2023-07-05)

- Implemented 'onlyFirst' and 'onlyLast' rules for BranchRules file

## v2.2.3 (2022-12-21)

- Implemented functionality to compare two 1D models for bed level change, Summer dike change and width change

## v2.2.2 (2022-08-26)

### Fix

- wrong method output type
- catching wrong exception
- exception in utils

## v2.2.1 (2022-08-24)

## v2.2.0 (2022-07-13)

### Fix

- log style now the same as stream, added support for tqdm
- added cross-section progress to log
- (#34)
- revised logger style (#34)
- first figure does not use correct style
- added 10 cm tolerance to section width correction
- main section width check
- output path compare1d2d discharge figure
- #33

## v2.1.2 (2022-07-05)

## v2.1.1 (2022-07-04)

### Fix

- missing index.rst

## v2.1.0 (2022-07-04)

### Fix

- macos/linux posixpath fail fix
- isolated set_locale and wrapped in try/except
- possibly fix posix path error with trailing whitespace
- run with ini suffix fix (#29)
- docs now only build on master

### Feat

- expanded cli
- groundwork for expansion of cli (#31, #30)
- overwrite option for output, single output folder (#31)
- added new tools to utils

## v2.0.0 (2022-06-28)

### Fix

- **IniFile**: fixed bug introduced by switching to pathlib
- output path now relative to config file

## v1.5.3 (2022-05-27)

### Fix

- adding cm accuracy to section width check (#23)

## v1.5.2 (2022-05-27)

### Fix

- adding cm accuracy to section width check (#23)
- main section width check
- fixed bug introduced by earlier fix :p
- files now relative to config file (#24)

## v1.5.1 (2022-05-26)

### Fix

- **CrossSection.py**: add main section width requirement (#23)

## v1.5.0 (2022-05-26)

### Fix

- **CrossSection.py**: add main section width requirement (#23)
- sc bug

### Feat

- **cli**: new cli with poetry script hook & python -m

## v1.4.4 (2022-05-03)

### Fix

- update black to 22.3 (#16)

## v1.4.3 (2021-11-29)
2 changes: 2 additions & 0 deletions docs/blog/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Blog

Binary file added docs/figures/basic_workflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 974707f

Please sign in to comment.