Skip to content

🚀 Project Improvements - Version Bump to 2.2.0#181

Open
rafaelpadilla wants to merge 56 commits intopetrobras:mainfrom
rafaelpadilla:rafael/bump_v2.2.0rc1
Open

🚀 Project Improvements - Version Bump to 2.2.0#181
rafaelpadilla wants to merge 56 commits intopetrobras:mainfrom
rafaelpadilla:rafael/bump_v2.2.0rc1

Conversation

@rafaelpadilla
Copy link
Contributor

⚠️ Review Order Notice

Although this PR includes the changes introduced in PR #180 (proposing v2.1.1), it is recommended that the current PR be reviewed after PR #180.
This ordering is intentional and aligns with the planned sequence of improvements.

Overview

This pull request delivers a set of refactors and improvements aimed at modernizing path handling, clarifying feature-extractor behavior, and introducing structured logging for better observability and experiment traceability. The scope of this delivery focuses on consistency, maintainability, and operational visibility.

Given the scope and impact of these improvements, this pull request suggests a bump to v2.2.0.

Summary of Changes

1. Use pathlib.Path in place of os.path for modern path management

All occurrences of os.path were replaced with pathlib.Path across the codebase to provide a modern, object-oriented interface for path handling. This improves consistency, readability, and alignment with current Python best practices.

2. Feature extractors: is_windowed as instance attribute

The unnecessary use of getattr(config, "is_windowed", False) was removed from the feature extraction classes (ExtractStatisticalFeatures, ExtractEWStatisticalFeatures, ExtractWaveletFeatures). The default is now self.is_windowed = False on the instance, and error messages were updated to direct users to set extractor.is_windowed = True on the instance when needed. Tests were adjusted to set is_windowed on extractor instances rather than via config, making it explicit that is_windowed is an instance attribute, not a config parameter.

3. Structured logging system

A structured logging system was introduced across the framework to improve observability, debugging, and experiment traceability. A logging directory was defined in constants.py, a logging_config.py setup file was added to configure format, handlers, and automatic log file creation, and the logger setup runs when the toolkit is imported. Loggers were added to trainer/trainer.py and models/mlp.py. Each run creates a log file under the configured directory following the pattern run_<timestamp>.log, with entries in the format <timestamp> | <level> | <module> | <message>.

4. Include youtube video links to README.md files

YouTube links were added to README.md files for 3W dataset resources used during workshop presentation.


Final Notes

These changes focus on modern path handling, clearer contracts for feature extractors, and better visibility into toolkit execution through logging, strengthening both code consistency and the ability to debug and trace experiments.

Thank you for reviewing this delivery.
🎉🥳🎊🚀✨


By creating this pull request, I confirm that I have read and fully accept and agree with one of the Petrobras' Contributor License Agreements (CLAs):

Our CLAs are based on the Apache Software Foundation's CLAs:

czewski and others added 30 commits January 16, 2026 19:55
Co-authored-by: Rafael Padilla <31217453+rafaelpadilla@users.noreply.github.com>
…) typings. Also made the test check if model typing class has "predict" method.
…_types

Closes #1 - Replacing `Any` types by specific and correct typings
…ecorator to some functions in base_preprocessing.py.
rafaelpadilla and others added 26 commits February 3, 2026 18:37
Adding missing docstrings in validate_ functions
Add exceptions for HTML report files in .gitignore
fix: 
- Removed typing IO[bytes] from models save/load
- Explicit types for models
- Changed SimpleTorchModel to MLP in save/load tests
…dowed

refactor: remove unnecessary getattr for is_windowed in feature extra…
Add workshop presentation details and YouTube links to README files
* logging config and trainer logging

* logging mlp
@ricardoevvargas
Copy link
Collaborator

Hi, @rafaelpadilla.

I hope this PR will result in another significant contribution from the Federal University of Rio de Janeiro to the 3W Project.

We will evaluate it ASAP and will let you know here if we have any questions and/or requests for adjustments.

On behalf of the 3W Community, I thank you for this PR.

PS: the evaluation of PR #180 is still ongoing.

@ricardoevvargas ricardoevvargas added the on hold PR or Issue in the backlog label Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

on hold PR or Issue in the backlog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants