Skip to content

Commit

Permalink
Merge branch 'main' into parallel_vsurfrst_cv
Browse files Browse the repository at this point in the history
  • Loading branch information
cyliang368 authored May 16, 2024
2 parents d9b6c71 + c17eaff commit 45baf1f
Show file tree
Hide file tree
Showing 27 changed files with 444 additions and 70 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ jobs:
sudo apt-get install -y wget git gawk findutils
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
- uses: rui314/setup-mold@6bebc01caac32fb5251ee64f60cea0322d0e6574 # v1
- uses: rui314/setup-mold@8de9eea54963d01c1a6c200606257d65bd53bea1 # v1
if: ${{ matrix.language == 'c-cpp' }}

- name: Initialize CodeQL
uses: github/codeql-action/init@ccf74c947955fd1cf117aef6a0e4e66191ef6f61 # v3.25.4
uses: github/codeql-action/init@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
Expand All @@ -81,6 +81,6 @@ jobs:
run: .github/workflows/build_ubuntu-22.04.sh "${HOME}/install"

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@ccf74c947955fd1cf117aef6a0e4e66191ef6f61 # v3.25.4
uses: github/codeql-action/analyze@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
with:
category: "/language:${{matrix.language}}"
7 changes: 5 additions & 2 deletions .github/workflows/osgeo4w.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
path-type: inherit
location: D:\
update: true
msystem: MINGW64
install: tar libintl make bison flex diffutils git dos2unix zip mingw-w64-x86_64-toolchain
mingw-w64-x86_64-fftw mingw-w64-x86_64-lapack mingw-w64-x86_64-pkgconf
mingw-w64-x86_64-gcc mingw-w64-x86_64-ccache mingw-w64-x86_64-zlib mingw-w64-x86_64-libiconv
Expand Down Expand Up @@ -65,13 +66,15 @@ jobs:
shell: msys2 {0}

- name: Compile GRASS GIS
run: D:\msys64\usr\bin\bash.exe -l (''+(Get-Location)+'\.github\workflows\build_osgeo4w.sh') (Get-Location)
shell: msys2 {0}
run: .github/workflows/build_osgeo4w.sh

- name: Test executing of the grass command
run: .github/workflows/test_simple.bat 'C:\OSGeo4W\opt\grass\grass84.bat'

- name: Test executing of the grass command in bash
run: D:\msys64\usr\bin\bash.exe .github/workflows/test_simple.sh
shell: msys2 {0}
run: .github/workflows/test_simple.sh

- name: Run tests
run: .github/workflows/test_thorough.bat 'C:\OSGeo4W\opt\grass\grass84.bat' 'C:\OSGeo4W\bin\python3'
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
xargs -a <(awk '! /^ *(#|$)/' ".github/workflows/apt.txt") -r -- \
sudo apt-get install -y --no-install-recommends --no-install-suggests
- uses: rui314/setup-mold@6bebc01caac32fb5251ee64f60cea0322d0e6574 # v1
- uses: rui314/setup-mold@8de9eea54963d01c1a6c200606257d65bd53bea1 # v1

- name: Install Python dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
path: bandit.sarif

- name: Upload SARIF File into Security Tab
uses: github/codeql-action/upload-sarif@ccf74c947955fd1cf117aef6a0e4e66191ef6f61 # v3.25.4
uses: github/codeql-action/upload-sarif@b7cec7526559c32f1616476ff32d17ba4c59b2d6 # v3.25.5
with:
sarif_file: bandit.sarif

Expand All @@ -117,7 +117,7 @@ jobs:
run: |
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV
- uses: rui314/setup-mold@6bebc01caac32fb5251ee64f60cea0322d0e6574 # v1
- uses: rui314/setup-mold@8de9eea54963d01c1a6c200606257d65bd53bea1 # v1
- name: Build
run: .github/workflows/build_${{ matrix.os }}.sh $HOME/install

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GRASS GIS Repository

