hugovk / norwegianblue

CLI to show end-of-life dates for a number of products.
https://endoflife.date
MIT License
74 stars 4 forks source link

Add `--format pretty` as default #116

Closed hugovk closed 1 year ago

hugovk commented 1 year ago

Before

$ eol python
| cycle |  release   | latest | latest release |    eol     |
|:------|:----------:|:-------|:--------------:|:----------:|
| 3.11  | 2022-10-24 | 3.11.0 |   2022-10-24   | 2027-10-24 |
| 3.10  | 2021-10-04 | 3.10.8 |   2022-10-11   | 2026-10-04 |
| 3.9   | 2020-10-05 | 3.9.15 |   2022-10-11   | 2025-10-05 |
| 3.8   | 2019-10-14 | 3.8.15 |   2022-10-11   | 2024-10-14 |
| 3.7   | 2018-06-26 | 3.7.15 |   2022-10-10   | 2023-06-27 |
| 3.6   | 2016-12-22 | 3.6.15 |   2021-09-03   | 2021-12-23 |
| 3.5   | 2015-09-12 | 3.5.10 |   2020-09-05   | 2020-09-13 |
| 3.4   | 2014-03-15 | 3.4.10 |   2019-03-18   | 2019-03-18 |
| 3.3   | 2012-09-29 | 3.3.7  |   2017-09-19   | 2017-09-29 |
| 2.7   | 2010-07-03 | 2.7.18 |   2020-04-19   | 2020-01-01 |
| 2.6   | 2008-10-01 | 2.6.9  |   2013-10-29   | 2013-10-29 |

Same as:

$ eol python --format markdown
| cycle |  release   | latest | latest release |    eol     |
|:------|:----------:|:-------|:--------------:|:----------:|
| 3.11  | 2022-10-24 | 3.11.0 |   2022-10-24   | 2027-10-24 |
| 3.10  | 2021-10-04 | 3.10.8 |   2022-10-11   | 2026-10-04 |
| 3.9   | 2020-10-05 | 3.9.15 |   2022-10-11   | 2025-10-05 |
| 3.8   | 2019-10-14 | 3.8.15 |   2022-10-11   | 2024-10-14 |
| 3.7   | 2018-06-26 | 3.7.15 |   2022-10-10   | 2023-06-27 |
| 3.6   | 2016-12-22 | 3.6.15 |   2021-09-03   | 2021-12-23 |
| 3.5   | 2015-09-12 | 3.5.10 |   2020-09-05   | 2020-09-13 |
| 3.4   | 2014-03-15 | 3.4.10 |   2019-03-18   | 2019-03-18 |
| 3.3   | 2012-09-29 | 3.3.7  |   2017-09-19   | 2017-09-29 |
| 2.7   | 2010-07-03 | 2.7.18 |   2020-04-19   | 2020-01-01 |
| 2.6   | 2008-10-01 | 2.6.9  |   2013-10-29   | 2013-10-29 |

After

Now the default has joined lines, and this is the same as the new eol python --format pretty:

eol python
┌───────┬────────────┬────────┬────────────────┬────────────┐
│ cycle │  release   │ latest │ latest release │    eol     │
├───────┼────────────┼────────┼────────────────┼────────────┤
│ 3.11  │ 2022-10-24 │ 3.11.0 │   2022-10-24   │ 2027-10-24 │
│ 3.10  │ 2021-10-04 │ 3.10.8 │   2022-10-11   │ 2026-10-04 │
│ 3.9   │ 2020-10-05 │ 3.9.15 │   2022-10-11   │ 2025-10-05 │
│ 3.8   │ 2019-10-14 │ 3.8.15 │   2022-10-11   │ 2024-10-14 │
│ 3.7   │ 2018-06-26 │ 3.7.15 │   2022-10-10   │ 2023-06-27 │
│ 3.6   │ 2016-12-22 │ 3.6.15 │   2021-09-03   │ 2021-12-23 │
│ 3.5   │ 2015-09-12 │ 3.5.10 │   2020-09-05   │ 2020-09-13 │
│ 3.4   │ 2014-03-15 │ 3.4.10 │   2019-03-18   │ 2019-03-18 │
│ 3.3   │ 2012-09-29 │ 3.3.7  │   2017-09-19   │ 2017-09-29 │
│ 2.7   │ 2010-07-03 │ 2.7.18 │   2020-04-19   │ 2020-01-01 │
│ 2.6   │ 2008-10-01 │ 2.6.9  │   2013-10-29   │ 2013-10-29 │
└───────┴────────────┴────────┴────────────────┴────────────┘

Also add --format md as shortcut for --format markdown.

image
codecov[bot] commented 1 year ago

Codecov Report

Merging #116 (7147b88) into main (8448099) will increase coverage by 0.05%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #116      +/-   ##
==========================================
+ Coverage   95.34%   95.40%   +0.05%     
==========================================
  Files           9        9              
  Lines         387      392       +5     
==========================================
+ Hits          369      374       +5     
  Misses         18       18              
Flag Coverage Δ
macos-latest 95.40% <100.00%> (+0.05%) :arrow_up:
ubuntu-latest 95.40% <100.00%> (+0.05%) :arrow_up:
windows-latest 95.40% <100.00%> (+0.05%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/norwegianblue/cli.py 0.00% <ø> (ø)
src/norwegianblue/__init__.py 98.59% <100.00%> (+0.04%) :arrow_up:
tests/data/expected_output.py 100.00% <100.00%> (ø)
tests/test_norwegianblue.py 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more