mirror of https://github.com/apache/superset.git
docs: improve docs on running tests locally (#14102)
* Fix missing items in ToC
Thanks to whatever autoformatting tool was running (:
Signed-off-by: Étienne Boisseau-Sierra <etienne.boisseau-sierra@unipart.io>
* Fix minimal Python version required
Currently Python 3.7 is still supported by Superset — cf.
4b23d0ecca/setup.py (L160)
I assue it is thus safe to run the test with Py3.7.
Signed-off-by: Étienne Boisseau-Sierra <etienne.boisseau-sierra@unipart.io>
* List MySQL/MariaDB as OS dependecy for test
As raised in issue #14052, MySQL (or MariaDB) is required for being able
to install the Python requirements.
(I assume due to `mysqlclient` dependency — cf.
https://github.com/apache/superset/blob/master/requirements/development.txt#L23)
Signed-off-by: Étienne Boisseau-Sierra <etienne.boisseau-sierra@unipart.io>
* Fix which dependencies are installed for tests
To install `tox` (for running the test suite), we want to install the…
testing dependencies, rather than “simply” the local ones.
Note that the `requirements/testing` is a superset of the
`requirements/local`:
https://github.com/apache/superset/blob/master/requirements/testing.txt
vs https://github.com/apache/superset/blob/master/requirements/local.txt
Linked to issue #14052
Signed-off-by: Étienne Boisseau-Sierra <etienne.boisseau-sierra@unipart.io>
* Emphasize how to name demo admin user
Related to #14052
Signed-off-by: Étienne Boisseau-Sierra <etienne.boisseau-sierra@unipart.io>
* Fix max Python version required
Indeed, Python 3.9 isn't yet supported (cf. e.g., issue #14159).
Signed-off-by: Étienne Boisseau-Sierra <etienne.boisseau-sierra@unipart.io>
This commit is contained in:
parent
a3a34773ae
commit
baf42bc2c5
|
@ -77,6 +77,8 @@ little bit helps, and credit will always be given.
|
|||
- [Python Testing](#python-testing)
|
||||
- [Frontend Testing](#frontend-testing)
|
||||
- [Integration Testing](#integration-testing)
|
||||
- [Debugging Server App](#debugging-server-app)
|
||||
- [Debugging Server App in Kubernetes Environment](#debugging-server-app-in-kubernetes-environment)
|
||||
- [Storybook](#storybook)
|
||||
- [Translating](#translating)
|
||||
- [Enabling language selection](#enabling-language-selection)
|
||||
|
@ -418,9 +420,10 @@ For example, the image referenced above actually lives in `superset-frontend/ima
|
|||
|
||||
#### OS Dependencies
|
||||
|
||||
Make sure your machine meets the [OS dependencies](https://superset.apache.org/docs/installation/installing-superset-from-scratch#os-dependencies) before following these steps.
|
||||
Make sure your machine meets the [OS dependencies](https://superset.apache.org/docs/installation/installing-superset-from-scratch#os-dependencies) before following these steps.
|
||||
You also need to install MySQL or [MariaDB](https://mariadb.com/downloads).
|
||||
|
||||
Ensure Python versions >3.7, Then proceed with:
|
||||
Ensure that you are using Python version 3.7 or 3.8, then proceed with:
|
||||
|
||||
````bash
|
||||
# Create a virtual environment and activate it (recommended)
|
||||
|
@ -428,12 +431,12 @@ python3 -m venv venv # setup a python3 virtualenv
|
|||
source venv/bin/activate
|
||||
|
||||
# Install external dependencies
|
||||
pip install -r requirements/local.txt
|
||||
pip install -r requirements/testing.txt
|
||||
|
||||
# Install Superset in editable (development) mode
|
||||
pip install -e .
|
||||
|
||||
# Create an admin user in your metadata database
|
||||
# Create an admin user in your metadata database (use `admin` as username to be able to load the examples)
|
||||
superset fab create-admin
|
||||
|
||||
# Initialize the database
|
||||
|
@ -442,11 +445,12 @@ superset db upgrade
|
|||
# Create default roles and permissions
|
||||
superset init
|
||||
|
||||
# Load some data to play with (you must create an Admin user with the username `admin` for this command to work)
|
||||
# Load some data to play with.
|
||||
# Note: you MUST have previously created an admin user with the username `admin` for this command to work.
|
||||
superset load-examples
|
||||
|
||||
# Start the Flask dev web server from inside your virtualenv.
|
||||
# Note that your page may not have css at this point.
|
||||
# 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
|
||||
|
||||
|
|
Loading…
Reference in New Issue