Skip to content

Commit cbe2185

Browse files
committed
Simplify and reorder development instructions in README
1 parent c2ee13d commit cbe2185

File tree

1 file changed

+13
-21
lines changed

1 file changed

+13
-21
lines changed

README.md

+13-21
Original file line numberDiff line numberDiff line change
@@ -418,28 +418,17 @@ assert cur.description[0][1] == "timestamp with time zone"
418418

419419
Start by forking the repository and then modify the code in your fork.
420420

421-
Clone the repository and go inside the code directory. Then you can get the
422-
version with `./setup.py --version`.
423-
424421
We recommend that you use Python3's `venv` for development:
425422

426423
```
427424
$ python3 -m venv .venv
428425
$ . .venv/bin/activate
429-
$ pip install .
430-
```
431-
432-
For development purpose, pip can reference the code you are modifying in a
433-
*virtual env*:
434-
435-
```
436-
$ pip install -e .
437-
# To additionally install all dependencies for development run below command
438426
$ pip install -e '.[tests]'
439427
```
440428

441-
That way, you do not need to run `pip install` again to make your changes
442-
applied to the *virtual env*.
429+
With `-e` passed to `pip install` above pip can reference the code you are
430+
modifying in the *virtual env*. That way, you do not need to run `pip install`
431+
again to make your changes applied to the *virtual env*.
443432

444433
When the code is ready, submit a Pull Request.
445434

@@ -449,6 +438,9 @@ When the code is ready, submit a Pull Request.
449438
- Prefer code that is readable over one that is "clever".
450439
- When writing a Git commit message, follow these [guidelines](https://chris.beams.io/posts/git-commit/).
451440

441+
See also Trino's [guidelines](https://github.com/trinodb/trino/blob/master/.github/DEVELOPMENT.md).
442+
Most of them also apply to code in trino-python-client.
443+
452444
### Running tests
453445

454446
`trino-python-client` uses [pytest](https://pytest.org/) for its tests. To run
@@ -460,13 +452,6 @@ $ pytest tests/unit
460452

461453
Then you can pass options like `--pdb` or anything supported by `pytest --help`.
462454

463-
To run the tests with different versions of Python in managed *virtual envs*,
464-
use `tox` (see the configuration in `tox.ini`):
465-
466-
```
467-
$ tox
468-
```
469-
470455
To run integration tests:
471456

472457
```
@@ -477,6 +462,13 @@ They pull a Docker image and then run a container with a Trino server:
477462
- the image is named `trinodb/trino:${TRINO_VERSION}`
478463
- the container is named `trino-python-client-tests-{uuid4()[:7]}`
479464

465+
To run the tests with different versions of Python in managed *virtual envs*,
466+
use `tox` (see the configuration in `tox.ini`):
467+
468+
```
469+
$ tox
470+
```
471+
480472
## Releasing
481473

482474
- [Set up your development environment](#Getting-Started-With-Development).

0 commit comments

Comments
 (0)