Skip to content

feat: add correction and system exports to ntps module#28

Merged
michealroberts merged 1 commit intomainfrom
feature/ntps/exports
May 28, 2025
Merged

feat: add correction and system exports to ntps module#28
michealroberts merged 1 commit intomainfrom
feature/ntps/exports

Conversation

@michealroberts
Copy link
Owner

feat: add correction and system exports to ntps module

feat: add correction and system exports to ntps module
@michealroberts michealroberts requested a review from Copilot May 28, 2025 12:29
@michealroberts michealroberts self-assigned this May 28, 2025
@michealroberts michealroberts added the enhancement New feature or request label May 28, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR exposes two new functions—get_ntp_offset_correction and set_system_time—in the ntps module and updates the public API list.

  • Export get_ntp_offset_correction from the correction submodule
  • Export set_system_time from the system submodule
  • Update the __all__ list to include the new exports
Comments suppressed due to low confidence (1)

src/ntps/init.py:13

  • Add or update unit tests to cover the new set_system_time function, including edge cases (e.g., permission errors or invalid time values).
from .system import NTP_TIMESTAMP_DELTA, get_ntp_time, set_system_time

# **************************************************************************************

from .client import NTPClient
from .correction import get_ntp_offset_correction
Copy link

Copilot AI May 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider updating the module-level docstring or README to document the new get_ntp_offset_correction export so consumers understand its purpose and usage.

Copilot uses AI. Check for mistakes.
@michealroberts michealroberts merged commit 0a075db into main May 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants