- Add _parse_natural() to utils.py using dateparser as a fallback when structured date formats (YYYY-MM-DD, MM-DD, DD-MM) don't match - Supports expressions like 'today', 'yesterday', 'monday', '3 days ago' - Change day argument to nargs='*' and join tokens so unquoted multi-word expressions like: uv run timesheets 3 days ago work correctly - Pin dateparser to English to avoid locale-dependent behaviour - Update tests to cover natural language cases and fix test_last_monday (dateparser does not support 'last monday'; use 'monday' instead)
35 lines
650 B
TOML
35 lines
650 B
TOML
[project]
|
|
name = "timesheets"
|
|
version = "0.1.0"
|
|
description = "Parse markdown timesheet tables and export to CSV"
|
|
readme = "README.md"
|
|
authors = [
|
|
{ name = "Jef Roosens", email = "roosenj@factry.io" }
|
|
]
|
|
requires-python = ">=3.13"
|
|
dependencies = [
|
|
"dateparser>=1.4.0",
|
|
"joppy>=1.0.2",
|
|
]
|
|
|
|
[project.scripts]
|
|
timesheets = "timesheets.cli:main"
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
|
|
[tool.coverage.run]
|
|
source = ["timesheets"]
|
|
|
|
[tool.coverage.report]
|
|
show_missing = true
|
|
|
|
[build-system]
|
|
requires = ["uv_build>=0.10.8,<0.11.0"]
|
|
build-backend = "uv_build"
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=9.0.3",
|
|
"pytest-cov>=7.1.0",
|
|
]
|