-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
96 changed files
with
1,871 additions
and
1,268 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Python CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-python/ for more details | ||
# | ||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
# specify the version you desire here | ||
- image: coderbot/python-gpac:3.5 | ||
|
||
working_directory: ~/repo | ||
|
||
steps: | ||
- checkout | ||
|
||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "requirements_stub.txt" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
|
||
- run: | ||
name: install dependencies | ||
command: | | ||
python3 -m venv venv | ||
. venv/bin/activate | ||
pip install -r requirements_stub.txt | ||
- save_cache: | ||
paths: | ||
- ./venv | ||
key: v1-dependencies-{{ checksum "requirements_stub.txt" }} | ||
|
||
# run tests! | ||
- run: | ||
name: run tests | ||
command: | | ||
. venv/bin/activate | ||
export PYTHONPATH=./stub | ||
mkdir test-reports | ||
python3 -m unittest test/coderbot_test.py 2>&1 | tee test-reports/test_report.txt | ||
#python3 -m unittest test/cnn_test.py 2>&1 | tee test-reports/test_report.txt | ||
python3 -m unittest test/camera_test.py 2>&1 | tee test-reports/test_report.txt | ||
echo "test complete" | ||
- store_artifacts: | ||
path: test-reports/ | ||
destination: tr1 | ||
|
||
- store_test_results: | ||
path: test-reports/ | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,47 @@ | ||
CoderBot | ||
======== | ||
# backend | ||
|
||
A RaspberryPI-based bot controller | ||
> CoderBot is a RaspberryPI-based programmable robot for educational purposes. Check the [project website](https://www.coderbot.org) for more information. | ||
> | ||
> For further information about development and technical documentation, see the [Wiki](https://github.com/CoderBotOrg/coderbot/wiki). | ||
The module provide a simple web interface to a raspberry py "robot". | ||
This repository contains the backend, exposing the [CoderBot API](https://github.com/CoderBotOrg/backend/wiki/API-v2). | ||
|
||
See the [wiki](https://github.com/CoderBotOrg/coderbot/wiki) for the documentation | ||
### Quickstart | ||
|
||
Prerequisites: | ||
|
||
```bash | ||
sudo apt install python3 python3-venv | ||
``` | ||
|
||
Be sure you have Python **3.6**. You may need to use `python3.6` and `python3.6-venv` packages on some repositories with python3 already pointing to **3.7** (e.g. debian unstable/sid). | ||
|
||
|
||
|
||
```bash | ||
git clone https://github.com/CoderBotOrg/coderbot.git | ||
cd coderbot | ||
python3 -m venv . | ||
source bin/activate | ||
|
||
# Install the basic requirements | ||
pip3 install -r requirements_stub.txt | ||
# Additional packages if you are running the real thing | ||
pip3 install -r requirements.txt | ||
|
||
# Start the backend in stub mode | ||
PYTHONPATH=stub python3 init.py | ||
|
||
# or, run the real thing if you're on a physical RPi | ||
python3 init.py | ||
``` | ||
|
||
Once started, the backend will expose a number of endpoints: | ||
|
||
- Legacy API: [localhost:5000/`<LEGACY_METHOD>`](http://localhost:5000/); | ||
- Legacy JQuery web application: [localhost:5000/old](http://localhost:5000/old); | ||
- API v2: [localhost:5000/v2](http://localhost:5000/v2); | ||
- New Vue web application: [localhost:5000/](http://localhost:5000/) (assuming a [vue-app](https://github.com/coderbotorg/vue-app) build is placed in the `dist/` folder); | ||
- Documentation: [localhost:5000/docs](http://localhost:5000/docs) assuming a [docs](https://github.com/coderbotorg/docs) build is placed in the `cb_docs/` folder); | ||
- Swagger UI dynamic documentation of the API v2: [localhost:5000/v2/ui/index.html](http://localhost:5000/v2/ui/index.html) (once you cloned the [swagger-ui](https://github.com/coderbotorg/swagger-ui) repository inside the backend folder). | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.