v0.8.9
2024/7/16 7:43:49
Focus on
- Fix bugs in scripts
What's New
- feat(stats): add linea_reg_OLS function for OLS regression in reg.py
Implement a new functionlinea_reg_OLS
for performing ordinary least squares
(OLS) regression. This function simplifies the process of conducting OLS analysis
on a given DataFrame by handling the addition of a constant and the extraction
of regression results. It returns a dictionary containing the regression model,
coefficients, intercept, R-squared value, and p-value.
The addition of this function enhances the statistical capabilities of the
mbapy/stats
module and provides a more Pythonic way to perform OLS regressions
compared to directly using statsmodels API.
Minor Addon
- feat(mbapy-scripts): add just_name option for original file name usage
Add a new flag '--just-name' to the move_file script which allows users to
use the original name of the files instead of the sub-path when generating the
output path. This provides more flexibility in how files are renamed and moved. - feat(mbapy-scripts): add --pause-after-exec option in the top-level arguments processing of mbapy-cli
Introduce a new command-line argument--pause-after-exec
in thembapy
scripts. This
option allows the user to pause the execution after running the script, which is
particularly useful for debugging and inspecting the results manually before the
command-line window closes automatically.
BUG-FIX
- fix-bug: mbapy\scripts\avif.py: remove readonly attribute before deleting original file
Ensure the original file can be removed by removing the read-only attribute
before attempting to delete it. This fixes an issue where the script would fail
to delete the file if it was set as read-only. - fix-bug: mbapy\scripts\remove_file.py: remove readonly attribute before deleting files in remove_file.py
Files were failing to delete if they were set as read-only. This fix adds a step
to remove the read-only attribute usingattrib -r
before attempting to delete
the file, ensuring that all files can be successfully removed. - fix-bug: mbapy\scripts: ensure file permissions are set correctly for delete operations upon windows and linux platforms.
Modify file permission handling to support cross-platform operations.
The updates check the system type and apply the appropriate command to
remove the read-only attribute on Windows or change permissions on Linux
before attempting to delete a file. This fix prevents failures when files
are marked as read-only. - fix(mbapy-scripts): correct script name in mbapy-cli-scripts-list.json
Update the script name entry for the 'remove file' command in the
mbapy-cli-scripts-list.json file to match the actual script name
used in the codebase. This change ensures the documentation and
configuration are in sync, preventing potential confusion for users
referencing the script names. - fix(mbapy-scripts): handle file path correctly in move_file script
Correct the logic to check if the sub_path starts with the os path separator instead of
the platform string. This ensures that the file path is handled correctly across
different operating systems. Additionally, enhance the exception handling to include
the error message for better diagnostics when a file move operation fails. - fix-bug(mbapy-scripts/avif.py): use web.TaskPool instead of multiprocessing.Pool to avoid no-response bug when
$batch_size * num_workers < num_files$
CODE-FIX
- feat(avif.py): show 'batch' parameter
- feat(mass.py): rename 'Refresh' button to 'Plot' and remove 'use_peaks_cache' option
Change the button label from 'Refresh' to 'Plot' to better reflect its function in the
user interface. Additionally, remove the 'use_peaks_cache' checkbox and associated argument
from the mass data explorer, simplifying the interface and command-line options. - fix(mbapy/web_utils): specify return type for TaskPool.add_task
Remove
None or a little.
Other Changes
None or a little.
Details
完整的更新日志: https://gitee.com/bhm-bob/BA_PY/commits/v0.8.9
Full Changelog: v0.8.8...v0.8.9