Skip to content

v0.9.0

Compare
Choose a tag to compare
@BHM-Bob BHM-Bob released this 29 Aug 14:23
· 143 commits to main since this release

2024/8/29 21:51:09

Focus on

  1. Fix bugs in scripts
  2. Add more class and function in HPLC and Mass Spectrum
  3. other fix

What's New

  • addon(mbapy/scripts): add 'find-file' script
    A new script named 'find-file' has been added to the mbapy-cli.
    This script is designed to find files with specific suffixes or substrings in their
    names, utilizing the argparse library for command-line argument parsing.
  • addon: mbapy\sci_instrument\hplc\waters.py: add WatersPdaData class
  • addon: mbapy\scripts\hplc.py: add extract_pda

Minor Addon

  • feat(mbapy/file): add search_name_in_dir option to get_paths_with_extension
    Introduce a new optional parameter search_name_in_dir in the
    get_paths_with_extension function to allow users to specify whether
    file names should be searched within directories. This enhancement
    increases the flexibility and usability of the function for cases
    where directory names contain the desired search string.
  • feat(mbapy/scripts): add include_dir_name option and refine file move logic
    Introduce an additional argument '--include-dir-name' in the move_file script
    to allow the inclusion of directory names in the search process. This
    enhances the functionality of the script, providing more flexibility in file
    searching and moving operations.
    Refactor the file moving logic to gracefully handle permission issues on
    Windows and Linux systems, ensuring smoother operation across different
    platforms.
  • feat(mbapy): add get_dir function and update all
    Implement a new function get_dir in the mbapy/file.py module. This function
    allows for filtering directories based on various criteria such as minimum and
    maximum item numbers, file extensions, and directory/sub-item name substrings.
    The implementation enhances the module's capabilities in directory scanning and
    filtering.
    Additionally, update the __all__ list to include the newly added function,
    ensuring that it is documented and accessible to users of the module.
  • feat(scripts/main.py): add version and help print functions
  • refactor(utils): move seed setting into separate function for reuse
    By extracting the random seed setting logic into its own function,
    we improve code modularity and enable easier reuse of this functionality
    across different parts of the application. This helps to ensure that
    results are reproducible and that the codebase is easier to maintain.
  • minor-addon: mbapy/dl_torch/utils.py: init_model_parameter: add nn.Embedding support with xavier_normal_
  • minor-addon: mbapy\web_utils\task.py: TaskPool: add start and deprecate run method
  • minor-addon: mbapy\sci_instrument\hplc_base.py: add IS_PDA attribute to HplcData class
    Added an IS_PDA boolean attribute to the HplcData class to indicate if the
    high-performance liquid chromatography (HPLC) data is from a Photodiode Array (PDA)
    detector. This attribute defaults to False until specifically set to True for PDA
    detector data analysis.
  • minor-addon: mbapy\sci_instrument\mass_utils.py: add tag_monoisotopic_only option

BUG-FIX

  • fix(mbapy/scripts/avif): ensure progress bar updates for completed and in-doing batches
    Add a sleep function during task execution in avif.py to allow the progress
    bar to update properly for completed and ongoing tasks, preventing the
    interface from appearing stuck due to a backlog of unprocessed tasks.
  • fix-bug: file: opts_file: when use yaml, now make sure Loader is in kwgs
  • fix-bug: mbapy/file.py: opts_file: kwgs now defaults to None to aoid default-kwargs-keep-alive bug
  • fix-bug: mbapy\scripts\mass.py: explore-mass: save fig name can be user define now
  • fix-bug: mbapy\scripts\mass.py: explore-mass: fig card now make right label
  • fix-bug: mbapy\web_utils\spider.py: DownloadPage: parse: get_valid_file_path before makedir to avoid parent folder name invalid error
  • fix-bug: mbapy\sci_utils\paper_search.py: search_by_pubmed: check article_info['KeywordList'] is empty now

CODE-FIX

  • fix(sci_utils): remove redundant author_name assignment in parse_grobid
    This change removes an unnecessary assignment of author_name that was causing
    an issue with the parsing of author names in the parse_grobid function.
  • fix(mbapy/scripts/avif): improve progress bar update mechanism for task completion
    Refactor the task execution loop in avif.py to ensure the progress bar accurately
    reflects the completion status of tasks. This is achieved by updating the progress
    bar only when tasks are actually done, in contrast to the previous approach which
    could give the impression of stalling when the pool had more tasks than processors.
  • fix(mbapy/test/dl_t/optim): update import and iteration syntax for clarity
    Refactor the import statement _str2scheduleF to str2scheduleF
  • fix-comment: mbapy\stats\test.py: pearsonr: fix comment
  • fix-code: change TaskPool.run to TaskPool.start

Remove

None or a little.

Other Changes

  • fix(setup): update Python version support in setup.py
    Extend support for Python 3.12 and adjust the python_requires constraint
    to include version 3.12 while still excluding version 3.13 and above.
  • feat(requirements): add openpyxl to dependencies
    Added openpyxl to the requirements.json file to ensure compatibility with
    Excel file handling. This library is necessary for reading and writing
    Excel workbooks using Python.

Details

完整的更新日志: https://gitee.com/bhm-bob/BA_PY/commits/v0.9.0
Full Changelog: v0.8.9...v0.9.0