[![Build Status](https://travis-ci.com/OSGeo/grass.svg?branch=main)](https://travis-ci.com/OSGeo/grass)
[![Build Status](https://api.travis-ci.com/OSGeo/grass.svg?branch=main)](https://travis-ci.com/OSGeo/grass)
[![GCC C/C++ standards check](https://github.com/OSGeo/grass/workflows/GCC%20C/C++%20standards%20check/badge.svg)](https://github.com/OSGeo/grass/actions?query=workflow%3A%22GCC+C%2FC%2B%2B+standards+check%22)
[![Python code quality check](https://github.com/OSGeo/grass/workflows/Python%20code%20quality%20check/badge.svg)](https://github.com/OSGeo/grass/actions?query=workflow%3A%22Python+code+quality+check%22)
[![General linting](https://github.com/OSGeo/grass/workflows/General%20linting/badge.svg)](https://github.com/OSGeo/grass/actions?query=workflow%3A%22General+linting%22)
Expand All @@ -11,7 +11,7 @@
[![Coverity](https://scan.coverity.com/projects/1038/badge.svg)](https://scan.coverity.com/projects/grass)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5176030.svg)](https://doi.org/10.5281/zenodo.5176030)
[![Join the chat at https://gitter.im/grassgis/community](https://badges.gitter.im/grassgis/community.svg)](https://gitter.im/grassgis/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)

## Description

Expand All @@ -23,7 +23,7 @@ visualization.
Launch this repository in Binder and experiment with GRASS's Python API in
Jupyter Notebooks by clicking the button below:

[![Binder](https://camo.githubusercontent.com/581c077bdbc6ca6899c86d0acc6145ae85e9d80e6f805a1071793dbe48917982/68747470733a2f2f6d7962696e6465722e6f72672f62616467655f6c6f676f2e737667)](https://mybinder.org/v2/gh/OSGeo/grass/main?urlpath=lab%2Ftree%2Fdoc%2Fnotebooks%2Fjupyter_example.ipynb)
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/OSGeo/grass/main?labpath=doc%2Fnotebooks%2Fjupyter_example.ipynb)

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion docker/debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:stable@sha256:84725fb1debbf461f54a23030be0bcde8449f2fa4eba8adf857b1a4c707fec8d
FROM debian:stable@sha256:82f8da149d6d567c74564cccd6f355fb5ade42a958e4cde10a1100eaeb24d42e
# currently Debian 12

# docker run -it --rm debian:stable bash
Expand Down
38 changes: 26 additions & 12 deletions gui/wxpython/gmodeler/g.gui.gmodeler.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ <h2>DESCRIPTION</h2>
<li>save model properties to a file (<i>GRASS Model File|*.gxm</i>)</li>
<li>export model to Python script</li>
<li>export model to Python script in the form of a PyWPS process</li>
<li>export model to an actinia process</li>
<li>export model to image file</li>
</ul>

Expand All @@ -57,7 +58,7 @@ <h3>Main dialog</h3>
(<font size="2" color="red">2</font>) Load model from file,
(<font size="2" color="red">3</font>) Save current model to file,
(<font size="2" color="red">4</font>) Export model to image,
(<font size="2" color="red">5</font>) Export model to Python script,
(<font size="2" color="red">5</font>) Export model to a (Python/PyWPS/actinia) script,
(<font size="2" color="red">6</font>) Add command (GRASS module) to model,
(<font size="2" color="red">7</font>) Add data to model,
(<font size="2" color="red">8</font>) Manually define relation between
Expand All @@ -82,9 +83,9 @@ <h3>Main dialog</h3>
<p>
There is also a lower menu bar in the Graphical modeler dialog where one can
manage model items, visualize commands, add or manage model variables,
define default values and descriptions. The Python editor dialog window
allows seeing workflows written in Python code, either as a basic Python
script, or as a PyWPS script. The rightmost tab of the bottom menu is
define default values and descriptions. The Script editor dialog window
allows seeing and exporting workflows as basic Python scripts, as PyWPS
scripts, or as actinia processes. The rightmost tab of the bottom menu is
automatically triggered when the model is activated and shows all the steps
of running GRASS modeler modules; in the case some errors occur in
the calculation process, they are are written at that place.
Expand Down Expand Up @@ -220,7 +221,7 @@ <h3>Managing model parameters</h3>
</center>

<p>
The final model, the list of all model items, and the Python code window with
The final model, the list of all model items, and the Script editor window with
<i>Save</i> and <i>Run</i> option are shown in the figures below.

<center>
Expand All @@ -237,7 +238,7 @@ <h3>Managing model parameters</h3>
<a href="g_gui_gmodeler_python.png">
<img src="g_gui_gmodeler_python.png" width="600" height="330"></a>
<br>
<i>Figure: Items with Python editor window.</i>
<i>Figure: Items with Script editor window.</i>
</center>

<p>
Expand Down Expand Up @@ -345,8 +346,8 @@ <h3>Handling intermediate data</h3>
<i>Figure: Usage and definition of intermediate data in model.</i>
</center>

<h3>Using the Python editor</h3>
By using the Python editor in the Graphical Modeler the user can add Python code and then
<h3>Using the Script editor</h3>
By using the Script editor in the Graphical Modeler, the user can add Python code and then
run it with <i>Run</i> button or just save it as a Python script <tt>*.py</tt>.
The result is shown in the Figure below:

Expand All @@ -356,11 +357,11 @@ <h3>Using the Python editor</h3>
<a href="g_gui_gmodeler_python_code_result.png">
<img src="g_gui_gmodeler_python_code_result.png" height="500"></a>
<br>
<i>Figure: Python editor in the wxGUI Graphical Modeler.</i>
<i>Figure: Script editor in the wxGUI Graphical Modeler.</i>
</center>

In the <i>Script type</i> combobox, the user can also choose a PyWPS export
instead of a basic Python script. A PyWPS process based on the model will be
The second option in the <i>Script type</i> combobox exports a PyWPS script
instead of a basic Python one. A PyWPS process based on the model will be
generated then; for the PyWPS script, the <i>Run</i> button is disabled as
users are expected to include this script in their web processing service and
not to run it on itself.
Expand All @@ -369,7 +370,20 @@ <h3>Using the Python editor</h3>
<a href="g_gui_gmodeler_pywps_code.png">
<img src="g_gui_gmodeler_pywps_code.png" width="500"></a>
<br>
<i>Figure: Python editor in the wxGUI Graphical Modeler - set to PyWPS.</i>
<i>Figure: Script editor in the wxGUI Graphical Modeler - set to PyWPS.</i>
</center>

The third option in the <i>Script type</i> combobox exports an actinia process
chain (non-parameterized model) or an actinia template (parameterized model).
An actinia JSON based on the model will be generated then; as for the PyWPS
script, the <i>Run</i> button is disabled as users are expected to include this
JSON in their web processing service and not to run it on itself.

<center>
<a href="g_gui_gmodeler_actinia_code.png">
<img src="g_gui_gmodeler_actinia_code.png" width="500"></a>
<br>
<i>Figure: Script editor in the wxGUI Graphical Modeler - set to actinia.</i>
</center>

<p>
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified gui/wxpython/gmodeler/g_gui_gmodeler_items.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified gui/wxpython/gmodeler/g_gui_gmodeler_python.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified gui/wxpython/gmodeler/g_gui_gmodeler_python_code.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified gui/wxpython/gmodeler/g_gui_gmodeler_python_code_result.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified gui/wxpython/gmodeler/g_gui_gmodeler_pywps_code.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 45baf1f

Please sign in to comment.