From d0e5a20c9cd8044dfc4a873169f32c3386ef90c4 Mon Sep 17 00:00:00 2001 From: Manish Saha Date: Sun, 22 Sep 2019 20:21:57 -0400 Subject: [PATCH] Change .env extensions to .envrc for direnv (#42) --- .gitignore | 2 +- README.md | 16 ++++++++++++++-- docker-compose.yml | 2 +- env.template => envrc.template | 0 4 files changed, 16 insertions(+), 4 deletions(-) rename env.template => envrc.template (100%) diff --git a/.gitignore b/.gitignore index dcac6cd..99c56ee 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,7 @@ wheels/ MANIFEST # Environments -*.env +*.envrc venv/ # Zip diff --git a/README.md b/README.md index 7956091..2e2b02f 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ source venv/bin/activate pip install -r requirements.txt ``` -Make sure to also create your `.env` file by running: +Make sure to also create your `.envrc` file by running: ``` -cp env.template .env +cp envrc.template .envrc ``` Environment variable values can be found by asking a member of Cornell AppDev. @@ -36,6 +36,18 @@ python app.py # Style So that the repository agrees upon a style standard, we have opted to use [black](https://github.com/psf/black) for Python formatting! +## Setting up linter +**Flake 8**: Install [flake8](http://flake8.pycqa.org/en/latest/) + +**Black**: Either use [command line tool](https://black.readthedocs.io/en/stable/installation_and_usage.html) or use [editor extension](https://black.readthedocs.io/en/stable/editor_integration.html). + +If using VS Code, install the 'Python' extension and include following snippet inside `settings.json`: +``` json +"python.linting.pylintEnabled": false, +"python.linting.flake8Enabled": true, +"python.formatting.provider": "black" + ``` + # Endpoints # **/alerts** • GET diff --git a/docker-compose.yml b/docker-compose.yml index 0bccd63..5489ef7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: "3.4" services: live-tracking: build: . - env_file: python.env + env_file: python.envrc ports: - "5000:5000" diff --git a/env.template b/envrc.template similarity index 100% rename from env.template rename to envrc.template