Commit Graph

51 Commits

Author SHA1 Message Date
Артём Кокос
14219564dd Fix 9 bugs: ODT covered-cells, CSV BOM, HTML charset, stderr, dead code
- #13 (critical): Add CoveredTableCell elements to ODT for valid row spans (ODF 1.2)
- #28: Move "Total issues" info message from stdout to stderr (clean pipe output)
- #27: Wrap HTML export in full document with DOCTYPE and meta charset utf-8
- #26: Save CSV with utf-8-sig encoding (UTF-8 BOM for Excel compatibility)
- #31: Document CSV uses full project/version values (not display_* like console/MD)
- #30: Fix ODT header formatting when author is empty (no leading dot/space)
- #36: Remove test_cli_smoke_empty testing unreachable code path (return [])
- #37: Remove unused mock_path variable in ODT test fixture
- #34: Remove unreachable len(parts) != 2 check in parse_date_range

Closes #13, #28, #27, #26, #31, #30, #36, #37, #34
2026-06-27 13:01:32 +07:00
Артём Кокос
da069993b9 Extract grouping logic into shared function (#19)
Add group_rows_by_project_and_version() to report_builder.py and replace
the duplicated inline grouping in both html.py and odt.py with a single
call to the shared function. This ensures consistent grouping behavior
across formatters and removes a maintenance burden — any change to
grouping logic now happens in one place.

Closes #19
2026-06-26 00:21:58 +07:00
Артём Кокос
dbc4cf960a Fix version display, deterministic sort, remove duplicate sort
get_version() now returns version.name instead of str(version), which
returned the numeric ID from redminelib.resources.Version. Falls back
to str() when .name is absent (#14).

Add issue.id as tertiary sort key in build_grouped_report so tasks
within the same project+version group always appear in the same order
regardless of API response ordering (#33).

Remove redundant sort from client.fetch_issues_with_spent_time — the
sort already runs in report_builder.build_grouped_report, so doing it
twice wastes CPU. Also remove the now-unused get_version import (#32).

Closes #14, closes #32, closes #33
2026-06-25 23:32:14 +07:00
Артём Кокос
3a6d1b7ba7 Fix .env override priority and password whitespace stripping
Change load_dotenv() to load_dotenv(override=False) so real environment
variables always take priority over stale .env files. This prevents a
hardcoded or outdated REDMINE_API_KEY in .env from silently overriding
a fresh token exported in the shell (#15).

Add .strip() to get_redmine_password() for consistency with all other
config getters — trailing whitespace in .env no longer causes silent
auth failures (#35).

Closes #15, closes #35
2026-06-25 21:06:19 +07:00
Артём Кокос
3956decd4e Fix package structure and lazy-import ODT formatter
Add missing __init__.py to formatters/ so setuptools.find_packages
includes the subpackage in wheel/sdist builds (#16).

Move ODTFormatter import from top-level to lazy import inside
get_formatter_by_extension() so missing odfpy no longer crashes module
load before main() runs. Remove dead except ImportError handler in
cli.py save() block; surface a clear 'odfpy is not installed' message
when the formatter factory returns None for .odt (#25).

Closes #16, closes #25
2026-06-25 20:42:13 +07:00
Кокос Артем Николаевич
0e4e0f3ee2 Bump version: v1.5.0 v1.5.0 2026-05-22 17:49:18 +07:00
Кокос Артем Николаевич
2db0ab1f0b Tighten configuration and export handling 2026-05-22 17:41:56 +07:00
Кокос Артем Николаевич
8bc8181ce3 Add Redmine API token authentication 2026-05-22 17:19:00 +07:00
Artem Kokos
7bc6e024c0 Quick fixes & tests 2026-03-28 23:55:46 +07:00
Кокос Артем Николаевич
06cd57e2c4 Blacked 2026-02-05 15:31:31 +07:00
Кокос Артем Николаевич
d7e927e6eb Bump version: v1.4.1 v1.4.1 2026-02-05 15:18:40 +07:00
Кокос Артем Николаевич
000bf37503 Update status map 2026-02-05 15:15:44 +07:00
Артём Кокос
dfb8d474b4 Update README.md 2026-01-26 21:03:24 +07:00
Кокос Артем Николаевич
b7f03666dc Bump version: v1.4.0 v1.4.0 2026-01-26 13:43:54 +07:00
Кокос Артем Николаевич
30310d614d Add HTML formatter
Closes #7
2026-01-26 12:57:33 +07:00
Кокос Артем Николаевич
ad62ef4f6c Fix CSV & MD 2026-01-26 12:56:57 +07:00
Кокос Артем Николаевич
355849e004 Fix issue mock for tests 2026-01-26 12:37:57 +07:00
Артём Кокос
d839be8776 Add unit-tests 2026-01-25 12:40:23 +07:00
Артём Кокос
ea90fe79d0 ODT template into resources 2026-01-25 12:24:32 +07:00
Артём Кокос
1f77088c21 Add tests for all formatters 2026-01-25 11:19:04 +07:00
Артём Кокос
8278864b01 Formatters factory 2026-01-25 11:01:34 +07:00
Кокос Артем Николаевич
f858618a13 Bump version: 1.3.0 v1.3.0 2026-01-24 16:10:03 +07:00
Кокос Артем Николаевич
e344715f61 feat(formatter): unify data pipeline with ReportRow and report_builder 2026-01-24 16:09:25 +07:00
Кокос Артем Николаевич
245ea0a3fa Add Markdown format
Closes #6
2026-01-22 16:52:18 +07:00
Кокос Артем Николаевич
2a39de467f Add CSV format support
Closes #5
2026-01-22 16:42:39 +07:00
Кокос Артем Николаевич
6416df481e Optional disable fill time for console output too 2026-01-22 12:47:31 +07:00
Кокос Артем Николаевич
ead6c72d16 Optional disable fill time column 2026-01-22 12:38:06 +07:00
Кокос Артем Николаевич
e7efda232c Add helper text into ODT output 2026-01-22 12:07:43 +07:00
Кокос Артем Николаевич
937885a12b Bump version: 1.2.0 v1.2.0 2026-01-22 10:59:48 +07:00
Кокос Артем Николаевич
932dd1198a Update .gitignore: ignore report.odt always 2026-01-22 10:58:42 +07:00
Кокос Артем Николаевич
0bff2363dc Add empty line after title 2026-01-22 10:55:42 +07:00
Кокос Артем Николаевич
9b260b27fd Use right cells style in ODT table 2026-01-22 10:45:37 +07:00
Кокос Артем Николаевич
a8511368ce Fix cells width 2026-01-21 18:02:00 +07:00
Кокос Артем Николаевич
7a8b629c7c Bump version: 1.1.0 v1.1.0 2026-01-21 14:23:06 +07:00
Кокос Артем Николаевич
41c7ef24a3 Update README.md 2026-01-21 14:22:18 +07:00
Кокос Артем Николаевич
5b813c76e9 Use last month in ODT-report 2026-01-21 14:22:18 +07:00
Кокос Артем Николаевич
5a5ee00726 Config: Report author name 2026-01-21 14:22:18 +07:00
Кокос Артем Николаевич
4a5dee7a14 Update template with table-styles 2026-01-21 14:22:18 +07:00
Кокос Артем Николаевич
2c123e9ae7 ODT: Group by project & versions 2026-01-21 14:22:18 +07:00
Кокос Артем Николаевич
9a2f753480 Album orient by using templ. doc 2026-01-21 14:22:18 +07:00
Artem Kokos
bca24189c7 ODT table support 2026-01-21 14:22:18 +07:00
Кокос Артем Николаевич
6fcc834617 Add lic v1.0.0 2026-01-21 10:44:53 +07:00
Кокос Артем Николаевич
9b28bf21e7 Fix grouping by version v0.1.1 2026-01-21 10:16:23 +07:00
Кокос Артем Николаевич
86041df76c Human-readable spent time v0.1.0 2026-01-20 17:06:38 +07:00
Кокос Артем Николаевич
7f1018a2d4 Aggregate hours and show in table 2026-01-20 17:01:35 +07:00
Кокос Артем Николаевич
910cc31ecf Fix typo 2026-01-20 12:55:12 +07:00
Кокос Артем Николаевич
dde66ec709 Update README.md 2026-01-20 12:54:29 +07:00
Кокос Артем Николаевич
59d819fdc1 Customizable date range 2026-01-20 12:49:25 +07:00
Кокос Артем Николаевич
29abaa2444 Update README.md 2026-01-20 10:26:49 +07:00
Кокос Артем Николаевич
c0300e71fb Fix SSL-cert issue 2026-01-20 10:19:41 +07:00