Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: output preparation, add tests #376

Merged
merged 5 commits into from
Oct 13, 2024
Merged

refactor: output preparation, add tests #376

merged 5 commits into from
Oct 13, 2024

Conversation

ttytm
Copy link
Owner

@ttytm ttytm commented Oct 11, 2024

Resolves #371

Simplifies output preparation; enables sim testing of the display modules.

As an example I'm sharing an editor screenshot below, to avoid potential issues with displaying utf8 characters in the browser when pasting/linking the code.
Screenshot_20241012_003714

Copy link

github-actions bot commented Oct 11, 2024

Filename                              Stmts    Miss  Cover    Missing
----------------------------------  -------  ------  -------  --------------------------------------------------------------------------------------------------
src/modules/display/border.rs            47      18  61.70%   20-22, 26-27, 31-33, 37-38, 42-44, 48-50, 105-106
src/modules/display/current.rs           46       6  86.96%   33, 37, 83, 96, 125-126
src/modules/display/day.rs               42       6  85.71%   29, 33, 60, 66, 91-92
src/modules/display/graph.rs            169      59  65.09%   86-125, 141, 148, 155, 160, 176, 182-186, 196, 210, 217, 224, 229, 245, 273-282, 293-315, 332, 368
src/modules/display/gui_config.rs        15       3  80.00%   48, 54, 60
src/modules/display/historical.rs        46      46  0.00%    22-158
src/modules/display/hourly.rs           156      90  42.31%   47-66, 70-79, 88-91, 98, 140, 144-145, 228, 249, 268-278, 321-454
src/modules/display/product.rs           25      25  0.00%    26-74
src/modules/display/utils.rs             38       8  78.95%   14-17, 23, 50, 56-57, 71
src/modules/display/weathercode.rs       31      23  25.81%   13, 17-23, 26-32, 34-41
src/modules/display/week.rs              45       3  93.33%   36, 105-106
src/modules/display/wind.rs              21      11  47.62%   24-27, 35-38, 40-42
src/main.rs                              13      13  0.00%    26-43
src/modules/api.rs                       24      13  45.83%   26-29, 38, 49-88
src/modules/args.rs                       4       4  0.00%    91-95
src/modules/config.rs                    31      25  19.35%   52-97
src/modules/forecast.rs                  20       6  70.00%   7-8, 24-25, 27-28
src/modules/localization.rs             105      41  60.95%   162-203, 230-265
src/modules/location.rs                  53      28  47.17%   25-29, 59-63, 75, 89, 95-104, 109, 118-126, 131-132, 142-143
src/modules/params.rs                    52      52  0.00%    23-133
src/modules/units.rs                     13       0  100.00%
src/modules/weather.rs                   28      28  0.00%    82-153
TOTAL                                  1024     508  50.39%

Copy link

github-actions bot commented Oct 11, 2024

Test Results

13 tests  +4   13 ✅ +4   1s ⏱️ ±0s
 1 suites ±0    0 💤 ±0 
 1 files   ±0    0 ❌ ±0 

Results for commit 3d15a4f. ± Comparison against base commit ae0ada5.

♻️ This comment has been updated with latest results.

@ttytm ttytm force-pushed the refactor-output-prep branch 2 times, most recently from c336404 to 21bdbd1 Compare October 13, 2024 18:41
@ttytm ttytm marked this pull request as ready for review October 13, 2024 18:47
@ttytm ttytm merged commit 26dda69 into main Oct 13, 2024
20 checks passed
@ttytm ttytm deleted the refactor-output-prep branch October 13, 2024 19:03
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.

Refactor preparation of display modules to make the output more testable
1 participant