Skip to content
Snippets Groups Projects

Improve checking the size of data before processing

Merged Lan Dam requested to merge improve_check_dir_size into master

Apply different way to read file sizes for different type of files.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
6 from obspy.io.reftek.core import _is_reftek130
7
8 from sohstationviewer.conf.constants import BIG_FILE_SIZE
9
10 from sohstationviewer.controller.util import validate_file
11 from sohstationviewer.controller.processing import (
12 get_next_channel_from_mseed_file)
13
14
15 def _get_file_type(path2file: str) -> str:
16 """
17 Get type of the given file:
18 + TEXT if strip() can be used for the first 64 bytes
19 + MSEED if channel name of the first record can be read
20 + RT130 is decided using obspy method _is_reftek130()
21 + binary if none of the above types are detected.
  • Kien Le
  • Kien Le
  • Kien Le
  • Kien Le
  • Kien Le
  • Kien Le
  • Kien Le
  • Kien Le
  • Kien Le
  • Kien Le
  • Kien Le
  • Lan Dam added 10 commits

    added 10 commits

    • f82c7b3b...6dde416e - 6 commits from branch master
    • d8f061dd - Merge branch 'master' into improve_check_dir_size
    • a5a0ddaa - docstrings and variable names
    • 33777744 - correct function name, remove check for key of final_result because all keys...
    • 58b03e99 - move checking for file_order outside of the function _get_multiplex_and_chan_id

    Compare with previous version

  • Lan Dam added 1 commit

    added 1 commit

    Compare with previous version

  • Developer

    There is only one small problem left, so you can merge this MR once you fixed it. I'll pre-approve in advance.

  • Kien Le approved this merge request

    approved this merge request

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading