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

E722 #21

Merged
merged 57 commits into from
Nov 11, 2024
Merged

E722 #21

merged 57 commits into from
Nov 11, 2024

Commits on Oct 29, 2024

  1. Configuration menu
    Copy the full SHA
    6e5643d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8649713 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2024

  1. v.unpack: Fixed bare 'except' (#4616)

    * updated E722
    
    * updated .flake8
    
    * Update v.unpack.py
    arohanajit authored Oct 30, 2024
    Configuration menu
    Copy the full SHA
    9be02ee View commit details
    Browse the repository at this point in the history
  2. wxGUI: Fixed bare 'except' in nviz/ (#4613)

    * updated E722
    
    * updates
    
    * updates
    
    ---------
    
    Co-authored-by: Anna Petrasova <[email protected]>
    arohanajit and petrasovaa authored Oct 30, 2024
    Configuration menu
    Copy the full SHA
    9581ca1 View commit details
    Browse the repository at this point in the history
  3. lib/ogsf: Dereference after null check in gvl2.c (#4588)

    Dereference after null check
    ShubhamDesai authored Oct 30, 2024
    Configuration menu
    Copy the full SHA
    528763f View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2024

  1. Configuration menu
    Copy the full SHA
    00f51c9 View commit details
    Browse the repository at this point in the history
  2. r.mask.status: Always output name of the mask (#4531)

    For both active and inactive raster mask, show the name of the raster which is used (or would be used) for the mask. This will allow tools like r.mask or GUI to do lower-level operations with or around mask without a need to know about defaults or user mechanism to change the name.
    
    I'm repurposing the existing 'name' (full_name) key which is now always set (as opposed to being null when no mask is present) as the 'present' boolean key already has the information on the mask presence. I'm renaming full_name to name because that creates a simpler interface (which is whole point of outputting full name as opposed to two keys to get name and mapset).
    wenzeslaus authored Oct 31, 2024
    Configuration menu
    Copy the full SHA
    ba0a495 View commit details
    Browse the repository at this point in the history
  3. r.buildvrt: document performance issues with external data (#4441)

    * document performance issue
    
    * address code review
    
    * Apply suggestions from code review
    
    Co-authored-by: Markus Neteler <[email protected]>
    
    * consistent recommendation
    
    * remove leftover dot
    
    ---------
    
    Co-authored-by: Markus Neteler <[email protected]>
    ninsbl and neteler authored Oct 31, 2024
    Configuration menu
    Copy the full SHA
    f9f01e1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d5a8722 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    5b9b46a View commit details
    Browse the repository at this point in the history
  6. CI(deps): Update docker/dockerfile Docker tag to v1.11 (#4621)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 31, 2024
    Configuration menu
    Copy the full SHA
    3f0b69f View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2024

  1. Configuration menu
    Copy the full SHA
    7d9bbac View commit details
    Browse the repository at this point in the history
  2. lib: Add new SRTM_percent color table (#4608)

    This color table uses the color ramp from the srtm_plus color table for terrain to create colors for relative elevation (spread over the range of elevations in a raster map) rather than absolute elevation in meters. This applies srtm colors in a way similar to the way the elevation color table applies them. This color table is especially useful in creating nice looking elevation maps and shading relief maps.
    cmbarton authored Nov 1, 2024
    Configuration menu
    Copy the full SHA
    4385b26 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4964f45 View commit details
    Browse the repository at this point in the history
  4. grass.script: Pass environment to message functions (#4630)

    While the message functions (fatal, warning, message, info, debug, verbose, percent) have env parameter, grass.script was not consistently passing the env parameter to these functions. This fixes all the clear cases in functions which themselves have env (but does not touch any which don't have it where the fix needs to be more complex).
    
    These functions can now be called and produce these messages even for non-global sessions.
    wenzeslaus authored Nov 1, 2024
    Configuration menu
    Copy the full SHA
    cb3d12b View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2024

  1. Configuration menu
    Copy the full SHA
    0824e88 View commit details
    Browse the repository at this point in the history
  2. style: Sort package lists, configure options, and other various sorta…

    …ble files (#4563)
    
    * style: Sort packages in Vagrantfile
    
    * style: Sort configure flags in package.nix
    
    * style: Sort .gunittest.cfg
    
    * style: Sort Travis build files
    
    * style: Sort python optional_requirements.txt
    
    * style: Sort configure flags in GitHub workflows
    
    * style: Sort packages and configure flags for binder
    
    * style: Sort packages, configure flags, cmake flags and wget downloads in Dockerfiles
    
    * style: Sort configure flags in Vagrant script
    
    * style: Sort svn author name files with linux sort command
    
    * style: Sort contributors.csv and contributors_extra.csv
    
    * style: Sort rpm package spec
    
    * style: Sort packages and configure flags in mswindows build scripts
    
    * style: Sort macosx build script Readme
    
    * style: Sort singularity file
    
    * Apply changes from https://src.fedoraproject.org/rpms/grass/blob/rawhide/f/grass.spec
    echoix authored Nov 2, 2024
    Configuration menu
    Copy the full SHA
    e37730b View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2024

  1. python: Add typing to RPC server and Messenger (#4639)

    * grass.pygrass.rpc.base: Add typing annotations for lock and conn
    
    * grass.pygrass.rpc.base: Use context manager for lock in dummy_server
    
    * grass.pygrass.rpc.base: Use context manager for threadLock in RPCServerBase
    
    * grass.pygrass.rpc.base: Remove release lock in context manager
    
    * grass.pygrass.rpc.base: Add more typing annotations
    
    * grass.pygrass.rpc.base: Check for None to satisfy mypy type checking
    
    * grass.pygrass.rpc.base: Remove release lock in context managers, as they would be released when unlocked (RuntimeError: release unlocked lock)
    
    * grass.pygrass.rpc.base: Sort imports
    
    * grass.temporal.c_libraries_interface: Use context manager for lock in c_library_server
    
    * grass.temporal.c_libraries_interface: Add typing annotations for lock and conn
    
    * grass.pygrass.rpc.base: Change date of file header
    
    * grass.pygrass.rpc.base: Update docs of conn argument to mention that it is a multiprocessing.Connection object obtained from multiprocessing.Pipe
    
    * grass.temporal.c_libraries_interface: Change date of file header
    
    * grass.pygrass.rpc: Sort imports
    
    * grass.temporal.c_libraries_interface: Sort imports
    
    * Update docs of conn argument to mention that it is a multiprocessing.Connection object obtained from multiprocessing.Pipe
    
    * grass.pygrass.messages: Sort imports
    
    * Update docs of conn argument to mention that it is a multiprocessing.connection.Connection object obtained from multiprocessing.Pipe
    
    * grass.pygrass.rpc: Use context manager to acquire and release the lock
    
    * Fix typo in python/grass/pygrass/messages/testsuite/test_pygrass_messages_doctests.py
    
    * grass.pygrass.messages: Fix typo in message_server
    
    * grass.pygrass.messages: Missing "IMPORTANT" message type in message_server
    
    * grass.pygrass.messages: Add return type to get_msgr
    
    * grass.pygrass.messages: Add types to signatures in Messenger class and rest of file
    
    * grass.pygrass.messages: Use context manager for acquiring the lock in message_server()
    
    * grass.pygrass.messages: Add types to message_types to track missing conditions
    
    * grass.pygrass.messages: Extract message only for message_types where the variable is used
    
    * grass.pygrass.messages: Add parameter descriptions to percent(self, n, d, s)
    
    * grass.pygrass.messages: Initialize Messenger fields without setting them to None
    
    * grass.pygrass.messages: Fix typo
    
    * grass.pygrass.messages: Change date of file header
    echoix authored Nov 3, 2024
    Configuration menu
    Copy the full SHA
    35ebcb3 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2024

  1. Configuration menu
    Copy the full SHA
    d4bb783 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2024

  1. Configuration menu
    Copy the full SHA
    7cd22e9 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    847944e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3307797 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0ad65e4 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7d87859 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    baf93a5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    16c5f6f View commit details
    Browse the repository at this point in the history
  8. lib/ogsf: fix possible overflow errors in gsd_surf.c (#4635)

    ogsf: fix possible overflow errors in gsd modules
    
    In a lot of places, `(255 << 24)` which causes integer overflow
    and positive number gets converted to negative number. We
    were then assigning this to an unsigned integer in multiple
    places, which does conversion in a different way.
    
    For example: If we do unsigned int x = -20, `UINT_MAX + 1 - 20`
    is assigned to x.
    
    I do not think that's what is intended when we do
    `ktrans = (255 << 24)`. Fix instances of that, by using an
    unsigned int literal over int literal.
    
    This issue was found using cppcheck tool.
    
    Signed-off-by: Mohan Yelugoti <[email protected]>
    ymdatta authored Nov 5, 2024
    Configuration menu
    Copy the full SHA
    f7537c4 View commit details
    Browse the repository at this point in the history
  9. lib/vector/Vlib: Fix resource leak issue in clean_nodes.c (#4627)

    fix resource leak issue
    
    Co-authored-by: Shubham Vasudeo Desai <[email protected]>
    ShubhamDesai and Shubham Vasudeo Desai authored Nov 5, 2024
    Configuration menu
    Copy the full SHA
    4854f49 View commit details
    Browse the repository at this point in the history
  10. lib/ogsf: fix possible overflow errors in gvld.c (#4637)

    ogsf: fix possible overflow errors in gvld module
    
    We were doing `(255 << 24)` which causes integer overflow
    and positive number gets converted to negative number. We
    were then assigning this to an unsigned integer in multiple
    places, which does conversion in a different way.
    
    For example: If we do unsigned int x = -20, `UINT_MAX + 1 - 20`
    is assigned to x.
    
    I do not think that's what is intended when we do
    `ktrans = (255 << 24)`. Fix instances of that, by using an
    unsigned int literal over int literal.
    
    This issue was found using cppcheck tool.
    
    Signed-off-by: Mohan Yelugoti <[email protected]>
    ymdatta authored Nov 5, 2024
    Configuration menu
    Copy the full SHA
    c1d8557 View commit details
    Browse the repository at this point in the history
  11. lib/ogsf: fix possible overflow errors in gsd_wire.c (#4636)

    ogsf: fix possible overflow errors in gsd_wire
    
    In a code, we were doing `(255 << 24)` which causes integer overflow
    and positive number gets converted to negative number. We were then
    assigning this to an unsigned integer in multiple places, which does
    conversion in a different way.
    
    For example: If we do `unsigned int x = -20`, `UINT_MAX + 1 - 20` is
    assigned to x.
    
    I do not think that's what is intended when we do with `ktrans = (255 <<
    24)`. Fix instances of that, by using an `unsigned int literal`
    over `int literal`.
    
    This issue was found using cppcheck tool.
    
    Signed-off-by: Mohan Yelugoti <[email protected]>
    ymdatta authored Nov 5, 2024
    Configuration menu
    Copy the full SHA
    206cabc View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    039183d View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    f15230d View commit details
    Browse the repository at this point in the history
  14. r.colors.out: Add JSON support (#4555)

    * r.colors.out: added json output
    
    Signed-off-by: Nishant Bansal <[email protected]>
    
    * fixed CI build issues
    
    Signed-off-by: Nishant Bansal <[email protected]>
    
    * refactor code
    
    Signed-off-by: Nishant Bansal <[email protected]>
    
    * added more color formats and tests
    
    Signed-off-by: Nishant Bansal <[email protected]>
    
    * additional changes based on review
    
    Signed-off-by: Nishant Bansal <[email protected]>
    
    * fixes prototype declaration
    
    Signed-off-by: Nishant Bansal <[email protected]>
    
    * fixes test
    
    Signed-off-by: Nishant Bansal <[email protected]>
    
    * added option instead of flags
    
    Signed-off-by: Nishant Bansal <[email protected]>
    
    * Add a standard parser option for color formatting
    
    Signed-off-by: Nishant Bansal <[email protected]>
    
    * added changes based on review
    
    Signed-off-by: Nishant Bansal <[email protected]>
    
    * fixes function name
    
    Signed-off-by: Nishant Bansal <[email protected]>
    
    * fixes pytest failure
    
    Signed-off-by: Nishant Bansal <[email protected]>
    
    * Update lib/gis/parser_standard_options.c
    
    ---------
    
    Signed-off-by: Nishant Bansal <[email protected]>
    NishantBansal2003 authored Nov 5, 2024
    Configuration menu
    Copy the full SHA
    760d763 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2024

  1. Configuration menu
    Copy the full SHA
    98bccea View commit details
    Browse the repository at this point in the history
  2. python/grass/utils: fix checking server response content type/dispost…

    …ion header (#4658)
    
    To allow to download ZIP file.
    
    Server response headers which indicating ZIP file:
    
    content-type: application/octet-stream
    content-disposition: attachment; filename=natural_earth_dataset.zip
    
    Fix download Natural Earth Dataset in WGS84 from the server URL
    https://zenodo.org/records/13370131/files/natural_earth_dataset.zip
    tmszi authored Nov 6, 2024
    Configuration menu
    Copy the full SHA
    48e382c View commit details
    Browse the repository at this point in the history
  3. docs: i.albedo and r.li manual HTML fixes (#4654)

    doc: i.albedo and r.li manual HTML fixes
    
    This PR removes the unneeded header of the `r.li.html` metapage.
    
    Additionally:
    - style fix in `i.albedo.html`
    neteler authored Nov 6, 2024
    Configuration menu
    Copy the full SHA
    aa07454 View commit details
    Browse the repository at this point in the history
  4. r.report: Work with any mask name (also for r.kappa) (#4633)

    Use Rast_mask_status in r.report and r.kappa to get the name and state.
    wenzeslaus authored Nov 6, 2024
    Configuration menu
    Copy the full SHA
    9537d74 View commit details
    Browse the repository at this point in the history
  5. raster: Work with any mask name (r.surf.contour, r.random.cells, r.ra…

    …ndom.surface) (#4634)
    
    Use Rast_mask_status instead of hardcoded name MASK for r.surf.contour, r.random.cells, and r.random.surface. Raster mask if present, is loaded in a special way in these tools. After this change, the name of the mask is retrieved from the library (that's the important part) and the library is at the same time used to test the presence of the mask (as opposed to testing presence of raster directly, but that's just more convenient rather than conceptual).
    
    The change in r.random.surface code switching the if and else branches is to make it easier to write and more consistent with the other two.
    wenzeslaus authored Nov 6, 2024
    Configuration menu
    Copy the full SHA
    54d613f View commit details
    Browse the repository at this point in the history
  6. r.volume: Work with any mask name (#4632)

    Avoid hardcoded MASK by using the Rast_mask_status function. The rest of the logic stays the same so mask is read just as the plain raster map is read.
    
    Documentation is updated to use 'raster mask' instead of 'MASK'.
    wenzeslaus authored Nov 6, 2024
    Configuration menu
    Copy the full SHA
    69b20cf View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2024

  1. r.to.vect: Fix Resource Leak issue in areas_io.c (#4663)

    Fix Resource Leak issue
    ShubhamDesai authored Nov 7, 2024
    Configuration menu
    Copy the full SHA
    410cf5c View commit details
    Browse the repository at this point in the history
  2. CI: create versioned directory name of extracted tarball (#4659)

    Extracting the tarball will with this create a containing directory named
    'grass-x.y.z', where x, y, z stands for major, minor, micro/patch version.
    nilason authored Nov 7, 2024
    Configuration menu
    Copy the full SHA
    53c28f3 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2024

  1. t.rast.univar: allow r-flag combined with zones option (#4577)

    * allow r-flag and zones
    
    * add test for r-flag and zones
    
    * use region env only with zones
    
    * use region env for r3.univar
    
    * Update docstring
    ninsbl authored Nov 8, 2024
    Configuration menu
    Copy the full SHA
    b929809 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8716ba5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    600caae View commit details
    Browse the repository at this point in the history
  4. r.buffer: Added test script (#4482)

    * Added test script for r.buffer
    
    * Corrected input map and added tearDown method to delete temp maps
    
    * Added pre commit fixes
    
    * Added resolution for feedback
    
    * Tweaked the last test and used f string
    
    * Update raster/r.buffer/testsuite/test_buffer.py
    
    Reduced the region of the test
    
    Co-authored-by: Anna Petrasova <[email protected]>
    
    * Corrected redudancy
    
    * Streamlined output map initialization
    
    ---------
    
    Co-authored-by: Anna Petrasova <[email protected]>
    Shreshth-Malik and petrasovaa authored Nov 8, 2024
    Configuration menu
    Copy the full SHA
    54f2068 View commit details
    Browse the repository at this point in the history
  5. configure: build external libraries first (#4671)

    Enable use of external libraries in GRASS libraries.
    nilason authored Nov 8, 2024
    Configuration menu
    Copy the full SHA
    12e3e56 View commit details
    Browse the repository at this point in the history
  6. i.vi: Add ndwi color table to output (#4668)

    * i.vi: Add ndwi color table to output
    
    * Changed the min max values when setting the color table
    
    ---------
    
    Co-authored-by: Corey White <[email protected]>
    cwhite911 and Corey White authored Nov 8, 2024
    Configuration menu
    Copy the full SHA
    941e220 View commit details
    Browse the repository at this point in the history
  7. lib/gis: Fix out of scope memory access error in file_name function c…

    …all (#4650)
    
    lib/gis: Fix out of scope memory access error in file_name()
    
    When execution takes else path, pname, a pointer, is set to point
    to a local variable array which has limited scope. This same
    pointer is accessed outside of the block containing the local
    variable, essentially creating a scenario where we are accessing
    memory outside its score, which is undefined behavior.
    
    Move the variable array out of the loop, so that it has the same
    scope as pname.
    
    This was found using cppcheck tool.
    
    Signed-off-by: Mohan Yelugoti <[email protected]>
    ymdatta authored Nov 8, 2024
    Configuration menu
    Copy the full SHA
    fddbf9f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    177f5b4 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4f5da02 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    b18e390 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    7fe3fa5 View commit details
    Browse the repository at this point in the history
  12. r3.in.v5d, r3.out.v5d: Deprecate CRAY HW specific code (#4545)

    Currently, there is no sign either from GitHub issues or grass-dev archive that many people are using CRAY code which was introduced 25 years ago. As part of fixing a bug, we found that it was hard to find reference materials related to CRAY, due to it being old and not in usage anymore. For this reason, deprecate CRAY code and corresponding complexity that comes with it.
    
    Signed-off-by: Mohan Yelugoti <[email protected]>
    ymdatta authored Nov 8, 2024
    Configuration menu
    Copy the full SHA
    8dced26 View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2024

  1. r3.out.v5d: fix broken LITTLE ifdef-else macro in read_float4() (#4676)

    Fix regression introduced by 8dced26.
    nilason authored Nov 9, 2024
    Configuration menu
    Copy the full SHA
    8c4f244 View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2024

  1. CI(deps): Update ruff to v0.7.3 (#4672)

    * CI(deps): Update ruff to v0.7.3
    
    * style: Ignore PYI066 on non-stub files. Doesn't seem idiomatic and not understood by Pyright.
    
    * style: Fix split-static-string (SIM905)
    
    Ruff rule: https://docs.astral.sh/ruff/rules/split-static-string/
    
    * style: Ignore subclass-builtin (FURB189) in two files, as expected change is not guaranteed to be equivalent
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: Edouard Choinière <[email protected]>
    renovate[bot] and echoix authored Nov 11, 2024
    Configuration menu
    Copy the full SHA
    66aae0a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5046645 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f450382 View commit details
    Browse the repository at this point in the history