diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index baae7aa6f..dba6f6ff4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,22 +4,46 @@ ### Configuring python environment -The project requires python version 3.8+. To set it as default in the environment run the following commands: +The project requires Python version 3.7+. To set it as default in the environment run the following commands: -```bash -python3.8 -m venv env +```sh +python -m venv env source ./env/bin/activate ``` Install required dependencies: -```bash +```sh python -m pip install --upgrade pip wheel pip install -r local-requirements.txt -pip install -e . +``` + +Build and install drivers: + +```sh +pip install -e. python setup.py bdist_wheel ``` +Run tests: + +```sh +pytest +``` + +Checking for typing errors + +```sh +mypy playwright +``` + +Format the code + +```sh +pre-commit install +pre-commit run --all-files +``` + For more details look at the [CI configuration](./blob/master/.github/workflows/ci.yml). ### Regenerating APIs @@ -31,7 +55,7 @@ pre-commit run --all-files ## Contributor License Agreement -This project welcomes contributions and suggestions. Most contributions require you to agree to a +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. diff --git a/docs/development.md b/docs/development.md deleted file mode 100644 index b2c9f3c4d..000000000 --- a/docs/development.md +++ /dev/null @@ -1,46 +0,0 @@ -# Development - -## Build driver: - -```sh -pip install -e . -python setup.py bdist_wheel -``` - -## Run tests: - -```sh -pytest -``` - -## Run tests with coverage: - -```sh -pytest --cov=playwright --cov-report html -open htmlcov/index.html -``` - -## Deploy: - -```sh -python setup.py bdist_wheel -python setup.py upload -``` - -## Checking for typing errors - -```sh -mypy playwright -``` - -## Format the code - -```sh -black . -``` - -## Installing the Git hooks (auto format etc. on commit) - -```sh -pre-commit install -```