Skip to content

wgrib2: add cmake builder#48447

Merged
wdconinc merged 11 commits intospack:developfrom
AlexanderRichert-NOAA:wgrib2_cmake
Feb 18, 2025
Merged

wgrib2: add cmake builder#48447
wdconinc merged 11 commits intospack:developfrom
AlexanderRichert-NOAA:wgrib2_cmake

Conversation

@AlexanderRichert-NOAA
Copy link
Copy Markdown
Contributor

This PR provides major updates to the wgrib2 package, specifically, it adds newer, CMake-based versions.

@AlexanderRichert-NOAA
Copy link
Copy Markdown
Contributor Author

@AlysonStahl-NOAA if it's okay with you I want to add you as a maintainer for the wgrib2 Spack recipe. You'll automatically get approval requests for any changes.

@AlexanderRichert-NOAA
Copy link
Copy Markdown
Contributor Author

@spackbot fix style

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Jan 7, 2025

Let me see if I can fix that for you!

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Jan 7, 2025

I was able to run spack style --fix for you!

spack style --fix
==> Running style checks on spack
  selected: import, isort, black, flake8, mypy
==> Modified files
  var/spack/repos/builtin/packages/wgrib2/package.py
==> Running import checks
import check requires Python 3.9 or later
  import checks were clean
==> Running isort checks
  isort checks were clean
==> Running black checks
reformatted var/spack/repos/builtin/packages/wgrib2/package.py
All done! ✨ 🍰 ✨
1 file reformatted.
  black checks were clean
==> Running flake8 checks
var/spack/repos/builtin/packages/wgrib2/package.py:6: [F401] 'os' imported but unused
var/spack/repos/builtin/packages/wgrib2/package.py:169: [W605] invalid escape sequence '\#'
  flake8 found errors
==> Running mypy checks
lib/spack/spack/version/version_types.py:135: error: Incompatible types in assignment (expression has type "Tuple[Any, ...]", variable has type "Tuple[str]")  [assignment]
lib/spack/spack/variant.py:130: error: Unsupported right operand type for in ("Union[Collection[Any], Callable[..., Any]]")  [operator]
Found 2 errors in 2 files (checked 634 source files)
  mypy found errors
Keep in mind that I cannot fix your flake8 or mypy errors, so if you have any you'll need to fix them and update the pull request. If I was able to push to your branch, if you make further changes you will need to pull from your updated branch before pushing again.

I've updated the branch with style fixes.

@AlysonStahl-NOAA
Copy link
Copy Markdown

@AlysonStahl-NOAA if it's okay with you I want to add you as a maintainer for the wgrib2 Spack recipe. You'll automatically get approval requests for any changes.

Yep, that's fine.

@AlexanderRichert-NOAA
Copy link
Copy Markdown
Contributor Author

@AlysonStahl-NOAA @edwardhartnett these updates come from what's in the wgrib2 repository, but the changes are pretty substantial, so please double check my work in terms of version requirements/dependencies, etc. I've tested installed 3.5 and 3.4 on my local machine but I haven't tested different combinations of variants and such, so please let me know if there's any particular build options that should be tested (e.g., ones that have caused trouble in the past).

@AlexanderRichert-NOAA
Copy link
Copy Markdown
Contributor Author

@spackbot fix style

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Jan 7, 2025

Let me see if I can fix that for you!

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Jan 7, 2025

I was able to run spack style --fix for you!

spack style --fix
==> Running style checks on spack
  selected: import, isort, black, flake8, mypy
==> Modified files
  var/spack/repos/builtin/packages/wgrib2/package.py
==> Running import checks
import check requires Python 3.9 or later
  import checks were clean
==> Running isort checks
  isort checks were clean
==> Running black checks
reformatted var/spack/repos/builtin/packages/wgrib2/package.py
All done! ✨ 🍰 ✨
1 file reformatted.
  black checks were clean
==> Running flake8 checks
  flake8 checks were clean
==> Running mypy checks
lib/spack/spack/version/version_types.py:135: error: Incompatible types in assignment (expression has type "Tuple[Any, ...]", variable has type "Tuple[str]")  [assignment]
lib/spack/spack/variant.py:130: error: Unsupported right operand type for in ("Union[Collection[Any], Callable[..., Any]]")  [operator]
Found 2 errors in 2 files (checked 634 source files)
  mypy found errors
Keep in mind that I cannot fix your flake8 or mypy errors, so if you have any you'll need to fix them and update the pull request. If I was able to push to your branch, if you make further changes you will need to pull from your updated branch before pushing again.

I've updated the branch with style fixes.

@AlexanderRichert-NOAA
Copy link
Copy Markdown
Contributor Author

@edwardhartnett @Hang-Lei-NOAA please review, then we'll put the latest wgrib2 release in the next spack-stack release.

Copy link
Copy Markdown

@Hang-Lei-NOAA Hang-Lei-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wgrib2 version is from EMC repo.

Copy link
Copy Markdown
Contributor

@wdconinc wdconinc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay in reviewing this.

@wdconinc wdconinc self-assigned this Feb 16, 2025
@wdconinc wdconinc enabled auto-merge (squash) February 18, 2025 19:35
@wdconinc wdconinc merged commit 9c5b3cc into spack:develop Feb 18, 2025
14 checks passed
AlexanderRichert-NOAA added a commit to AlexanderRichert-NOAA/spack that referenced this pull request Feb 19, 2025
* wgrib2: add cmake builder

* wgrib2 add maintainer

* [@spackbot] updating style on behalf of AlexanderRichert-NOAA

* style fixes; add tar.gz for old vers

* license update

* wgrib2: don't restrict openjpeg variant by version

* Update var/spack/repos/builtin/packages/wgrib2/package.py

Co-authored-by: Massimiliano Culpo <[email protected]>

* [@spackbot] updating style on behalf of AlexanderRichert-NOAA

* Update package.py

* Update package.py

* Update var/spack/repos/builtin/packages/wgrib2/package.py

Co-authored-by: Wouter Deconinck <[email protected]>

---------

Co-authored-by: Massimiliano Culpo <[email protected]>
Co-authored-by: Wouter Deconinck <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants