Skip to content

Commit

Permalink
Merge branch 'main' into docs_add_PR_guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
veroandreo authored Aug 27, 2024
2 parents 1093296 + 6c5190e commit 1c96879
Show file tree
Hide file tree
Showing 73 changed files with 1,870 additions and 582 deletions.
16 changes: 7 additions & 9 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,15 @@ per-file-ignores =
python/grass/pygrass/raster/category.py: E721
python/grass/pygrass/rpc/__init__.py: F401, F403
python/grass/pygrass/utils.py: E402
python/grass/temporal/abstract_space_time_dataset.py: F841, E722
python/grass/temporal/c_libraries_interface.py: F841, E722
python/grass/temporal/abstract_space_time_dataset.py: E722
python/grass/temporal/c_libraries_interface.py: E722
python/grass/temporal/core.py: E722
python/grass/temporal/datetime_math.py: F841, E722
python/grass/temporal/open_stds.py: F841
python/grass/temporal/datetime_math.py: E722
python/grass/temporal/spatial_topology_dataset_connector.py: E722
python/grass/temporal/temporal_algebra.py: F841, E722
python/grass/temporal/temporal_granularity.py: F841, E722
python/grass/temporal/temporal_raster_base_algebra.py: F841, E722
python/grass/temporal/temporal_algebra.py: E722
python/grass/temporal/temporal_granularity.py: E722
python/grass/temporal/temporal_raster_base_algebra.py: E722
python/grass/temporal/temporal_topology_dataset_connector.py: E722
python/grass/temporal/temporal_vector_algebra.py: F841
python/grass/temporal/univar_statistics.py: E231
# Current benchmarks/tests are changing sys.path before import.
# Possibly, a different approach should be taken there anyway.
Expand Down Expand Up @@ -177,7 +175,7 @@ per-file-ignores =
# Line too long (esp. module interface definitions)
scripts/*/*.py: E501
# local variable 'column' is assigned to but never used
temporal/t.rast.to.vect/t.rast.to.vect.py: F841, E501
temporal/t.rast.to.vect/t.rast.to.vect.py: E501
# local variable 'stdstype' is assigned to but never used
temporal/t.vect.algebra/t.vect.algebra.py: F841, E501
# ## used (##% key: r etc)
Expand Down
32 changes: 32 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## Description
<!-- Describe your changes in detail -->

## Motivation and context
<!-- Why is this change required? What problem does it solve? -->
<!-- If it fixes an open issue, please link the issue here. -->

## How has this been tested?
<!-- Please describe how you tested your changes. -->

## Screenshots (if appropriate)

## Types of changes
<!-- What types of changes does your code introduce? -->
<!-- Put an `x` in all the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to not work as before)

## Checklist
<!-- See the following points, and put an `x` in all the boxes that apply. -->
<!-- If you're unsure about any of these, please ask. We're here to help! -->
- [ ] PR title provides summary of the changes and starts with one of the
[pre-defined prefixes](../../utils/release.yml)
<!-- For example: "doc: Add example to db.describe documentation" -->
<!-- or if it is a fix use "db.describe: fix JSON output format" -->
- [ ] My code follows the [code style](../../doc/development/style_guide.md)
of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
if: ${{ matrix.language == 'c-cpp' }}

- name: Initialize CodeQL
uses: github/codeql-action/init@429e1977040da7a23b6822b13c129cd1ba93dbb2 # v3.26.2
uses: github/codeql-action/init@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3.26.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@429e1977040da7a23b6822b13c129cd1ba93dbb2 # v3.26.2
uses: github/codeql-action/analyze@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3.26.5
with:
category: "/language:${{matrix.language}}"
4 changes: 3 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
macos_build:
name: macOS build
runs-on: macos-14
env:
PYTHONWARNINGS: always
steps:
- name: Info
run: |
Expand Down Expand Up @@ -88,7 +90,7 @@ jobs:
shell: bash -el {0}
run: |
grass --tmp-project XY --exec \
g.download.location url=${{ env.SampleData }} path=$HOME
g.download.project url=${{ env.SampleData }} path=$HOME
grass --tmp-project XY --exec \
python3 -m grass.gunittest.main \
--grassdata $HOME --location nc_spm_full_v2alpha2 --location-type nc \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export CPPFLAGS="-isystem${CONDA_PREFIX}/include"

./configure $CONFIGURE_FLAGS

EXEMPT="-Wno-error=deprecated-non-prototype -Wno-error=strict-prototypes"
EXEMPT=""
make -j$(sysctl -n hw.ncpu) CFLAGS="$CFLAGS -Werror $EXEMPT" \
CXXFLAGS="$CXXFLAGS -Werror $EXEMPT"

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/osgeo4w.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
cancel-in-progress: true

runs-on: ${{ matrix.os }}
env:
PYTHONWARNINGS: always
strategy:
matrix:
os:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@ jobs:
os:
- ubuntu-22.04
python-version:
- '3.8'
- '3.10'
- '3.9'
- '3.12'
- '3.13'
fail-fast: true

runs-on: ${{ matrix.os }}
env:
FORCE_COLOR: 1 # for software including pip: https://force-color.org/
CLICOLOR_FORCE: 1 # for other software including ninja: https://bixense.com/clicolors/
PYTHONWARNINGS: always

steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand All @@ -38,6 +39,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: pip
allow-prereleases: true

- name: Install non-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 @@ -36,7 +36,7 @@ jobs:
# renovate: datasource=pypi depName=bandit
BANDIT_VERSION: "1.7.9"
# renovate: datasource=pypi depName=ruff
RUFF_VERSION: "0.6.1"
RUFF_VERSION: "0.6.2"

runs-on: ${{ matrix.os }}
permissions:
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@429e1977040da7a23b6822b13c129cd1ba93dbb2 # v3.26.2
uses: github/codeql-action/upload-sarif@2c779ab0d087cd7fe7b826087247c2c81f27bfa6 # v3.26.5
with:
sarif_file: bandit.sarif

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_thorough.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set grass=%1
set python=%2

call %grass% --tmp-project XY --exec g.download.location url=https://grass.osgeo.org/sampledata/north_carolina/nc_spm_full_v2alpha2.tar.gz path=%USERPROFILE%
call %grass% --tmp-project XY --exec g.download.project url=https://grass.osgeo.org/sampledata/north_carolina/nc_spm_full_v2alpha2.tar.gz path=%USERPROFILE%
call %grass% --tmp-project XY --exec %python% -m grass.gunittest.main --grassdata %USERPROFILE% --location nc_spm_full_v2alpha2 --location-type nc --min-success 80
2 changes: 1 addition & 1 deletion .github/workflows/test_thorough.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
set -e

grass --tmp-project XY --exec \
g.download.location url=https://grass.osgeo.org/sampledata/north_carolina/nc_spm_full_v2alpha2.tar.gz path=$HOME
g.download.project url=https://grass.osgeo.org/sampledata/north_carolina/nc_spm_full_v2alpha2.tar.gz path=$HOME

grass --tmp-project XY --exec \
python3 -m grass.gunittest.main \
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
cancel-in-progress: true

runs-on: ${{ matrix.os }}
env:
PYTHONWARNINGS: always
strategy:
matrix:
name:
Expand Down
2 changes: 2 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ default: true

# Fix any fixable errors (depending on the markdownlint wrapper tool used)
fix: true

MD041: false # first-line-h1
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ repos:
)
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.1
rev: v0.6.2
hooks:
# Run the linter.
- id: ruff
Expand Down
11 changes: 7 additions & 4 deletions config.guess
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# shellcheck disable=SC2006,SC2268 # see below for rationale

timestamp='2024-01-01'
timestamp='2024-07-27'

# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -123,7 +123,7 @@ set_cc_for_build() {
dummy=$tmp/dummy
case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
,,) echo "int x;" > "$dummy.c"
for driver in cc gcc c89 c99 ; do
for driver in cc gcc c17 c99 c89 ; do
if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
CC_FOR_BUILD=$driver
break
Expand Down Expand Up @@ -634,7 +634,8 @@ EOF
sed 's/^ //' << EOF > "$dummy.c"
#include <sys/systemcfg.h>
main()
int
main ()
{
if (!__power_pc())
exit(1);
Expand Down Expand Up @@ -718,7 +719,8 @@ EOF
#include <stdlib.h>
#include <unistd.h>
int main ()
int
main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
Expand Down Expand Up @@ -1621,6 +1623,7 @@ cat > "$dummy.c" <<EOF
#endif
#endif
#endif
int
main ()
{
#if defined (sony)
Expand Down
Loading

0 comments on commit 1c96879

Please sign in to comment.