spectral-cockpit / opusreader2

Read OPUS binary files from Fourier-Transform Infrared (FT-IR) spectrometers of the company Bruker Optics GmbH & Co. in base R
https://spectral-cockpit.github.io/opusreader2/
MIT License
18 stars 2 forks source link

informative error for unknown blocks #30

Closed philipp-baumann closed 2 years ago

philipp-baumann commented 2 years ago

note that I disabled the pre-commit hooks with: git commit -m "informative error for unknown blocks" --no-verify

File R/create_dataset.R is not lint free /home/philipp/git/spectral-cockpit/opusreader2/R/create_dataset.R:3:1: style: [cyclocomp_linter] Functions should have cyclomatic complexity of less than 15, this has 48. create_dataset <- function(data_list) { ^ Error: File R/create_dataset.R is not lint free Execution halted

philipp-baumann commented 2 years ago

wait a min. I think this PR does not yet solve it. For a private Bruker Tango file, which has new blocks, I still get:

"r$> read_opus(file)
Error in structure(c(data_list, list(block_type_name = block_type_name)), : object 'block_type_name' not found"

ThomasKnecht commented 2 years ago

I will add some breaks in the #34

ThomasKnecht commented 2 years ago

see #34