The provided scripts are used to create the audit tasks to perform cyclic audit over a period of time instead of performing full audit
These parameters can be modified by the user to customize the audit behavior:
Parameter | Default Value | Description |
---|---|---|
AUDIT_TASK_NUMBER |
1 |
The number of audit tasks to generate |
AUDIT_BIN_NUMBER |
8 |
The number of bins task to audit at once |
UPLOAD_GENERATED_AUDITS |
False |
Should the script upload automatically to WMS the audit tasks |
AUDIT_DESCRIPTOR_GROUP |
"日販" |
Should be CX or 日販 or CX日販 |
These parameters configure the environment and connection settings:
Parameter | Default Value | Description |
---|---|---|
ASRS_NAME |
"RR ASRS 001" |
ASRS setting name |
ENV_URL |
"http://localhost" |
Environment URL (can be set to production URL) |
ENV_TOKEN |
"autobootstrap" |
Environment token for authentication |
The script supports three predefined descriptor groups:
Group Name | Descriptor Names | Cycle Number |
---|---|---|
CX |
CX Bin 1x1, CX Bin 2x1, CX Bin 2x2, CX Bin 4x2 | 1 |
日販 |
日販 Bin 1x1, 日販 Bin 2x1, 日販 Bin 2x2, 日販 Bin 4x2 | 2 |
CX日販 |
CX日販 Bin 1x1, CX日販 Bin 2x1, CX日販 Bin 2x2, CX日販 Bin 4x2 | 2 |
These paths define where input and output files are located:
Parameter | Default Path | Description |
---|---|---|
PER_BIN_AUDIT_REPORT |
./results/Cycle1&2実施状況(Bin別).csv |
Per-bin audit report output path |
AUDIT_NEXT_TASK_PATH |
./results/次回棚卸し作業.csv |
Next audit task output path |
- Python 3.8 or later
- pip3 (Python package installer)
- Clone this repo to a PC where the audit tasks are generated and provided to customers throughout the Cyclic audit period (eg. Edge server)
- Run the setup script to automatically configure your Python environment:
This script will:
./setup.sh
- Check Python and pip installation
- Optionally create a virtual environment (recommended)
- Install required Python packages from
requirements.txt
- Create necessary directories (
files
andresults
)
If you prefer to set up the environment manually:
- Clone this repository
- Create a virtual environment (optional but recommended):
python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install required packages:
pip3 install -r requirements.txt
- Create necessary directories:
mkdir -p files results
The script depends on the following external packages (automatically installed via requirements.txt
):
httpx>=0.24.0
- HTTP client for API requestsrequests>=2.28.0
- HTTP library for file downloadspandas>=1.5.0
- Data manipulation and analysisnumpy>=1.21.0
- Numerical computing support
- Configure the ENV_URL and ENV_TOKEN in
config.py
aligned with the production environment
- Open the config.py
- Set the UPLOAD_GENERATED_AUDITS to True
- Set AUDIT_TASK_NUMBER param to number of audit tasks to be generated
- Set the AUDIT_BIN_NUMBER of bins to be audited
- Set the AUDIT_DESCRIPTOR_GROUP to the container groups one among (CX, 日販, CX日販)
- Open a terminal and execute the audit_report.py
> python3 audit_report.py
- The generated files can be inspected in the results folder
- THe uploaded Audit tasks can be inspected in the System UI (WMS management screen - Audit tab)
Note: In files folder, initial inventory configuration is captured. Please backup the contents of this folder
THe bins are selected for audit based on the following logic
- Bins selected in the descriptor group
- Bins for which Cycle 1 audit is not performed and that have the oldest inventory movement
- Bins for which Cycle 1 is performed but Cycle 2 audit is not performed and that have the oldest inventory movement
- Randomize the bins for which inventory movement happened
- Select the first AUDIT_BIN_NUMBER bins
- Randomize the bins (to distribute across in a fuzzy manner to the auditing personnel)
- Split the randomized bins into AUDIT_TASK_NUMBER tasks