@@ -29,6 +29,7 @@ from sources::
29
29
30
30
$ virtualenv pymongoarrow
31
31
$ source ./pymongoarrow/bin/activate
32
+ $ pip install tox
32
33
33
34
libbson
34
35
^^^^^^^
@@ -41,7 +42,7 @@ Detailed instructions for building/installing ``libbson`` can be found
41
42
You can either use a system-provided version of ``libbson `` that is properly
42
43
configured for use with ``pkg-config ``, or use the provided ``build-libbson.sh `` script to build it::
43
44
44
- $ LIBBSON_INSTALL_DIR=$(pwd)/libbson ./ build-libbson.sh
45
+ $ LIBBSON_INSTALL_DIR=$(pwd)/libbson tox -e build-libbson
45
46
46
47
On macOS, users can install the latest ``libbson `` using Homebrew::
47
48
@@ -57,22 +58,29 @@ If you try to build with a lower version a ``ValueError`` will be raised.
57
58
Build
58
59
-----
59
60
60
- In the previously created virtualenv, install PyMongoArrow and its test dependencies in editable mode::
61
+ Typically we will use the provided ``tox `` scripts and will not build directly, but you can build and
62
+ test in the created virtualenv.
63
+
64
+ In the previously created virtualenv, to install PyMongoArrow and its test dependencies in editable mode::
61
65
62
66
(pymongoarrow) $ pip install -v -e ".[test]"
63
67
64
68
If you built libbson using the ``build-libbson `` script then use the same ``LIBBSON_INSTALL_DIR `` as above:
65
69
66
70
(pymongoarrow) $ LIBBSON_INSTALL_DIR=$(pwd)/libbson pip install -v -e ".[test]"
67
71
68
-
69
72
Test
70
73
----
71
74
72
75
To run the test suite, you will need a MongoDB instance running on
73
76
``localhost `` using port ``27017 ``. To run the entire test suite, do::
74
77
75
- (pymongoarrow) $ python -m pytest
78
+ (pymongoarrow) $ tox -e test
79
+
80
+ or, if not using ``tox ``:
81
+
82
+ (pymongoarrow) $ pytest
83
+
76
84
77
85
Running Linters
78
86
---------------
@@ -84,9 +92,9 @@ that help follow a consistent code style within the codebase.
84
92
85
93
To set up ``pre-commit `` locally, run::
86
94
87
- pip install pre-commit
88
- pre-commit install
95
+ (pymongoarrow) $ pip install pre-commit
96
+ (pymongoarrow) $ pre-commi t install
89
97
90
98
To run ``pre-commit `` manually, run::
91
99
92
- pre-commit run --all-files
100
+ (pymongoarrow) $ tox -e lint
0 commit comments