Skip to content

silence unpack_mht: suppress output of read_lines#19

Merged
hansvancalster merged 12 commits intonext-versionfrom
silence_unpack_mht
May 15, 2025
Merged

silence unpack_mht: suppress output of read_lines#19
hansvancalster merged 12 commits intonext-versionfrom
silence_unpack_mht

Conversation

@falkmielke
Copy link
Collaborator

@falkmielke falkmielke commented May 12, 2025

suppression of progress in the unpack_mht(path) function of get_coverage_wcs.R, which would otherwise produce empty stdout via readr::read_lines(path) progress.

fixes #18

(as an aside, I inserted explicit library calls such as readr::read_lines_raw which simplifies debugging on my system and increases portability potential of unpack_mht.)

@falkmielke falkmielke requested a review from hansvancalster May 12, 2025 08:05
@falkmielke falkmielke added the enhancement New feature or request label May 12, 2025
@falkmielke
Copy link
Collaborator Author

I am sorry for the linter errors with checklist; will correct them as soon as I get to it.
Spaces in stdout, indentation spaces... all just confirmation that inbospatial is about spaces. ;)

@hansvancalster
Copy link
Collaborator

I am sorry for the linter errors with checklist; will correct them as soon as I get to it. Spaces in stdout, indentation spaces... all just confirmation that inbospatial is about spaces. ;)

no problem. I actually hadn't started a new "next-version" branch yet (this one is behind main). So I will soon make a next-version branch that is up to date and bumps the version of the package and probably need to address linters due to update of checklist package as well.

@hansvancalster
Copy link
Collaborator

I have updated the next-version branch and merged it into this branch. Locally I see a problem with building the vignette, which I haven't looked into (maybe related to the fix you propose in this branch?):

E  creating vignettes (25.3s)
   --- re-building 'spatial_dhmv_query.Rmd' using rmarkdown
   
   Quitting from lines 63-70 [setup] (spatial_dhmv_query.Rmd)
   Error: processing vignette 'spatial_dhmv_query.Rmd' failed with diagnostics:
   trying to use CRAN without setting a mirror
   --- failed re-building 'spatial_dhmv_query.Rmd'

@falkmielke
Copy link
Collaborator Author

falkmielke commented May 13, 2025

This might be a local issue; I attempted to reproduce and verify, but my errors differ.
The lines 66-68 in vignettes/spatial_dhmv_query.Rmd are a bit unfortunate:

if (!requireNamespace("ows4R", quietly = TRUE)) {
  install.packages("ows4R")
}

It tries to install ows4R and on your system apparently fails to select a mirror.
It seems to me that ows4R development has been on hold for a while; maybe we should work around it?

Here is what I experienced:

  • After system upgrade, I had to install.packages("XML") to get ows4R running again (re-build install.packages("xml2") did not work).
  • There was also some hiccup with terra. It might be that this leaves a lockfile open (R/library/00LOCK-inbospatial).
  • installed inbospatial locally with devtools::install("/data/git/inbospatial", build_vignettes = TRUE, upgrade = TRUE, force = FALSE) (which again builds all the requirements) -> seems to work fine.
  • Warning remains: Warning message: In i.p(...) : installation of package ‘terra’ had non-zero exit status.

I added some more explicit package calls for verbosity.
Finally, I ran lintr::lint on the vignette file, should be better now.

@falkmielke
Copy link
Collaborator Author

falkmielke commented May 13, 2025

FYI I tried to run checklist::check_package() locally.

  • some URLs redirected -> adjusted
  • ran devtools::document()
  • looks good.

However, there are some warnings of which I do not know whether they cause the hiccup.

First, on pkgdown building the vignettes:

── Building articles ───────────────────────────────────────────────────────────
Reading vignettes/spatial_dhmv_query.Rmd
Loading ISO 19139 XML schemas...
Loading ISO 19115-3 XML schemas...
Loading ISO 19139 codelists...
Writing `articles/spatial_dhmv_query.html`
✖ Missing alt-text in vignettes/spatial_dhmv_query.Rmd
• ../reference/figures/qgis_lead.avif
• spatial_dhmv_query_files/figure-html/unnamed-chunk-14-1.png
• spatial_dhmv_query_files/figure-html/unnamed-chunk-15-1.png
ℹ Learn more in `vignette(pkgdown::accessibility)`.
Reading vignettes/wfs_wcs.Rmd
Writing `articles/wfs_wcs.html`
✖ Missing alt-text in vignettes/wfs_wcs.Rmd
• wfs_wcs_files/figure-html/unnamed-chunk-5-1.png
• wfs_wcs_files/figure-html/omz-example-1.png
• wfs_wcs_files/figure-html/dtm-example-1.png
ℹ Learn more in `vignette(pkgdown::accessibility)`.
── Building news ───────────────────────────────────────────────────────────────
── Building sitemap ────────────────────────────────────────────────────────────
── Building redirects ──────────────────────────────────────────────────────────
── Building search index ───────────────────────────────────────────────────────
── Checking for problems ───────────────────────────────────────────────────────
── Finished building pkgdown site for package inbospatial ──────────────────────
Warning messages:
1: The vignette title specified in \VignetteIndexEntry{} is different from the title in the YAML metadata. The former is "spatial_dhmv_query", and the latter is "Dissecting a WCS Query: DHMV Case Study.". If that is intentional, you may set options(rmarkdown.html_vignette.check_title = FALSE) to suppress this check.
2: The vignette title specified in \VignetteIndexEntry{} is different from the title in the YAML metadata. The former is "wfs_wcs", and the latter is "Example use cases to get data from web feature or web coverage services.". If that is intentional, you may set options(rmarkdown.html_vignette.check_title = FALSE) to suppress this check.

and, further down (checklist):

No problems found. Good job!

Warning messages:
1: Warning encountered while loading config:
Caused by warning:
! Warning from config setting `linters`.
Caused by warning:
! Argument allow_cascading_assign was deprecated in lintr version 3.2.0. Use "<<-" and/or "->>" in operator instead.
2: Warning encountered while loading config:
Caused by warning:
! Warning from config setting `linters`.
Caused by warning:
! Argument allow_right_assign was deprecated in lintr version 3.2.0. Use "->" in operator instead.

Copy link
Collaborator

@hansvancalster hansvancalster left a comment

Choose a reason for hiding this comment

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

All looks good! Checklist tests pass. Can you add an item in the NEWS.md file?

@hansvancalster
Copy link
Collaborator

The spell check is failing because linebreak should be written with a space between: line break. After we merge this, do you want it to be released soon (perfectly fine for me)?

@falkmielke
Copy link
Collaborator Author

The spell check is failing because linebreak should be written with a space between: line break.

I adjusted the sentence.

After we merge this, do you want it to be released soon (perfectly fine for me)?

There is no need for a quick publication: the change is minor, and I can work on the next-version branch.
So I suggest to collect more changes and additions. (I might have some, will see if I find time.)

Thank you for your help, and sorry for my initial clumsiness with lintr, spellcheck, and checklist!

@hansvancalster hansvancalster merged commit 880599f into next-version May 15, 2025
3 checks passed
@hansvancalster hansvancalster deleted the silence_unpack_mht branch May 15, 2025 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants