Releases: MitchellAcoustics/Soundscapy
v0.7.4
v0.7.3
[0.7.3] Small patch
Improved
- Allowed the user to request files to be resampled upon loading. This is necessary for Mosqito metrics, which requires (and will itself resample) the audio files to be 48 kHz. The user can specify the desired sample rate in
Binaural.from_wav()and higher level functions likeAudioAnalysis.analyse_file,AudioAnalysis.analyse_folder.
Full Changelog: v0.7.1...v0.7.3
v0.7.1
Minor bug fixes
Full Changelog: v0.7.0...v0.7.1
v0.7.0
[0.7.0]
Complete refactoring of Soundscapy, splitting it into multiple modules (surveys, databases, audio, plotting), and improving the overall structure and functionality of the package. Also added more comprehensive documentation and test coverage.
General Changes
Added
- New
soundscapy/surveys/survey_utils.pyfor shared utilities- Implemented
PAQenum for Perceptual Attribute Questions - Added
return_paqsfunction for filtering PAQ columns - Created
rename_paqsfunction for standardizing PAQ column names
- Implemented
- Centralized logging configuration in
soundscapy/logging.py- Added support for environment variables to configure logging:
SOUNDSCAPY_LOG_LEVELfor setting log levelSOUNDSCAPY_LOG_FILEfor specifying a log file
- Implemented checks for Jupyter notebook environment in logging configuration
- Added
set_log_levelfunction to allow dynamic adjustment of log level at runtime - Introduced global variable
GLOBAL_LOG_LEVELto manage log level across different environments- Implemented
setup_loggerfunction for initializing the logger with custom options - Set default logger to WARNING level with console output
- Created
get_loggerfunction to retrieve the configured logger
- Implemented
- Added support for environment variables to configure logging:
- New processing module
soundscapy/surveys/processing.pywith enhanced functionality- Implemented
ISOCoordinatesandSSMMetricsdataclasses - Added
calculate_iso_coordsfunction for ISO coordinate calculations - Created
add_iso_coordsfunction to add ISO coordinates to DataFrames - Implemented
likert_data_qualityfunction for data quality checks - Added
simulationfunction for generating random PAQ responses - Created
ssm_metricsfunction for Structural Summary Method calculations
- Implemented
- Comprehensive docstrings and doctest examples in
isd.pyandsatp.py - New test cases in
test_isd.pyto cover refactored functionality
Changed
- Modified default logging level to WARNING for better control over log output
- Refactored
isd.pyto use new processing and survey utility functions- Updated
load,load_zenodo, andvalidatefunctions - Refactored selection functions (
select_record_ids,select_group_ids, etc.) - Updated
describe_locationandsoundscapy_describefunctions
- Updated
- Refactored
satp.pyto align with new package structure- Updated
load_zenodoandload_participantsfunctions - Added doctest examples for all functions
- Updated
- Modified
__init__.pyto initialize the logger when the package is imported - Updated import statements across modules to use the new package structure
- Standardized function signatures and return types across all modules
- Changed to Rye as the dependency and environment manager for the project
Improved
- Enhanced error handling and input validation in database modules
- Added type hints to all functions for better code readability and IDE support
- Implemented more specific exception handling
- Optimized data processing functions for better performance
- Improved code organization and modularity
- Separated concerns between data loading, processing, and analysis
- Enhanced documentation with more detailed explanations and examples
- Standardized coding style across all modules (using Black formatter)
Deprecated
- Removed
remove_lockdownfunction inisd.py(redundant since the release of ISD v1.0)
Removed
- Eliminated redundant code and unused functions across modules
Fixed
- Resolved issues with inconsistent PAQ naming conventions
- Fixed bugs in ISO coordinate calculations and SSM metric computations
- Resolved issue where Jupyter notebooks were overriding the default log level
Security
- Implemented input validation to prevent potential security vulnerabilities
Development
- Implemented a more robust logging system using loguru
- Added ability to easily change log levels for debugging and development
- Enabled file logging for persistent log storage
- Enhanced test coverage for core functionality
- Added doctest examples to ensure documentation accuracy and serve as functional tests
- Implemented consistent error messages and logging across the package
Documentation
- Added comprehensive docstrings to all functions and classes
- Included usage examples in function docstrings
- Updated README with new package structure and usage instructions
- Created this CHANGELOG to track all significant changes to the project
Changes to Plotting Module
Code Structure:
- Split the original circumplex.py into multiple files: backends.py, circumplex_plot.py, plot_functions.py, stylers.py, and plotting_utils.py (implied).
- Introduced abstract base class PlotBackend and concrete implementations SeabornBackend and PlotlyBackend.
New Features:
- Added support for Plotly backend alongside Seaborn.
- Introduced CircumplexPlot class for creating and managing plots.
- Added StyleOptions dataclass for better style management.
- Implemented simple_density plot type.
Improved Customization:
- Created CircumplexPlotParams dataclass for better parameter management.
- Added more customization options for plots (e.g., incl_outline, fill, alpha).
Enhancements:
- Improved type hinting throughout the codebase.
- Added docstrings to classes and functions.
- Implemented PlotType and Backend enums for better type safety.
Refactoring:
- Moved plotting logic from functions to methods in backend classes.
- Simplified scatter and density functions by leveraging CircumplexPlot class.
Removed Features:
- Removed jointplot function (marked as TODO in CircumplexPlot class).
Constants and Utilities:
- Moved constants (e.g., DEFAULT_XLIM, DEFAULT_YLIM) to a separate utilities file.
- Created ExtraParams TypedDict for additional plotting parameters.
v0.6.0
Added
- Changed the name of the calculate_paq_coords to calculate_iso_coords to better reflect the function's purpose.
- Updated the formula for calculate_iso_coords to the more generalised form given in Aletta et. al. (2024).
v0.5.2
Minor bug fix. It seemed setuptools wasn't properly loaded as a scikit-maad dependency which would throw an error on import. Added setuptools to the dependencies.
Full Changelog: v0.5.0-alpha...v0.5.2
v0.5.0
What's Changed
- Refactored to remove pandas accessor methods by @MitchellAcoustics in #71
After using and teaching soundscapy more, I realised the pandas accessor approach actually just created more complexity and confusion. I liked the idea initially having the functionality as methods attached to the survey dataframe, but in the end it meant I needed to maintain twice the amount of code. It also ended up just confusing people.
So, I've deprecated the sspy and isd accessors. Now all of the functionality is included as standard functions. Some specific functions have been moved to the isd module if they really only make sense with data specifically in ISD format. This includes things like location_describe.
This will break your existing code but ideally it should be quite easy to fix and should make things much simpler moving forward.
The development package manager has also changed from poetry to pdm, which I find much nicer to work with. This has changed the pyproject.toml file. The dependencies have generally changed and been reduced. Soundscapy should now work with all python version > 3.9 and has also been updated to use pandas v2 which was recently released.
In addition, this fixes #69 and #65 which had a few errors and annoying warnings that were popping up.
Full Changelog: v0.4.4-alpha...v0.5.0-alpha
v0.4.4
What's Changed
- Update minimum python version and bug fixes by @MitchellAcoustics in #68
- Create python-package.yml by @MitchellAcoustics in #70
Full Changelog: v0.4.1-alpha...v0.4.4-alpha
v0.4.1
Minor release
- Added a progress bar for analysis functions
- Added a method for saving AnalysisSettings to a yaml file
- #Added additional tests for _AnalysisSettings
v0.4.0
What's Changed
- Switched the publication and dependency management to poetry
- Performed a major refactor to hopefully simplify use.
- Plotting has been separated out into 'circumplex' plots and 'likert' plots
- General purpose functions have been moved to utils
- Began building out separated support for different database.
- The dataframe accessor has been changed to 'sspy' to make it less specific to the ISD.
- Added docs using Sphinx by @MitchellAcoustics in #61
Full Changelog: v0.3.6-alpha...v0.4.0-alpha