diff options
Diffstat (limited to 'api')
| -rw-r--r-- | api/README.md | 12 | ||||
| -rw-r--r-- | api/opendc/models/prefab.py | 2 | ||||
| -rw-r--r-- | api/requirements.txt | 6 |
3 files changed, 11 insertions, 9 deletions
diff --git a/api/README.md b/api/README.md index 4e8110d0..182cd803 100644 --- a/api/README.md +++ b/api/README.md @@ -66,18 +66,18 @@ Clone OpenDC and follow the [instructions in the main repository](../) to set up **Important:** Be sure to set up environment variables according to those instructions, in a `.env` file. -In `api/static/index.html`, add your own `OAUTH_CLIENT_ID` in `content=` on line `2`. +If you want to test REST calls manually, add your own `OAUTH_CLIENT_ID` in `content=` on line `2` in `api/static/index.html`. #### Set up the database -You can selectively run only the database services from the standard OpenDC `docker-compose` setup: +You can selectively run only the database services from the standard OpenDC `docker-compose` setup (in the root directory): ```bash docker-compose build mongo mongo-express docker-compose up mongo mongo-express ``` -This will set you up with a running MongoDB instance and a visual inspection tool running on [localhost:8082](http://localhost:8082), with which you can view and manipulate the database. +This will set you up with a running MongoDB instance and a visual inspection tool running on [localhost:8082](http://localhost:8082), with which you can view and manipulate the database. Add the simulator images to the command lists above if you want to test simulation capabilities, as well. ### Local Development @@ -92,10 +92,10 @@ When editing the web server code, restart the server (`CTRL` + `c` followed by ` #### Code Style -To format all files, run `format.sh` in this directory (uses `yapf` internally). +To format all files, run `format.sh` in this directory. The script uses `yapf` internally to format everything automatically. -To check if code style is up to modern standards, run `check.sh` in this directory (uses `pylint` internally). +To check if code style is up to modern standards, run `check.sh` in this directory. The script uses `pylint` internally. #### Testing -Run `pytest` in this directory to run all tests. +Run `pytest opendc` in this directory to run all tests. diff --git a/api/opendc/models/prefab.py b/api/opendc/models/prefab.py index 70910c4a..edf1d4c4 100644 --- a/api/opendc/models/prefab.py +++ b/api/opendc/models/prefab.py @@ -16,6 +16,8 @@ class Prefab(Model): """ user = User.from_google_id(google_id) + # TODO(Jacob) add special handling for OpenDC-provided prefabs + #try: print(self.obj) diff --git a/api/requirements.txt b/api/requirements.txt index 140a046f..0f8c3fcf 100644 --- a/api/requirements.txt +++ b/api/requirements.txt @@ -1,5 +1,5 @@ flask==1.1.2 -flask-socketio==4.3.0 +flask-socketio==4.3.1 oauth2client==4.1.3 eventlet==0.25.2 flask-compress==1.5.0 @@ -9,7 +9,7 @@ six==1.15.0 pymongo==3.10.1 yapf==0.30.0 pytest==5.4.3 -pytest-mock==3.1.1 +pytest-mock==3.2.0 pytest-env==0.6.2 pylint==2.5.3 -python-dotenv==0.13.0 +python-dotenv==0.14.0 |
