Commit graph

13 commits

Author SHA1 Message Date
19eb9b20be
feat: support configuring Pominal with config file
This commit adds a feature to load Pominal
configuration from a JSON configuration file.

A new data type called PominalConfig was created for
the purpose of configuring Pominal.
A new factory function called newPominalConfig was
created which takes the path to the JSON configuration
file and the flag overrides and generates the new
PominalConfig value.

Here, the JSON config is parsed to create the initial
configuration and any flag overrides can override
the corresponding fields in the PominalConfig object.
Currently only the sessions times and the maximum work
sessions per Pominal cycle have flag overrides.

Additionally users can now configure custom notification
messages for each session type from the configuration file.
There are currently no flag overrides for these.

This commit resolves dananglin/Pominal#1
2020-02-13 12:42:55 +00:00
9e2b011e39
chore: updated Copyright 2020-02-11 16:27:47 +00:00
99ebc86270
refactor: add lint test and refactor code.
- lint test using golangci-lint.
- lint test added as a job in the testing stage.
- code refactoring based on feedback.
2020-01-24 09:51:21 +00:00
1d79a4c7e6
test: added test suite for validating Pominal 2020-01-20 09:13:47 +00:00
19b599e341
refactor: remove drawInfo from UpdateSession
This is migrated to the Run method. This commit
solves the issue that the desktop notification
goes off when Pominal is started.
2020-01-19 23:10:03 +00:00
1be999c8b6
fix: initialize channel before the ticker 2020-01-19 21:30:29 +00:00
c8a1d0adfa
refactor: add a stop channel 2020-01-19 21:26:46 +00:00
45ad772818
feat: Basic UI for Pominal 2020-01-18 19:24:35 +00:00
5fd24b80df
test: improve testing suite and added reporting
* replace the table driven test with sub tests.
* create and publish code coverage reports via GitLab pages.
* use JUnit to view test results in the test tab in the pipeline view.
* upgrade Go to version 1.13.6.
2020-01-18 01:04:51 +00:00
425f23e70f
fix: set minimum maxWorkSessions for a cycle
- set the minimum number of work sessions to 1.
- test the creation of Pominal variables.
2019-09-23 09:05:19 +01:00
d82196575b
feat: set minimum time to 60 seconds 2019-09-20 00:55:10 +01:00
f0b46ed8b7
refactor: code refactoring to improve stability.
This commit removes the need to calculate the time remaining in a
session and instead introduces a countdown counter which decrements at
each one second 'tick'. This stabilizes the interface where it appeared
that he timer was randomly pausing or skipping time.

A summary of changes made in this commit includes:

- Updated the command line flags so that they are easier to remember.
- The work, short break and long break session times are now parsed and
converted to type float64. These times represent the total amount of
seconds.
- Removal of timer and finish from Pominal.
- The method that calculates the time remaining is removed.
- A countdown counter is added to the Pominal type.
- Updated alert message for the desktop notification.
- Simplified the Run method by moving the logic to chosse the next session
in a separate method.
2019-09-18 09:08:12 +01:00
09002e6d91
refactor: move Pominal type & methods to new file 2019-09-11 09:03:40 +01:00