Skip to content

v0.2.4

Latest
Compare
Choose a tag to compare
@Gautzilla Gautzilla released this 27 Nov 15:54
· 64 commits to main since this release
1530793

Compatibility with 0.2.3

Imports should now decribe the full path to the asset to import:

# worked in 0.2.3 but won't work in 0.2.4
from OSmOSE.utils import display_folder_storage_info

# works in 0.2.4 (and in 0.2.3)
from OSmOSE.utils.core_utils import display_folder_storage_info

Added Features

log system by @Gautzilla in #220

OSEkit now uses a proper logging system. Its default configuration is stored in the logging_config.yaml file.
For working with a custom configuation, users should duplicate this file into their current working directory. OSEkit will use the logging_config.yaml present in the current working directory, if any, over the one present in the source code.
More info about the logging system in #220.

better timestamps managing by @Gautzilla in #210

Utility functions were added to simplify the use of timestamps within OSEkit. This is just a first step, as it hasn't been fully implemented through the whole codebase. At the moment, the changes are:

Timestamp filtering for spectrogram generation:

On the datarmor toolkit, specifying the datetime_begin and datetime_end paremeters of the generate_spectro function with an already-initialized dataset will generate spectrogram images only for the audio files that are included in the timestamps.

strftime code extraction:

Users might now be able to specify complex strftime codes for extracting timestamps from their audio file names:

# With audio files named "recordingdevice_2024_11_26_123456.wav" and "recordingdevice_2024_11_27_123456.wav"
dataset.build(date_template="%Y_%m_%d_%H%M%S") # Timestamps 2024-11-26 12:34:56 and 2024-11-27 12:34:56 will be correctly parsed

Timezone management:

Timezones can either be parsed from the audio file names (thanks to the %z and %Z codes) or specified as a parameter to the Dataset.build() method. If different timezones are parsed from the file names and passed to the Dataset.build() method, the timestamps will be converted from the timezone parsed from the names to the timezone passed as a parameter:

# audio file  "recordingdevice_2024_11_26_123456+0100.wav" 
dataset.build(date_template="%Y_%m_%d_%H%M%S", timezone="+0200")
# The timestamp associated with the audio file will be 2024-11-26 13:34:56+02:00

Raven formatting utils by @mathieudpnt in #213

Add the OSmOSE.utils.formatting_utils.aplose2raven function that converts an APLOSE-formatted result DataFrame to a Raven-formatted result DataFrame.
The resulting Raven DataFrame can then be exported to a csv file and loaded into Raven.

Bug Fixes

check permissions before chmod by @Gautzilla in #212

Running OSEkit in folder of which the user doesn't have the rights to edit the permissions should no longer raise an error.

Full Changelog

v0.2.3...v0.2.4