Repository navigation
v0.7.0
·
303 commits
to main
since this release
[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.