From 705ac0fba2dc879115509006ce4fdfae8c9fc5c0 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Fri, 15 Mar 2019 15:39:59 -0700 Subject: update dev setup instructions --- python/README.md | 2 +- python/env.example | 20 -------------------- python/example.env | 20 ++++++++++++++++++++ python/tests/fixtures.py | 4 ++-- 4 files changed, 23 insertions(+), 23 deletions(-) delete mode 100644 python/env.example create mode 100644 python/example.env (limited to 'python') diff --git a/python/README.md b/python/README.md index 2760885c..fe9a411d 100644 --- a/python/README.md +++ b/python/README.md @@ -34,7 +34,7 @@ server on the same machine by default), use: # will listen on http://localhost:9810 by default pipenv run fatcat_webface.py -Almost all configuration is done via environment variables; see `env.example` +Almost all configuration is done via environment variables; see `example.env` for a list of settings. If you copy this file to `.env` it will be sourced by `pipenv` automatically; you can also load it in your shell like `source .env`. diff --git a/python/env.example b/python/env.example deleted file mode 100644 index 4bf76e21..00000000 --- a/python/env.example +++ /dev/null @@ -1,20 +0,0 @@ -FLASK_SECRET_KEY="TODO-REPLACE-ME" -FATCAT_DOMAIN="dev.fatcat.wiki" -# This key used in tests -FATCAT_API_AUTH_TOKEN="AgEPZGV2LmZhdGNhdC53aWtpAhYyMDE5MDEwMS1kZXYtZHVtbXkta2V5AAImZWRpdG9yX2lkID0gYWFhYWFhYWFhYWFhYmt2a2FhYWFhYWFhYWkAAht0aW1lID4gMjAxOS0wMS0wOVQwMDo1Nzo1MloAAAYgnroNha1hSftChtxHGTnLEmM/pY8MeQS/jBSV0UNvXug=" -FATCAT_API_HOST="http://localhost:9411/v0" -ELASTICSEARCH_BACKEND="http://localhost:9200" -ELASTICSEARCH_RELEASE_INDEX="fatcat_release" -ELASTICSEARCH_CONTAINER_INDEX="fatcat_container" -GITLAB_CLIENT_ID="" -GITLAB_CLIENT_SECRET="" -IA_XAUTH_CLIENT_ID="" -IA_XAUTH_CLIENT_SECRET="" -SENTRY_DSN="" - -# These auth keys only for workers/importers; locally will fall back to -# FATCAT_API_AUTH_TOKEN -FATCAT_AUTH_WORKER_CROSSREF="" -FATCAT_AUTH_WORKER_ORCID="" -FATCAT_AUTH_WORKER_PUBMED="" -FATCAT_AUTH_WORKER_DATACITE="" diff --git a/python/example.env b/python/example.env new file mode 100644 index 00000000..4bf76e21 --- /dev/null +++ b/python/example.env @@ -0,0 +1,20 @@ +FLASK_SECRET_KEY="TODO-REPLACE-ME" +FATCAT_DOMAIN="dev.fatcat.wiki" +# This key used in tests +FATCAT_API_AUTH_TOKEN="AgEPZGV2LmZhdGNhdC53aWtpAhYyMDE5MDEwMS1kZXYtZHVtbXkta2V5AAImZWRpdG9yX2lkID0gYWFhYWFhYWFhYWFhYmt2a2FhYWFhYWFhYWkAAht0aW1lID4gMjAxOS0wMS0wOVQwMDo1Nzo1MloAAAYgnroNha1hSftChtxHGTnLEmM/pY8MeQS/jBSV0UNvXug=" +FATCAT_API_HOST="http://localhost:9411/v0" +ELASTICSEARCH_BACKEND="http://localhost:9200" +ELASTICSEARCH_RELEASE_INDEX="fatcat_release" +ELASTICSEARCH_CONTAINER_INDEX="fatcat_container" +GITLAB_CLIENT_ID="" +GITLAB_CLIENT_SECRET="" +IA_XAUTH_CLIENT_ID="" +IA_XAUTH_CLIENT_SECRET="" +SENTRY_DSN="" + +# These auth keys only for workers/importers; locally will fall back to +# FATCAT_API_AUTH_TOKEN +FATCAT_AUTH_WORKER_CROSSREF="" +FATCAT_AUTH_WORKER_ORCID="" +FATCAT_AUTH_WORKER_PUBMED="" +FATCAT_AUTH_WORKER_DATACITE="" diff --git a/python/tests/fixtures.py b/python/tests/fixtures.py index 3cc275b3..d7ebdac8 100644 --- a/python/tests/fixtures.py +++ b/python/tests/fixtures.py @@ -11,7 +11,7 @@ import fatcat_client @pytest.fixture def full_app(): - load_dotenv(dotenv_path="./env.example") + load_dotenv(dotenv_path="./example.env") fatcat_web.app.testing = True fatcat_web.app.debug = False return fatcat_web.app @@ -22,7 +22,7 @@ def app(full_app): @pytest.fixture def api(): - load_dotenv(dotenv_path="./env.example") + load_dotenv(dotenv_path="./example.env") conf = fatcat_client.Configuration() conf.host = "http://localhost:9411/v0" conf.api_key["Authorization"] = os.getenv("FATCAT_API_AUTH_TOKEN") -- cgit v1.2.3