update readme
This commit is contained in:
@@ -4,13 +4,12 @@ A time reporting application for the Kleer API with both FastAPI web interface a
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- 🎨 **Modern Web UI**: Beautiful, responsive web interface with drag-and-drop file upload
|
- 🎨 **Modern Web UI**: Responsive glassy interface with drag/drop upload and live status
|
||||||
- 📊 **CSV Processing**: Parse and extract work time from CSV files
|
- 📑 **CSV + XLSX**: Parse CSV or XLSX (reads `AGRESSO` sheet) for time extraction
|
||||||
- 🌐 **REST API**: FastAPI endpoints for time reporting
|
- ✅ **Approvals**: View and approve events over a date range from the UI or API
|
||||||
- 💻 **CLI Interface**: Interactive command-line time reporting
|
- 🌐 **REST API**: FastAPI endpoints for projects, reporting, events, and approvals
|
||||||
- ✅ **Input Validation**: Pydantic models for data validation
|
- 💻 **CLI**: Interactive command-line mode for CSV/XLSX files
|
||||||
- 🧪 **Tested**: Unit tests with pytest
|
- 🧪 **Tested**: Unit tests with pytest and mocked API calls
|
||||||
- 📝 **Well-Documented**: Comprehensive docstrings and type hints
|
|
||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
@@ -104,10 +103,11 @@ python main.py cli
|
|||||||
### Using the Web UI
|
### Using the Web UI
|
||||||
|
|
||||||
1. **Open your browser** to `http://localhost:8000`
|
1. **Open your browser** to `http://localhost:8000`
|
||||||
2. **Upload your CSV file** by dragging and dropping or clicking to browse
|
2. **Upload your CSV or XLSX** (XLSX uses the `AGRESSO` sheet) via drag/drop or browse
|
||||||
3. **Select a project** from the dropdown
|
3. **Select a project** from the dropdown
|
||||||
4. **Click "Report Time"** to submit
|
4. **Click "Report Time"** to submit
|
||||||
5. View the **results summary** with total hours and days reported
|
5. Optionally **load and approve events** by selecting a date range in the Approve Events panel
|
||||||
|
6. View the **results summary** with total hours and days reported
|
||||||
|
|
||||||
The web interface features:
|
The web interface features:
|
||||||
- 🎯 Drag-and-drop file upload
|
- 🎯 Drag-and-drop file upload
|
||||||
@@ -150,11 +150,11 @@ Lists all active projects for the configured user.
|
|||||||
```
|
```
|
||||||
|
|
||||||
### POST /report-time
|
### POST /report-time
|
||||||
Upload a CSV file and report time to a specific project.
|
Upload a CSV or XLSX file and report time to a specific project.
|
||||||
|
|
||||||
**Parameters:**
|
**Parameters:**
|
||||||
- `project_name` (query): Name of the project
|
- `project_name` (query): Name of the project
|
||||||
- `file` (form): CSV file with time entries
|
- `file` (form): CSV or XLSX file with time entries (XLSX sheet: `AGRESSO`)
|
||||||
|
|
||||||
**Response:**
|
**Response:**
|
||||||
```json
|
```json
|
||||||
@@ -170,9 +170,23 @@ Upload a CSV file and report time to a specific project.
|
|||||||
### GET /docs
|
### GET /docs
|
||||||
Interactive API documentation (Swagger UI).
|
Interactive API documentation (Swagger UI).
|
||||||
|
|
||||||
## CSV Format
|
### GET /events
|
||||||
|
List events for the configured user within a date range.
|
||||||
|
|
||||||
The application **automatically detects** the CSV delimiter (comma or semicolon) and column structure.
|
**Query parameters:**
|
||||||
|
- `start_date` (YYYY-MM-DD)
|
||||||
|
- `end_date` (YYYY-MM-DD)
|
||||||
|
|
||||||
|
### POST /approve-events
|
||||||
|
Approve events for the configured user within a date range.
|
||||||
|
|
||||||
|
**Query parameters:**
|
||||||
|
- `start_date` (YYYY-MM-DD)
|
||||||
|
- `end_date` (YYYY-MM-DD)
|
||||||
|
|
||||||
|
## CSV/XLSX Format
|
||||||
|
|
||||||
|
The application **automatically detects** the CSV delimiter (comma or semicolon) and column structure. XLSX parsing reads rows from the `AGRESSO` worksheet.
|
||||||
|
|
||||||
### Supported Formats
|
### Supported Formats
|
||||||
|
|
||||||
@@ -196,6 +210,7 @@ reg_period,xreg_period,T,Time code,Time code (T),Vouch.date,Project Activity,Pro
|
|||||||
- **Date formats**: Supports both `MM/DD/YYYY` and `YYYY-MM-DD`
|
- **Date formats**: Supports both `MM/DD/YYYY` and `YYYY-MM-DD`
|
||||||
- **Hours format**: Supports decimal hours with comma (`,`) or dot (`.`) as separator
|
- **Hours format**: Supports decimal hours with comma (`,`) or dot (`.`) as separator
|
||||||
- **Whitespace**: Automatically trimmed from values
|
- **Whitespace**: Automatically trimmed from values
|
||||||
|
- **XLSX**: Only the `AGRESSO` worksheet is read; empty rows are skipped and date cells are normalized
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user