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

Cmake build work #2

Merged
merged 79 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
1a8cbec
Checks: fix flake8 E741 remainder (#3928)
mshukuno Jul 2, 2024
277a147
checks(ruff): Configure ruff linter (#3972)
echoix Jul 3, 2024
5513912
CI(deps): Update docker/build-push-action action to v6.3.0 (#3976)
renovate[bot] Jul 3, 2024
6424f9a
CI(deps): Update docker/setup-qemu-action action to v3.1.0 (#3977)
renovate[bot] Jul 3, 2024
71ed433
r.univar: add JSON support (#3783)
kritibirda26 Jul 3, 2024
cc75269
v.univar: add JSON support (#3784)
kritibirda26 Jul 3, 2024
56eaf9e
d.labels: Reduce scope of minreg and maxreg variables in main.c (#3979)
ShubhamDesai Jul 3, 2024
66c4df0
CI(deps): Update docker/setup-buildx-action action to v3.4.0 (#3982)
renovate[bot] Jul 4, 2024
79726a0
d.legend.vect: Reduce scope of 'bg_w' variable in draw.c (#3980)
ShubhamDesai Jul 4, 2024
cb1e9b3
lib: Fix uninitialized variable 'encoding' in parser_interface.c (#3975)
ShubhamDesai Jul 4, 2024
931e79a
CI(ruff): Fine tune posting Ruff suggestions (#3978)
echoix Jul 4, 2024
d880ec0
style: Fix unconventional-import-alias (ICN001) (consolidate `import …
echoix Jul 4, 2024
d1738f6
libvector/vedit: fix memory leaks (#3619)
nilason Jul 5, 2024
e4b3ddd
CI(deps): Update pre-commit hook astral-sh/ruff-pre-commit to v0.5.1 …
renovate[bot] Jul 5, 2024
6db6f81
CI(deps): Update dependency ruff to v0.5.1 (#3983)
renovate[bot] Jul 5, 2024
30f7a3c
CI(deps): Update actions/upload-artifact action to v4.3.4 (#3985)
renovate[bot] Jul 5, 2024
d528aa9
CI(deps): Update actions/download-artifact action to v4.1.8 (#3986)
renovate[bot] Jul 5, 2024
b432e42
CI(deps): Update rui314/setup-mold digest to 2e332a0 (#3989)
renovate[bot] Jul 6, 2024
559e088
i.segment: Fix uninitialized struct member 'ngbr_rc.next' in mean_shi…
ShubhamDesai Jul 6, 2024
1c3c303
lib: Fix uninitialized variable issue in shapiroe.c (#3994)
ShubhamDesai Jul 8, 2024
83f615a
i.segment: Fix uninitialized struct member error in region_growing.c …
ShubhamDesai Jul 8, 2024
ef69cb4
lib: Fixed uninitialized variable warning in dmax.c by initializing d…
ShubhamDesai Jul 8, 2024
c94708a
CI(deps): Update super-linter/super-linter action to v6.7.0 (#4002)
renovate[bot] Jul 8, 2024
cd64472
style: Fix pylint pointless-statement (W0104) (#3996)
echoix Jul 8, 2024
e952443
style: Fix replace-stdout-stderr (UP022) (#4000)
echoix Jul 8, 2024
f62b46f
ps.map: Fix uninitialized variable issues in r_colortable.c (#4004)
ShubhamDesai Jul 9, 2024
7b72452
style: Fix if-expr-with-true-false (SIM210) and if-expr-with-false-tr…
echoix Jul 9, 2024
18d11ad
pytest: Mark tests using space_time_raster_dataset as needs_solo_run …
echoix Jul 9, 2024
2f5bed6
style: Fix python logging-related pylint and ruff warnings (#3998)
echoix Jul 9, 2024
4be87a1
style: Fix pylint try-except-raise (W0706) (#3997)
echoix Jul 9, 2024
f4a407f
style: Fix incorrect-dict-iterator (PERF102) (#4007)
echoix Jul 9, 2024
89762ec
style: Ignore multiple-with-statements (SIM117) for test files (#4008)
echoix Jul 9, 2024
acc3e38
style: Fix loop-variable-overrides-iterator (B020) (#4010)
echoix Jul 9, 2024
b73eae5
style: Fix not-in-test (E713) and not-is-test (E714) (#4011)
echoix Jul 9, 2024
3e8706d
raster: Fix uninitialized variable issue in o_var.c (#4005)
ShubhamDesai Jul 9, 2024
87b6ac0
raster3d: Fix uninitialized variable issue in main.c (#4006)
ShubhamDesai Jul 9, 2024
6ebeb4b
CI: automatic update of nix lock file (#4016)
imincik Jul 10, 2024
152f493
nix: pin python version to 3.11 (#4017)
imincik Jul 10, 2024
2186ec5
CI(deps): Update actions/setup-python action to v5.1.1 (#4019)
renovate[bot] Jul 10, 2024
d41987c
style: Fix repeated-append (FURB113) (#4014)
echoix Jul 10, 2024
c9a1a17
i.segment: Fix uninitialized variable issue (#4023)
ShubhamDesai Jul 11, 2024
a3543cd
style: Fix if-exp-instead-of-or-operator (FURB110) (#4013)
echoix Jul 11, 2024
4aa61d7
style: Fix unnecessary-map (C417) (#4012)
echoix Jul 11, 2024
92cf465
style: Fix if-expr-min-max (FURB136) (#4026)
echoix Jul 11, 2024
6b38ffb
style: Fix too-many-newlines-at-end-of-file (W391) (#4025)
echoix Jul 11, 2024
169ca9b
style: Fix empty-comment (PLR2044) (#4024)
echoix Jul 11, 2024
ff453d2
style: Fix get-attr-with-constant (B009) (#4009)
echoix Jul 11, 2024
ff2da11
style: Fix unnecessary-comprehension-in-call (C419) (#4027)
echoix Jul 11, 2024
52a7fd7
style: Fix f-string-number-format (FURB116) (#4030)
echoix Jul 11, 2024
204903c
style: Fix is-literal (F632) (#4031)
echoix Jul 11, 2024
3ef2715
style: Fix print-empty-string (FURB105) (#4029)
echoix Jul 11, 2024
ee9fa48
doc: add Nix documentation (#3990)
imincik Jul 11, 2024
b3cb5db
CI(deps): Update github/codeql-action action to v3.25.12 (#4038)
renovate[bot] Jul 12, 2024
d31afbd
CI(deps): Update docker/dockerfile Docker tag to v1.9 (#4037)
renovate[bot] Jul 12, 2024
8f83c24
i.atcorr: Fix uninitialized variable (#4022)
ShubhamDesai Jul 13, 2024
cb0087e
style: Fix sorted-min-max (FURB192) (#4035)
echoix Jul 13, 2024
a751f93
style: Fix readlines-in-for (FURB129) (#4034)
echoix Jul 13, 2024
3b309db
style: Fix repeated-equality-comparison (PLR1714) (#4042)
echoix Jul 13, 2024
b01a67d
style: Fix unnecessary-assign (RET504) (#4043)
echoix Jul 13, 2024
d690d0c
style: Fix yoda-conditions (SIM300) (#4044)
echoix Jul 13, 2024
98222a2
style: Fix various FURB (small count) (#4046)
echoix Jul 13, 2024
7695805
style: Fix read-whole-file (FURB101) and write-whole-file (FURB103) (…
echoix Jul 13, 2024
b565924
style: repeated-global (FURB154) (#4048)
echoix Jul 14, 2024
1936cf0
style: Fix math-constant (FURB152) (#4049)
echoix Jul 14, 2024
951b71b
CI(deps): Lock file maintenance (#4057)
renovate[bot] Jul 15, 2024
793cc1b
CI(deps): Update docker/build-push-action action to v6.4.0 (#4059)
renovate[bot] Jul 15, 2024
2d055ab
CI: Configure Renovate update groups (#4053)
echoix Jul 15, 2024
f3681c5
CI(deps): Update ruff to v0.5.2 (#4061)
renovate[bot] Jul 15, 2024
e446882
Merge pull request #2 from Mahesh1998/cmake_build_work
HuidaeCho Jul 15, 2024
f0497c5
style: fix numpy-deprecation-rules (NPY) (#4062)
ninsbl Jul 16, 2024
692e330
CI(deps): Update docker/build-push-action action to v6.4.1 (#4064)
renovate[bot] Jul 17, 2024
f99780c
style: Fix collapsible-else-if (PLR5501) (#4045)
echoix Jul 17, 2024
972bd32
CI(deps): Update softprops/action-gh-release action to v2.0.7 (#4066)
renovate[bot] Jul 17, 2024
8291252
Fixed Building grass with Ubuntu System Libraries and cmake
Mahesh1998 Jul 17, 2024
0c3fded
raster: Fix uninitialized variable issue for C raster modules (#4065)
ShubhamDesai Jul 18, 2024
0c87922
Merge branch 'main' into cmake_build_work
echoix Jul 18, 2024
d3f25c5
Merge pull request #3 from Mahesh1998/ubuntu_sys_lib_cmake
HuidaeCho Jul 22, 2024
7e349f5
Added parson to r.univar, r3.univar, v.univar
Mahesh1998 Jul 29, 2024
b53059b
Merge pull request #4 from Mahesh1998/ubuntu_conda_lib_cmake
HuidaeCho Jul 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 5 additions & 9 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ per-file-ignores =
doc/python/vector_example_ctypes.py: F403, F405
doc/python/m.distance.py: F403, F405, E501
doc/gui/wxpython/example/dialogs.py: F401
locale/grass_po_stats.py: E122, E128, E231, E401, E722, E741
locale/grass_po_stats.py: E122, E128, E231, E401, E722
gui/scripts/d.wms.py: E501
gui/wxpython/core/gcmd.py: E402
gui/wxpython/core/gthread.py: F841
Expand Down Expand Up @@ -126,7 +126,6 @@ per-file-ignores =
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/rowio.py: E741
python/grass/pygrass/raster/category.py: E721
python/grass/pygrass/rpc/__init__.py: F401, F403
python/grass/pygrass/utils.py: E402
Expand All @@ -136,13 +135,11 @@ per-file-ignores =
python/grass/temporal/datetime_math.py: F841, E722
python/grass/temporal/open_stds.py: F841
python/grass/temporal/spatial_topology_dataset_connector.py: E722
python/grass/temporal/temporal_algebra.py: E741, F841, E722
python/grass/temporal/temporal_algebra.py: F841, E722
python/grass/temporal/temporal_granularity.py: F841, E722
python/grass/temporal/temporal_raster_algebra.py: E741
python/grass/temporal/temporal_raster_base_algebra.py: F841, E722
python/grass/temporal/temporal_raster3d_algebra.py: E741
python/grass/temporal/temporal_topology_dataset_connector.py: E722
python/grass/temporal/temporal_vector_algebra.py: E741, F841
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 All @@ -161,7 +158,7 @@ per-file-ignores =
# E402 module level import not at top of file
scripts/d.polar/d.polar.py: F841
scripts/r.in.wms/wms_gdal_drv.py: F841, E722
scripts/r.in.wms/wms_cap_parsers.py: F841, E741
scripts/r.in.wms/wms_cap_parsers.py: F841
scripts/r.in.wms/wms_drv.py: E402, E722
scripts/r.in.wms/srs.py: E722
scripts/r.semantic.label/r.semantic.label.py: F841, E501
Expand All @@ -170,8 +167,7 @@ per-file-ignores =
scripts/g.extension/g.extension.py: F841, E722, E501
scripts/v.unpack/v.unpack.py: F841, E722, E501
scripts/v.import/v.import.py: F841, E722, E501
scripts/db.univar/db.univar.py: E741, E501
scripts/d.rast.leg/d.rast.leg.py: E741
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
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/create-upload-suggestions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ runs:
echo "diff-file-name=${INPUT_DIFF_FILE_NAME}" >> "${GITHUB_OUTPUT}"
env:
INPUT_DIFF_FILE_NAME: ${{ steps.tool-name-safe.outputs.diff-file-name }}
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
id: upload-diff
if: >-
${{ (steps.files_changed.outputs.files_changed == 'true') &&
Expand All @@ -200,7 +200,7 @@ runs:
echo 'Suggestions can only be added near to lines changed in this PR.'
echo 'If any fixes can be added as code suggestions, they will be added shortly from another workflow.'
} >> "${GITHUB_STEP_SUMMARY}"
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
id: upload-changes
if: >-
${{ always() &&
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 @@ -43,7 +43,7 @@ jobs:
exclude: mswindows .*\.bat .*/testsuite/data/.*

- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: '3.10'

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: '3.x'
- name: Install non-Python dependencies
Expand All @@ -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@65685f45207903d37d006cd402c397653c57660e # v1
- uses: rui314/setup-mold@2e332a0b602c2fc65d2d3995941b1b29a5f554a0 # v1
if: ${{ matrix.language == 'c-cpp' }}

- name: Initialize CodeQL
uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
uses: github/codeql-action/init@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
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@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
uses: github/codeql-action/analyze@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
with:
category: "/language:${{matrix.language}}"
4 changes: 2 additions & 2 deletions .github/workflows/create_release_draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: '3.11'
- name: Create output directory
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
sha256sum ${{ env.GRASS }}.tar.xz > ${{ env.GRASS }}.tar.xz.sha256
- name: Publish draft distribution to GitHub (for tags only)
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0 # v2.0.6
uses: softprops/action-gh-release@fb2d03176f42a1f0dd433ca263f314051d3edd44 # v2.0.7
with:
name: GRASS GIS ${{ github.ref_name }}
body: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ jobs:
latest=false
suffix=-${{ matrix.os }}
- name: Set up QEMU
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0
uses: docker/setup-qemu-action@5927c834f5b4fdf503fca6f4c7eccda82949e1ee # v3.1.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
uses: docker/setup-buildx-action@4fd812986e6c8c2a69e18311145f9371337f27d4 # v3.4.0
- name: Login to DockerHub
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@15560696de535e4014efeff63c48f16952e52dd1 # v6.2.0
uses: docker/build-push-action@1ca370b3a9802c92e886402e0dd88098a2533b12 # v6.4.1
with:
push: true
pull: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
nc_spm_full_v2alpha2.tar.gz"
- name: Make HTML test report available
if: ${{ always() }}
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: testreport-macOS
path: testreport
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/osgeo4w.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:

- name: Make HTML test report available
if: ${{ always() }}
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: testreport-${{ matrix.os }}
path: testreport
Expand Down
21 changes: 20 additions & 1 deletion .github/workflows/post-pr-reviews.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- name: Create a .git directory needed by reviewdog
run: git init
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
id: diff
continue-on-error: true
with:
Expand Down Expand Up @@ -47,6 +47,7 @@ jobs:
INPUT_TOOL_NAMES: >-
black
clang-format
ruff
- name: Post Black suggestions
if: ${{ steps.tools.outputs.black == 'true' }}
run: |
Expand Down Expand Up @@ -83,3 +84,21 @@ jobs:
CI_REPO_OWNER: ${{ github.event.workflow_run.repository.owner.login }}
CI_REPO_NAME: ${{ github.event.workflow_run.repository.name }}
# CI_PULL_REQUEST: "" # Populated from reviewdog's "-guess" flag since hard to get
- name: Post Ruff suggestions
if: ${{ steps.tools.outputs.ruff == 'true' }}
run: |
TMPFILE="diff-${INPUT_TOOL_NAME}.patch"
GITHUB_ACTIONS="" reviewdog \
-name="${INPUT_TOOL_NAME:-reviewdog-suggester}" \
-f=diff \
-f.diff.strip=1 \
-filter-mode=nofilter \
-guess \
-reporter="github-pr-review" < "${TMPFILE}"
env:
INPUT_TOOL_NAME: ruff
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CI_COMMIT: ${{ github.event.workflow_run.head_sha }}
CI_REPO_OWNER: ${{ github.event.workflow_run.repository.owner.login }}
CI_REPO_NAME: ${{ github.event.workflow_run.repository.name }}
# CI_PULL_REQUEST: "" # Populated from reviewdog's "-guess" flag since hard to get
4 changes: 2 additions & 2 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand All @@ -46,7 +46,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@65685f45207903d37d006cd402c397653c57660e # v1
- uses: rui314/setup-mold@2e332a0b602c2fc65d2d3995941b1b29a5f554a0 # v1

- name: Install Python dependencies
run: |
Expand Down
28 changes: 23 additions & 5 deletions .github/workflows/python-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
PYLINT_VERSION: "2.12.2"
# renovate: datasource=pypi depName=bandit
BANDIT_VERSION: "1.7.9"
# renovate: datasource=pypi depName=ruff
RUFF_VERSION: "0.5.2"

runs-on: ${{ matrix.os }}
permissions:
Expand All @@ -50,17 +52,33 @@
echo Flake8: ${{ env.FLAKE8_VERSION }}
echo Pylint: ${{ env.PYLINT_VERSION }}
echo Bandit: ${{ env.BANDIT_VERSION }}
echo Ruff: ${{ env.RUFF_VERSION }}

- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Set up Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: pip
- name: Upgrade pip
run: python -m pip install --upgrade pip

- name: Install Ruff
run: pip install ruff==${{ env.RUFF_VERSION }}
- name: Run Ruff
run: ruff check --output-format=github . --preview --fix --unsafe-fixes
- name: Create and uploads code suggestions to apply for Ruff
# Will fail fast here if there are changes required
id: diff-ruff
# To run after ruff step exits with failure when rules don't have fixes available
if: ${{ !cancelled() }}
uses: ./.github/actions/create-upload-suggestions
with:
tool-name: ruff
# To keep repo's file structure in formatted changes artifact
extra-upload-changes: pyproject.toml

- name: Install Black only
run: pip install black[jupyter]==${{ env.BLACK_VERSION }}

Expand Down Expand Up @@ -108,13 +126,13 @@
bandit -c pyproject.toml -iii -r . -f sarif -o bandit.sarif --exit-zero

- name: Upload Bandit Scan Results
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: bandit.sarif
path: bandit.sarif

- name: Upload SARIF File into Security Tab
uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
uses: github/codeql-action/upload-sarif@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
with:
sarif_file: bandit.sarif

Expand All @@ -126,9 +144,9 @@
run: |
echo "MAKEFLAGS=-j$(nproc)" >> $GITHUB_ENV

- uses: rui314/setup-mold@65685f45207903d37d006cd402c397653c57660e # v1
- uses: rui314/setup-mold@2e332a0b602c2fc65d2d3995941b1b29a5f554a0 # v1
- name: Build
run: .github/workflows/build_${{ matrix.os }}.sh $HOME/install

Check warning on line 149 in .github/workflows/python-code-quality.yml

View workflow job for this annotation

GitHub Actions / Python Code Quality Checks (ubuntu-22.04)

Temporarily downgraded pytest-pylint and pytest to allow merging other PRs. The errors reported with a newer version seem legitimite and should be fixed (2023-10-18, see https://github.com/OSGeo/grass/pull/3205) (2024-01-28, see https://github.com/OSGeo/grass/issues/3380)

- name: Add the bin directory to PATH
run: |
Expand Down Expand Up @@ -181,7 +199,7 @@
cp -rp dist.$ARCH/docs/html/libpython sphinx-grass

- name: Make Sphinx documentation available
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: sphinx-grass
path: sphinx-grass
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 @@ -31,7 +31,7 @@ jobs:
# list of files that changed across commits
fetch-depth: 0
- name: Lint code base
uses: super-linter/super-linter/slim@88ea3923a7e1f89dd485d079f6eb5f5e8f937589 # v6.6.0
uses: super-linter/super-linter/slim@3fe03abab2eafb293ace16d4a3b07aeabcb3f1a0 # v6.7.0
env:
DEFAULT_BRANCH: main
# To report GitHub Actions status checks
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/test-nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
push:
tags:
- '*'
pull_request:
paths:
- 'flake.nix'
- 'flake.lock'
- 'package.nix'
- '.github/workflows/test-nix.yml'
workflow_dispatch:

concurrency:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:

- name: Make HTML test report available
if: ${{ always() }}
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: testreport-${{ matrix.os }}-${{ matrix.config }}-${{ matrix.extra-include }}
path: testreport
Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ repos:
python/libgrass_interface_generator/ctypesgen/|
lib/fonts/fonts/.*
)
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.2
hooks:
# Run the linter.
- id: ruff
types_or: [python, pyi, jupyter]
args: [--fix, --preview]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.41.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# syntax=docker/dockerfile:1.8@sha256:e87caa74dcb7d46cd820352bfea12591f3dba3ddc4285e19c7dcd13359f7cefd
# syntax=docker/dockerfile:1.9@sha256:fe40cf4e92cd0c467be2cfc30657a680ae2398318afd50b0c80585784c604f28

# Note: This file must be kept in sync in ./Dockerfile and ./docker/ubuntu/Dockerfile.
# Changes to this file must be copied over to the other file.
Expand Down
11 changes: 7 additions & 4 deletions display/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ if(WITH_DOCS)
DESTINATION ${GRASS_INSTALL_DOCDIR})
endif()
build_program_in_subdir(d.grid DEPENDS grass_gis grass_symb grass_gproj
grass_display LIBM)
grass_display GDAL LIBM)
build_program_in_subdir(d.his DEPENDS grass_gis grass_display grass_raster)
build_program_in_subdir(d.histogram DEPENDS grass_gis grass_display
grass_raster LIBM)
Expand All @@ -103,7 +103,7 @@ if(WITH_DOCS)
install(DIRECTORY ${OUTDIR}/${GRASS_INSTALL_DOCDIR}/northarrows
DESTINATION ${GRASS_INSTALL_DOCDIR})
endif()
build_program_in_subdir(d.path DEPENDS grass_gis grass_display grass_vector)
build_program_in_subdir(d.path DEPENDS grass_gis grass_display grass_vector GDAL)
build_program_in_subdir(d.profile DEPENDS grass_gis grass_display grass_raster LIBM)
build_program_in_subdir(d.rast DEPENDS grass_gis grass_display grass_raster)
build_program_in_subdir(d.rast.arrow DEPENDS grass_gis grass_raster
Expand All @@ -125,6 +125,7 @@ build_program_in_subdir(
grass_raster
grass_symb
grass_vector
GDAL
LIBM)
build_program_in_subdir(
d.vect.chart
Expand All @@ -136,6 +137,7 @@ build_program_in_subdir(
grass_gis
grass_symb
grass_vector
GDAL
LIBM)
build_program_in_subdir(
d.vect.thematic
Expand All @@ -147,5 +149,6 @@ build_program_in_subdir(
grass_display
grass_gis
grass_symb
grass_vector)
build_program_in_subdir(d.where DEPENDS grass_gis grass_display grass_gproj)
grass_vector
GDAL)
build_program_in_subdir(d.where DEPENDS grass_gis grass_display grass_gproj GDAL)
Loading
Loading