aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-11-08 11:46:06 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-11-08 11:46:09 -0800
commitd07b0240d9ddc824694a94da594186380d4d7f44 (patch)
tree31fb9f7dd77e12cf0ee0e1e8fe992a1c0d4565af
parentd994d11d90a6e7af7f9df39e90515c0fa633cfc5 (diff)
downloadfatcat-d07b0240d9ddc824694a94da594186380d4d7f44.tar.gz
fatcat-d07b0240d9ddc824694a94da594186380d4d7f44.zip
update README
-rw-r--r--README.md5
-rw-r--r--python/README.md41
2 files changed, 40 insertions, 6 deletions
diff --git a/README.md b/README.md
index 7355e626..4873af8d 100644
--- a/README.md
+++ b/README.md
@@ -27,6 +27,11 @@ See the LICENSE file for details permissions and licensing of both python and
rust code. In short, the auto-generated client libraries are permissively
released, while the API server and web interface are strong copyleft (AGPLv3).
+## Building and Tests
+
+Automated integration tests run on Gitlab CI (see `.gitlab-ci.yml`) on the
+Internet Archive's internal (not public) infrastructure.
+
## Status
- SQL and HTTP API schemas
diff --git a/python/README.md b/python/README.md
index 1369051a..9ba6b990 100644
--- a/python/README.md
+++ b/python/README.md
@@ -1,18 +1,47 @@
-## Python Web Interface and API Client Library
+## Python Web Interface
-Use `pipenv` (which you can install with `pip`).
+This project uses `pipenv` to manage dependencies, and assumes Python 3.5
+(which pipenv may install if you are running a different local version). You
+can can install `pipenv` with `pip`. You may want to set the
+`PIPENV_VENV_IN_PROJECT` environment variable on your development machine (see
+pipenv docs for details).
+To just run the web interface (which will try to connect to a back-end API
+server on the same machine by default), use:
+
+ # will listen on http://localhost:9810 by default
pipenv run fatcat_webface.py
-Run tests:
+## Python Client Library
+
+An auto-generated python client library for the fatcat API lives under
+`./fatcat_client`. It includes entity model objects and functions to call all
+API endpoints; see `./README_codegen.md` for details.
+
+To re-generate swagger-codegen python client library (requires docker installed
+locally):
+
+ ./codegen_python_client.sh
+
+## Running Tests
+
+Many (though not all) python tests depend on access to a local running API
+server (the `fatcatd` rust daemon, code in `../rust/`), which itself depends on
+a local PostgreSQL database server. Tests will fail if this endpoint isn't
+found. See the README there to get that set up first. The CI integration tests
+build and start this daemon automatically.
+
+To run the python tests (with `fatcatd` running locally on port 9411):
pipenv install --dev
pipenv run pytest
- # for coverage:
+To calculate code coverage (of python code):
+
pipenv run pytest --cov --cov-report html
-Regeneate swagger-codegen python client library (requires docker):
+To run 'lint' on the code base (note that this is pretty noisy and isn't
+enforced by CI yet):
- ./codegen_python_client.sh
+ pipenv run pylint --disable bad-continuation,arguments-differ,unidiomatic-typecheck fatcat