- Extended database models (Bin, Port, Task, TaskGroup) with all required fields
- Added 15+ new CRUD operations for comprehensive data management
- Implemented all 20 XML commands from PARS_AUTOSTORE.pkb:
* Bin Information: GetBinInfo, GetBinLoc, GetBinState
* Bin Content: SetBinContentCode, updatebin (legacy support)
* Bin Lifecycle: CreateBin, DeleteBin, PrepareBin
* Bin Operations: OpenBin, CloseBin
* Port Management: openport, closeport, insertbin, removebin
* Task/Taskgroup: create_taskgroup, update_taskgroup, cancel_taskgroup, add_task, cancel_task, gettaskinfo
- All commands are case-insensitive and support flexible parameter names
- Enhanced Swagger/OpenAPI documentation with detailed examples
- Added comprehensive XML_API_REFERENCE.md with all command examples
- Added IMPLEMENTATION_SUMMARY.md with technical overview
- Full compatibility with PL/SQL PARS_AUTOSTORE package
- All commands available via /api and /api/json endpoints
Coverage: 20/20 commands (100%)
✅ Syntax-Highlighting: JSON ist einfacher zu bearbeiten
✅ Kompatibilität: Originalintegration funktioniert weiterhin über /api
✅ Beispiele: Die Dokumentation zeigt alle XML-Commands
Jetzt kannst du alle XML-Commands bequem in Swagger testen!
- Add OFF mode to PortType enum in schemas
- Add set_port_mode CRUD function with mode validation
- Implement SetPortMode XML command handler with comprehensive validation
- Add 6 comprehensive tests covering all scenarios: success, OFF mode, invalid mode, port not found, missing port/mode
- All 39 tests passing with no regressions
- Add get_next_task_for_port CRUD function to find next available task for a port
- Implement GetNextTask XML command handler with port validation
- Add comprehensive tests for success, no tasks available, port not found, and missing port ID scenarios
- All 33 tests passing with no regressions
- Add delete_task_group CRUD function to handle cascading deletion
- Implement DeleteTaskgroup XML command handler with validation
- Add comprehensive tests for success, not found, and missing ID scenarios
- All 29 tests passing with no regressions
- Add GetBinInfo command to XML API endpoint
- Return bin details including ID and ContentCode in XML format
- Implement comprehensive error handling for missing bins and invalid requests
- Add validation for required Bin ID parameter
- Add 3 comprehensive test cases covering success and error scenarios
- Update USER_MANUAL.md with detailed GetBinInfo documentation
- Maintain backward compatibility with existing XML commands
Resolves#13
- Add automated background task processing every 5 seconds
- Implement run_simulation_cycle() function to process queued tasks
- Update task and task group status from 'queued' to 'completed'
- Add comprehensive tests for simulation logic in test_simulation.py
- Integrate simulation with FastAPI lifecycle management
- Unify status handling across the application
- Update USER_MANUAL.md with detailed simulation documentation
Resolves#7
- Add Task and TaskGroup SQLAlchemy models with status and relationships.
- Add Pydantic schemas for creating and reading tasks/task_groups.
- Implement CRUD functions for creating and retrieving tasks and task groups.
- Add FastAPI endpoints:
- POST /task_groups/ to create a new task group with tasks.
- GET /task_groups/{group_id} to retrieve a task group.
- GET /tasks/{task_id} to retrieve a single task.
- Add comprehensive pytest tests for the new endpoints.
- Fix TypeError in model instantiation by adding the 'status' column.
Closes#6
- Extends the data model and schemas to include Ports with types (INBOUND/OUTBOUND) and status (FREE/OCCUPIED).
- Implements CRUD endpoints for managing ports.
- Adds business logic for bin arrival and departure at ports:
- POST /ports/{port_id}/arrive: Assigns a bin to an INBOUND port, setting it to OCCUPIED.
- POST /ports/{port_id}/depart: Frees an OUTBOUND port after a bin is collected.
- Includes comprehensive tests for all new endpoints and logic, including error handling.
Closes#5
- Implements a new endpoint POST /bins/generate to allow for the mass generation of bins.
- Adds a BinGenerationRequest schema to define the generation parameters (count, prefix).
- Implements the corresponding crud.create_bins function for efficient bulk insertion into the database.
- Adds a pytest test case to validate the functionality of the new endpoint.
Closes#4
- Implement CRUD endpoints for /bins/ in main.py.
- Create and pass tests for all BIN endpoints.
- Refactor test setup to use isolated, function-scoped database sessions for each test, ensuring test independence.
- Fix file corruption in database.py and tests/test_main.py.
Closes#3
- Add CRUD functions for creating, reading, and deleting BINs.
- Implement API endpoints for BIN management.
- Create tests for the BIN management API.
- Configure the project to run tests with pytest.
- Use an in-memory SQLite database for testing.