From ad87ba372496857f78ff27e5b6c959a1b00b6a97 Mon Sep 17 00:00:00 2001 From: John Bodley <4567245+john-bodley@users.noreply.github.com> Date: Tue, 13 Jul 2021 12:26:29 -0700 Subject: [PATCH] docs: Add section about updating Python requirements (#15574) --- CONTRIBUTING.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 619fec385..ff9475858 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -453,6 +453,7 @@ superset load-examples # Note that your page may not have CSS at this point. # See instructions below how to build the front-end assets. FLASK_ENV=development superset run -p 8088 --with-threads --reload --debugger +``` Or you can install via our Makefile @@ -477,6 +478,17 @@ via `.flaskenv`, however if needed, it should be set to `superset.app:create_app If you have made changes to the FAB-managed templates, which are not built the same way as the newer, React-powered front-end assets, you need to start the app without the `--with-threads` argument like so: `FLASK_ENV=development superset run -p 8088 --reload --debugger` +#### Dependencies + +If you add a new requirement or update an existing requirement (per the `install_requires` section in `setup.py`) you must recompile (freeze) the Python dependencies to ensure that for CI, testing, etc. the build is deterministic. This can be achieved via, + +```bash +$ python3 -m venv venv +$ source venv/bin/activate +$ python3 -m pip install -r requirements/integration.txt +$ pip-compile-multi --no-upgrade +``` + #### Logging to the browser console This feature is only available on Python 3. When debugging your application, you can have the server logs sent directly to the browser console using the [ConsoleLog](https://github.com/betodealmeida/consolelog) package. You need to mutate the app, by adding the following to your `config.py` or `superset_config.py`: