Skip to content

Commit

Permalink
Merge branch 'main' into markdown_docs
Browse files Browse the repository at this point in the history
  • Loading branch information
landam authored Oct 24, 2024
2 parents 54edbce + 3d7b331 commit 9e08f1b
Show file tree
Hide file tree
Showing 157 changed files with 526 additions and 745 deletions.
20 changes: 7 additions & 13 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,19 @@ per-file-ignores =
# E501 line too long
# E722 do not use bare 'except'
# W605 invalid escape sequence
# F401 imported but unused
# F821 undefined name 'unicode'
# F841 local variable assigned to but never used
# E741 ambiguous variable name 'l'
__init__.py: F401, F403
__init__.py: F403
man/build_html.py: E501
man/build_md.py: E501
doc/python/m.distance.py: E501
gui/scripts/d.wms.py: E501
gui/wxpython/image2target/g.gui.image2target.py: E501
gui/wxpython/nviz/*: E266, E722, F403, F405
gui/wxpython/nviz/*: E722
gui/wxpython/photo2image/*: F841, E722, E265
gui/wxpython/photo2image/g.gui.photo2image.py: E501, F841
gui/wxpython/psmap/*: F841, E266, E722
gui/wxpython/psmap/*: E501, E722
gui/wxpython/vdigit/*: F841, E722, F405, F403
gui/wxpython/animation/g.gui.animation.py: E501
gui/wxpython/tplot/frame.py: F841, E722
Expand Down Expand Up @@ -67,10 +66,8 @@ per-file-ignores =
python/grass/pygrass/vector/__init__.py: E402
python/grass/pygrass/raster/__init__.py: E402
python/grass/pygrass/vector/__init__.py: E402
python/grass/pygrass/modules/interface/*.py: F401
python/grass/pygrass/modules/grid/*.py: F401
python/grass/pygrass/raster/category.py: E721
python/grass/pygrass/rpc/__init__.py: F401, F403
python/grass/pygrass/rpc/__init__.py: F403
python/grass/pygrass/utils.py: E402
python/grass/temporal/abstract_space_time_dataset.py: E722
python/grass/temporal/c_libraries_interface.py: E722
Expand All @@ -83,17 +80,16 @@ per-file-ignores =
python/grass/temporal/temporal_topology_dataset_connector.py: E722
# Current benchmarks/tests are changing sys.path before import.
# Possibly, a different approach should be taken there anyway.
python/grass/pygrass/tests/benchmark.py: E402, F401, F821
python/grass/pygrass/tests/benchmark.py: E402, F821
# Configuration file for Sphinx:
# Ignoring import/code mix and line length.
# Files not managed by Black
python/grass/imaging/images2gif.py: E226
# Unused imports in init files
# F401 imported but unused
# F403 star import used; unable to detect undefined names
python/grass/*/__init__.py: F401, F403
python/grass/*/*/__init__.py: F401, F403
python/grass/*/*/*/__init__.py: F401, F403
python/grass/*/*/__init__.py: F403
python/grass/*/*/*/__init__.py: F403
# E402 module level import not at top of file
scripts/r.in.wms/wms_gdal_drv.py: E722
scripts/r.in.wms/wms_drv.py: E402, E722
Expand All @@ -107,9 +103,7 @@ per-file-ignores =
scripts/db.univar/db.univar.py: E501
scripts/d.frame/d.frame.py: E722
scripts/i.pansharpen/i.pansharpen.py: E722, E501
scripts/r.in.srtm/r.in.srtm.py: E722
scripts/r.fillnulls/r.fillnulls.py: E722
scripts/d.rast.edit/d.rast.edit.py: E722
scripts/v.what.strds/v.what.strds.py: E501
# Line too long (esp. module interface definitions)
scripts/*/*.py: E501
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/additional_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: Checkout repository contents
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 31

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: Formatting Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: DoozyX/clang-format-lint-action@c71d0bf4e21876ebec3e5647491186f8797fde31 # v0.18.2
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
Expand All @@ -56,7 +56,7 @@ jobs:
if: ${{ matrix.language == 'c-cpp' }}

- name: Initialize CodeQL
uses: github/codeql-action/init@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
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@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-22.04
if: github.repository == 'OSGeo/grass'
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Get dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create_release_draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
contents: write
steps:
- name: Checks-out repository
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.ref }}
fetch-depth: 0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Docker meta
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Get dependencies
run: |
sudo apt-get update -y
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
-mindepth 1 -maxdepth 1 -type f -print -delete
# Rehash to forget about the deleted files
hash -r
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Get current date cache key segment
id: date
# Year and week of year so cache key changes weekly
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/osgeo4w.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: msys2/setup-msys2@ddf331adaebd714795f1042345e6ca57bd66cea8 # v2.24.1
with:
path-type: inherit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/periodic_update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Create URL to the run output
id: vars
run: echo "run-url=https://github.com/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" >> $GITHUB_OUTPUT
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: "Check that autoconf scripts are up-to-date:"
run: |
rm -f config.guess config.sub
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
PYTHONWARNINGS: always

steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
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 @@ -54,7 +54,7 @@ jobs:
echo Bandit: ${{ env.BANDIT_VERSION }}
echo Ruff: ${{ env.RUFF_VERSION }}
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Python
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
path: bandit.sarif

- name: Upload SARIF File into Security Tab
uses: github/codeql-action/upload-sarif@f779452ac5af1c261dce0346a8f964149f49322b # v3.26.13
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v3.27.0
with:
sarif_file: bandit.sarif

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
statuses: write

steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
contents: read

steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Install nix
uses: DeterminateSystems/nix-installer-action@da36cb69b1c3247ad7a1f931ebfd954a1105ef14 # v14
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/titles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout base repository (doesn't include the PR changes)
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Call PR title validation function
run: python utils/generate_release_notes.py check "${PR_TITLE}" "" ""
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Invert inclusion list to an exclusion list
id: get-exclude
Expand Down
6 changes: 3 additions & 3 deletions db/db.login/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ int main(int argc, char *argv[])
exit(EXIT_SUCCESS);
}

if (db_set_login2(driver->answer, database->answer, user->answer,
password->answer, host->answer, port->answer,
G_get_overwrite()) == DB_FAILED) {
if (db_set_login(driver->answer, database->answer, user->answer,
password->answer, host->answer, port->answer,
G_get_overwrite()) == DB_FAILED) {
G_fatal_error(_("Unable to set user/password"));
}

Expand Down
2 changes: 1 addition & 1 deletion db/drivers/mysql/db.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int db__driver_open_database(dbHandle *handle)
connpar.host, connpar.port, connpar.dbname, connpar.user,
connpar.password);

db_get_login2("mysql", name, &user, &password, &host, &port);
db_get_login("mysql", name, &user, &password, &host, &port);

connection = mysql_init(NULL);
res =
Expand Down
4 changes: 2 additions & 2 deletions db/drivers/postgres/db.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int db__driver_open_database(dbHandle *handle)
return DB_FAILED;
}

db_get_login2("pg", name, &user, &password, &host, &port);
db_get_login("pg", name, &user, &password, &host, &port);

pg_conn = PQsetdbLogin(host, port, pgconn.options, pgconn.tty,
pgconn.dbname, user, password);
Expand Down Expand Up @@ -241,7 +241,7 @@ int create_delete_db(dbHandle *handle, int create)
pgconn.host, pgconn.port, pgconn.options, pgconn.tty, pgconn.dbname,
pgconn.user, pgconn.password, pgconn.host, pgconn.port,
pgconn.schema);
db_get_login2("pg", template_db, &user, &password, &host, &port);
db_get_login("pg", template_db, &user, &password, &host, &port);

pg_conn = PQsetdbLogin(host, port, pgconn.options, pgconn.tty,
pgconn.dbname, user, password);
Expand Down
2 changes: 1 addition & 1 deletion db/drivers/postgres/listdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int db__driver_list_databases(dbString *dbpath, int npaths, dbHandle **dblist,
pgconn.dbname, pgconn.user, pgconn.password, pgconn.host,
pgconn.port, pgconn.options, pgconn.tty);

db_get_login2("pg", NULL, &user, &passwd, &host, &port);
db_get_login("pg", NULL, &user, &passwd, &host, &port);
G_debug(1, "user = %s, passwd = %s", user, passwd ? "xxx" : "");

if (user || passwd) {
Expand Down
1 change: 0 additions & 1 deletion doc/notebooks/hydrology.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
"outputs": [],
"source": [
"# Import Python standard library and IPython packages we need.\n",
"import os\n",
"import subprocess\n",
"import sys\n",
"import csv\n",
Expand Down
1 change: 0 additions & 1 deletion doc/notebooks/jupyter_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"source": [
"# Import Python standard library and IPython packages we need.\n",
"import subprocess\n",
"import time\n",
"import sys\n",
"\n",
"# Ask GRASS GIS where its Python packages are.\n",
Expand Down
1 change: 0 additions & 1 deletion doc/notebooks/parallelization_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import subprocess\n",
"import sys\n",
"\n",
Expand Down
1 change: 0 additions & 1 deletion doc/notebooks/solar_potential.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"outputs": [],
"source": [
"# Import Python standard library and IPython packages we need.\n",
"import os\n",
"import subprocess\n",
"import sys\n",
"\n",
Expand Down
1 change: 0 additions & 1 deletion doc/notebooks/viewshed_analysis.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"outputs": [],
"source": [
"# Import Python standard library and IPython packages we need.\n",
"import os\n",
"import subprocess\n",
"import sys\n",
"\n",
Expand Down
Loading

0 comments on commit 9e08f1b

Please sign in to comment.