Skip to content

Adding New Cycles feature in pomodoro.py file#2313

Open
Pramod111666 wants to merge 5 commits intoultrabug:masterfrom
Pramod111666:pomodoro-cycles
Open

Adding New Cycles feature in pomodoro.py file#2313
Pramod111666 wants to merge 5 commits intoultrabug:masterfrom
Pramod111666:pomodoro-cycles

Conversation

@Pramod111666
Copy link

Summary

This PR adds an optional cycles configuration to the pomodoro module, allowing users to group multiple pomodoro sessions into higher-level cycles.

Existing users who do not configure cycles see no change and module behaves exactly as before.
This PR introduces an optional cycles parameter to support that use case without altering existing behavior.

Testing and resutls snapshot-: Attached as a pdf document.

About the changes done-:

What’s included

  • New optional cycles parameter (None by default)
  • Cycle counting triggered only after a long break completes
  • Automatic reset after the final cycle completes
  • Optional cycle number placeholder ({CycleNumber}) for display formats
  • User notification when all configured cycles are completed
  • No changes to defaults or existing configuration

Behavior overview

  • A cycle is defined as one full pomodoro block ending with a long break
  • After each long break:
    • the cycle counter increments
  • When the configured cycle count is reached:
    • the state resets cleanly
    • the next pomodoro starts fresh (waiting for user interaction)
  • Existing users who do not configure cycles see no change

Note-:

Any feedback and suggestions are welcomed.

config_n_testing_resutls_pomodoro_cycles.pdf

@Pramod111666
Copy link
Author

Just checking , if there’s any changes needed from my side on this PR.

Please let me know your feedback/ suggesstions on this PR.
Happy to make the required changes :)

@ultrabug
Copy link
Owner

Thank you Pramod for your nicely written PR. I've let the CI run first so you get indications of what's needed to be fixed.

I'll do my best to review it once CI is green ✔️

@Pramod111666
Copy link
Author

Pramod111666 commented Jan 18, 2026

Fixed-: Minor indentation error
(8a16635)
Fixed-: CodeQL warning (317a0ef)

Request you to run the CI.
Please let me know your feedback.
Thank you.

@Pramod111666
Copy link
Author

Problem-: CI failed due to docstring alphabetical ordering under tests directory. It has been fixed and tested.

Fixed-: 4923d99

Request you to run the CI.
Please let me know your feedback.

jfyi-: config used has been attached as pdf.
config-test-results-pomodoro-cycles.pdf

Thank you.

@Pramod111666
Copy link
Author

Hi,

My changes are limited to py3status/modules/pomodoro.py, which passes both tests and formatting locally.

As I ran the full CI suite locally using hatch run all. All tests pass successfully.

Please let me know if you would like me to include formatting fixes for unrelated files in a separate PR.

The CI failure is from style:check (isort/black) and reports formatting issues in the following existing files (not related to my changes in pomodoro.py)

py3status/modules/dnf_updates.py
py3status/modules/glpi.py
py3status/modules/mpd_status.py
py3status/modules/kdeconnector.py
py3status/modules/rt.py
py3status/modules/spotify.py
py3status/modules/sysdata.py
py3status/modules/weather_owm.py
py3status/parse_config.py

Please let me know if you would like me to include formatting fixes for unrelated files in a separate PR.

Thank you.

@lasers
Copy link
Contributor

lasers commented Jan 20, 2026

Hi there, I'm addressing that issue in #2316. re: @ultrabug

EDIT: What black --version do you have? I'm wanting to pin black version because everything locally passed on your side, but the runner is (now) using latest black version.

@Pramod111666
Copy link
Author

Hi @lasers, thanks for looking into this.

Sorry, I hadn’t noticed #2316 earlier.

On my local setup I’m using:
black: 26.1.0
isort: 7.0.0

@lasers
Copy link
Contributor

lasers commented Jan 20, 2026

FWIW, I didn't review your PR because I already tried to add this in #1313

@Pramod111666
Copy link
Author

Thanks for the context — I see that the pomodoro module has been around since 2018.

This PR doesn’t reintroduce or change the existing behavior. It only adds an optional cycles feature on top of the current logic.

This cycles in pomodoro is intended purely as an additive feature

@Pramod111666
Copy link
Author

Hi @ultrabug, @lasers

Please let me know if there’s anything further you’d like me to change on this PR, or if it’s ready for review from your side.

Thanks for your time, and I appreciate the guidance — happy to iterate as needed.

@ultrabug
Copy link
Owner

@Pramod111666 thanks to @lasers we now have a clean CI. I'd appreciate you rebase to get a green CI PR before we invest time into reviewing your code please?

@Pramod111666
Copy link
Author

Hi @ultrabug — I’ve rebased and pushed the updates. CI is green locally.

@Pramod111666
Copy link
Author

Pramod111666 commented Feb 4, 2026

Hi @ultrabug

Could you please approve the CI run? Once it shows green, I look forward to your review of the code.

just for the context-: I’ve rebased and pushed the updates. CI is green locally.

Thanks :)

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.

3 participants