Skip to content

Remove backward compatibility aliases and update to standalone functions#31

Merged
eman merged 1 commit intomainfrom
remove-backward-compatibility
Oct 28, 2025
Merged

Remove backward compatibility aliases and update to standalone functions#31
eman merged 1 commit intomainfrom
remove-backward-compatibility

Conversation

@eman
Copy link
Copy Markdown
Owner

@eman eman commented Oct 28, 2025

This maintenance release cleanup removes deprecated backward compatibility layers:

Changes

Constants Module

  • ✅ Removed backward compatibility aliases (13 aliases)
  • ✅ Updated examples to use enum directly

CLI Module

  • ✅ Removed backward compatibility wrapper module
  • ✅ Updated entry point to use nwp500.cli.__main__:run directly

Encoding Functions

  • ✅ Updated examples to use standalone functions:
    • build_tou_period() instead of NavienAPIClient.build_tou_period()
    • encode_price() / decode_price() instead of NavienAPIClient.*
    • encode_week_bitfield() / decode_week_bitfield() instead of NavienAPIClient.*

Documentation

  • ✅ Updated time_of_use.rst to reference standalone functions
  • ✅ Updated reservations.rst to reference standalone functions
  • ✅ Updated constants.rst to remove backward compatibility section
  • ✅ Fixed broken relative links in README.rst
  • ✅ Added Read the Docs and GitHub links to README.rst header

Examples Fixed

  • ✅ anti_legionella_example.py
  • ✅ exception_handling_example.py (deprecated method name)
  • ✅ tou_openei_example.py
  • ✅ tou_schedule_example.py

Validation

  • ✅ Linting: All checks passed
  • ✅ Type checking: No issues found
  • ✅ No remaining CMD_* usage in codebase
  • ✅ No remaining NavienAPIClient.* static method usage in examples/docs

Breaking Changes

None - all deprecated APIs were already replaced with new ones in previous releases. This just removes the old compatibility layers.

…nctions

- Remove CMD_* backward compatibility aliases from constants.py
- Remove cli.py backward compatibility wrapper module
- Update setup.cfg entry point to use nwp500.cli.__main__:run directly
- Update all examples to use CommandCode enum instead of CMD_* aliases
- Update examples to use standalone functions (build_tou_period, encode_price,
  decode_price, encode_week_bitfield, decode_week_bitfield) instead of
  NavienAPIClient.* static methods
- Update documentation to reference standalone functions
- Fix deprecated method name (set_dhw_operation_setting -> set_dhw_mode)
- Remove broken relative links from README.rst
- Add Read the Docs and GitHub links to README.rst header

This is a maintenance release cleanup removing deprecated backward
compatibility layers that are no longer needed.
@eman eman merged commit 3833a88 into main Oct 28, 2025
10 checks passed
@eman eman deleted the remove-backward-compatibility branch October 28, 2025 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant