Repository navigation
Feat: enrich ls commands with Track API, add --stdout to time download - #185
Merged
Merged
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ensure the dev container's Python interpreter is used
from https://engineering.toggl.com/docs/track/reports/utils - list clients - list projects - list project users
implement paging to request all objects
- Add --stdout flag as an alias for --output stdout - When writing to stdout, redirect status messages to stderr so data consumers get a clean stream - Add tests for --stdout flag, --output stdout, and completion message behavior
- Add TogglWorkspace.get_projects() Track API method with pagination - Add TogglUtils.get_projects_detailed() to fetch full project metadata - Add --detailed CLI flag to ls projects that returns all Track API fields (rate, estimated_hours, fixed_fee, start_date, end_date, etc.) - Exclude internal/auxiliary fields (total_count, pinned, permissions, etc.) from detailed output - Add tests for --detailed flag, empty results, filters, and basic mode - Update ls.md guide to document the new --detailed flag
thekaveman
force-pushed
the
feat/toggl-utils
branch
from
November 14, 2026 00:26
1a370b5 to
08a8852
Compare
- Add TogglWorkspace.get_project_users() Track API method - Update TogglUtils.get_project_users() to use Track API with pagination - Change output columns from old Reports fields to Track API fields: id, user_id, project_id, workspace_id, rate, labor_cost - Manager field omitted per requirements - Update tests for new API method, pagination, and column output
- Add TogglWorkspace.get_clients() Track API method with pagination - Add TogglUtils.get_clients_detailed() to fetch full client metadata - Add --detailed CLI flag to ls clients that returns all Track API fields (archived status, notes, integration metadata, etc.) - Exclude internal/auxiliary fields (total_count, permissions, wid) from detailed output - Add tests for --detailed flag, empty results, basic mode, and pagination - Update ls.md guide to document the new --detailed flag
- Remove --detailed flag from ls projects and ls clients - --format basic uses Reports API (concise output) - --format csv/json uses Track API (all available fields) - Consolidated exclusion of internal/auxiliary fields into module level constants for both commands - Updated all tests to use --format csv/json instead of --detailed - Updated ls.md guide to document the consolidated behavior
thekaveman
force-pushed
the
feat/toggl-utils
branch
from
November 14, 2026 00:48
90a5dbd to
4151a8f
Compare
thekaveman
marked this pull request as ready for review
November 14, 2026 00:58
Pandas casts columns with missing values to float, causing integer IDs to render with .0 decimals (e.g. 12345.0 instead of 12345). Fixed by converting id, client_id, user_id, project_id, and workspace_id columns to nullable Int64 before writing CSV. Also add _normalize_int_fields() to convert known integer columns (id, client_id, user_id, project_id, workspace_id, creator_id) from float to int in the service layer. This prevents pandas from rendering them as 12345.0 in JSON output when the API returns them as floats.
thekaveman
force-pushed
the
feat/toggl-utils
branch
from
November 14, 2026 01:31
7eb2fb3 to
0ea52c9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Adds --stdout streaming to time download and enriches the ls subcommands (projects, project-users, clients) with full Toggl Track API data. The --format flag now drives the data source: basic returns a concise subset from the Reports API, while csv and json return all available fields from the Track API.
Changes
time download—--stdoutsupport--stdoutflag as an alias for--output stdoutto stream CSV output directly to stdoutstderrwhen outputting tostdout, keeping the data stream clean--outputis provided, a filename is auto-generated from the date rangels projects— Track API enrichmentTogglWorkspace.get_projects()method calling the Track APIGET /api/v9/workspaces/{workspace_id}/projectswith full pagination supportls project-users— Track API migrationTogglWorkspace.get_project_users()method calling the Track APIGET /api/v9/workspaces/{workspace_id}/project_userswith paginationls clients— Track API enrichmentTogglWorkspace.get_clients()method calling the Track APIGET /api/v9/workspaces/{workspace_id}/clientswith paginationTogglUtils.get_clients_detailed()to fetch full client metadataConsolidated
--formatbehaviorAll three
lssubcommands use--formatto determine the data source and output.