Fleet
Set up a new bench, substitute a path to the python version to use, which should 3.10 latest
- Author: agritheory
- Repository: https://github.com/agritheory/fleet
- GitHub stars: 4
- Forks: 1
- License: MIT
- Category: Other
- Maintenance: Actively Maintained
- Frappe versions: v15, v16
Install Fleet
bench get-app https://github.com/agritheory/fleet
Add the Frappe Gems badge to your README
Maintain Fleet? Paste this into your README:
[](https://frappegems.com/gems/apps/agritheory/fleet)
About Fleet
## Fleet
Fleet Integration for ERPNext
## Install Instructions
Set up a new bench, substitute a path to the python version to use, which should 3.10 latest
```
# for linux development
bench init --frappe-branch version-15 {{ bench name }} --python ~/.pyenv/versions/3.10.10/bin/python3
```
Create a new site in that bench
```
cd {{ bench name }}
bench new-site {{ site name }} --force --db-name {{ site name }}
bench use {{ site name }}
```
Download all required applications, including this one
```
bench get-app erpnext --branch version-15
bench get-app hrms --branch version-15
bench get-app fleet --branch version-15 git@github.com:AgriTheory/fleet.git
```
Install all apps
```
bench install-app erpnext hrms fleet
```
Set developer mode in `site_config.json`
```
cd {{ site name }}
nano site_config.json
"developer_mode": 1,
```
Update and get the site ready
```
bench start
```
In a new terminal window
```
bench update
bench migrate
bench build
```
To run mypy
```shell
source env/bin/activate
mypy ./apps/fleet/fleet --ignore-missing-imports
```
To run pytest
```shell
source env/bin/activate
pytest ./apps/fleet/fleet/tests -s --disable-warnings
```
To install test data and simulate GPS data pushing to a development Traccar server, follow these steps:
1) Start a local Traccar instance using their Docker image (Mac users don't need both port mapping `-p` arguments). Navigate to the local Traccar server via `http://localhost:PORT_NUMBER` (where the `PORT_NUMBER` is the first one before the colon in the command below), register an account with a username and password, then log in.
```shell
docker run -d --name traccar-test -p 8082:8082 -p 5000-5150:5000-5150 traccar/traccar:latest
# If the port is already available as an environment variable (see step 2):
docker run -d --name traccar-test -p $TRACCAR_PORT:$TRACCAR_PORT traccar/traccar:latest
```
2) Save the username and password along with the Docker port mapping value as local environment variables. With these variables present, the test data script will automatically create the Traccar Integration document and add vehicle devices to the Docker instance. The test script needs the Traccar Integration in place to properly create vehicles.
```shell
# In your shell profile/rc file
export TRACCAR_USERNAME=''
export TRACCAR_PASSWORD=''
# Optional: if the port number is different than the simulate default of 5055
export TRACCAR_PORT=
# Source the shell profile script (or open a new shell) to ensure the variables are available before running the `bench execute` commands
source ./path/to/shell_profile_file
```
3) With the docker instance running, install the demo data into your local site:
```shell
bench execute 'fleet.tests.setup.before_test'
```
4) Log into the local site and check that the test script properly created the Traccar Integration document with the Traccar URL and login credentials. Also check the Traccar instance - if the test data synced with Traccar correctly, the map home screen that shows after logging in will display the vehicles as devices in the sidebar. If not, make sure the environment variables are available to the current shell, then reinstall the local site and run step 3 again.
5) Simulate GPS data:
```shell
bench execute 'fleet.tests.simulate_gps_data.simulate'
```
Related Other apps for Frappe & ERPNext
- Erpnext — Free and Open Source Enterprise Resource Planning (ERP)
- Helpdesk — Modern, Streamlined, Free and Open Source Customer Service Software
- Print Designer — Visual print designer for Frappe / ERPNext
- Ctr — CTR模型代码和学习笔记总结
- Whitelabel — Whitelabel ERPNext
- Fossunited — fossunited.org
- Helm — Helm Chart Repository for Frappe/ERPNext
- Frappe Attachments S3 — A frappe app to upload file attachments in doctypes to s3.