@@ -418,28 +418,17 @@ assert cur.description[0][1] == "timestamp with time zone"
418
418
419
419
Start by forking the repository and then modify the code in your fork.
420
420
421
- Clone the repository and go inside the code directory. Then you can get the
422
- version with `./ setup.py -- version` .
423
-
424
421
We recommend that you use Python3' s `venv` for development:
425
422
426
423
```
427
424
$ python3 - m venv .venv
428
425
$ . .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
438
426
$ pip install - e ' .[tests]'
439
427
```
440
428
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* .
443
432
444
433
When the code is ready, submit a Pull Request.
445
434
@@ -449,6 +438,9 @@ When the code is ready, submit a Pull Request.
449
438
- Prefer code that is readable over one that is " clever" .
450
439
- When writing a Git commit message, follow these [guidelines](https:// chris.beams.io/ posts/ git- commit/ ).
451
440
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
+
452
444
# ## Running tests
453
445
454
446
`trino- python- client` uses [pytest](https:// pytest.org/ ) for its tests. To run
@@ -460,13 +452,6 @@ $ pytest tests/unit
460
452
461
453
Then you can pass options like `-- pdb` or anything supported by `pytest -- help ` .
462
454
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
-
470
455
To run integration tests:
471
456
472
457
```
@@ -477,6 +462,13 @@ They pull a Docker image and then run a container with a Trino server:
477
462
- the image is named `trinodb/ trino:$ {TRINO_VERSION }`
478
463
- the container is named `trino- python- client- tests- {uuid4()[:7 ]}`
479
464
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
+
480
472
# # Releasing
481
473
482
474
- [Set up your development environment](# Getting-Started-With-Development).
0 commit comments