From 9b55613918b1ab3d21d068ed404d42b97e0079c9 Mon Sep 17 00:00:00 2001 From: androiddrew Date: Sat, 9 Nov 2019 20:52:18 -0500 Subject: [PATCH] Cleaning up README files and dependencies --- .gitignore | 1 + services/gear_sockets/README.md | 9 ++++++ services/gears_api/Dockerfile | 0 services/gears_api/README.md | 10 +++++-- services/gears_api/dev_requirements.txt | 37 +++++++++++++++++++++++++ services/gears_api/requirements.txt | 26 +++++++++++------ 6 files changed, 71 insertions(+), 12 deletions(-) create mode 100644 services/gears_api/Dockerfile create mode 100644 services/gears_api/dev_requirements.txt diff --git a/.gitignore b/.gitignore index c9ddd86..39455c6 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ __pycache__/ # Distribution / packaging .Python env/ +*_env/ venv/ pypyenv/ build/ diff --git a/services/gear_sockets/README.md b/services/gear_sockets/README.md index eb29306..e973fdb 100644 --- a/services/gear_sockets/README.md +++ b/services/gear_sockets/README.md @@ -4,6 +4,15 @@ A websocket service for fo use in the gears application. # Development +It is helpful to have a clean virtualenv: + +``` +python -m venv gears_sockets_env +source gears_sockets_env/bin/activate +``` + +DO NOT add this to version control + # Testing diff --git a/services/gears_api/Dockerfile b/services/gears_api/Dockerfile new file mode 100644 index 0000000..e69de29 diff --git a/services/gears_api/README.md b/services/gears_api/README.md index 8c2b784..95c4d0e 100644 --- a/services/gears_api/README.md +++ b/services/gears_api/README.md @@ -2,12 +2,16 @@ API for the gears application -## First time setup +## Development -Create a virtual environment and activate it. Now from the root project directory run `./scripts/bootstrap`. This will install `pip-tools` and sync any dependencies for the first time. +It is helpful to have a clean virtualenv: -To run the app you will need a [postgres] database. Create a development and a test database. Update the connection strings within the `gears_api.settings.toml`. At this time, if you choose to, you can remove the demo `Todo` code and replace it with your own Model. Otherwise create your first [alembic] migration using the `alembic revision --autogenerate -m "your revision message"` command. Finally, apply your first migration with `alembic upgrade head`. +``` +python -m venv gears_api_env +source gears_sockets_env/bin/activate +``` +To run the app you will need a [postgres] database. Create a development and a test database. Update the connection strings within the `gears_api.settings.toml`. At this time, if you choose to, you can remove the demo `Todo` code and replace it with your own Model. Otherwise create your first [alembic] migration using the `alembic revision --autogenerate -m "your revision message"` command. Finally, apply your first migration with `alembic upgrade head`. ## Running the developement server A `manage.py` script has been included with a collection of [click] cli functions to assist in development. diff --git a/services/gears_api/dev_requirements.txt b/services/gears_api/dev_requirements.txt new file mode 100644 index 0000000..f2243f5 --- /dev/null +++ b/services/gears_api/dev_requirements.txt @@ -0,0 +1,37 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile dev_requirements.in +# +--trusted-host pypi.python.org + +appdirs==1.4.3 # via black +atomicwrites==1.3.0 # via pytest +attrs==19.3.0 # via black, pytest +black==19.10b0 +bumpversion==0.5.3 +click==7.0 # via black, pip-tools +coverage==4.5.4 # via pytest-cov +entrypoints==0.3 # via flake8 +flake8==3.7.9 +importlib-metadata==0.23 # via pluggy, pytest +mccabe==0.6.1 # via flake8 +more-itertools==7.2.0 # via pytest, zipp +packaging==19.2 # via pytest +pathspec==0.6.0 # via black +pip-tools==4.2.0 +pluggy==0.13.0 # via pytest +py==1.8.0 # via pytest +pycodestyle==2.5.0 # via flake8 +pyflakes==2.1.1 # via flake8 +pyparsing==2.4.4 # via packaging +pytest-cov==2.8.1 +pytest==5.2.2 +regex==2019.11.1 # via black +six==1.13.0 # via packaging, pip-tools +toml==0.10.0 # via black +typed-ast==1.4.0 # via black +wcwidth==0.1.7 # via pytest +werkzeug==0.16.0 +zipp==0.6.0 # via importlib-metadata diff --git a/services/gears_api/requirements.txt b/services/gears_api/requirements.txt index 9c65ee6..93babc1 100644 --- a/services/gears_api/requirements.txt +++ b/services/gears_api/requirements.txt @@ -2,23 +2,31 @@ # This file is autogenerated by pip-compile # To update, run: # -# pip-compile gears_api/requirements.in +# pip-compile requirements.in # --trusted-host pypi.python.org -alembic==1.2.1 +alembic==1.3.0 +authlib==0.12.1 # via molten-jwt +cffi==1.13.2 # via cryptography click==7.0 -gunicorn==19.9.0 +cryptography==2.8 # via authlib +gunicorn==20.0.0 mako==1.1.0 # via alembic markupsafe==1.1.1 # via mako +molten-jwt==0.3.0 molten==0.7.4 -mypy-extensions==0.4.2 # via typing-inspect -psycopg2-binary==2.8.3 -python-dateutil==2.8.0 # via alembic +mypy-extensions==0.4.3 # via typing-inspect +psycopg2-binary==2.8.4 +pycparser==2.19 # via cffi +python-dateutil==2.8.1 # via alembic python-editor==1.0.4 # via alembic -six==1.12.0 # via python-dateutil -sqlalchemy==1.3.9 -typing-extensions==3.7.4 # via molten +six==1.13.0 # via cryptography, python-dateutil +sqlalchemy==1.3.10 +typing-extensions==3.7.4.1 # via molten typing-inspect==0.3.1 # via molten whitenoise==4.1.4 wsgicors==0.7.0 + +# The following packages are considered to be unsafe in a requirements file: +# setuptools==41.6.0 # via gunicorn