You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44-3Lines changed: 44 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ or an installation with only the core part of the SDK
18
18
pip install aperturedb
19
19
```
20
20
21
-
A complete [reference](https://docs.aperturedata.io/category/aperturedb-python-sdk) of this SDK is available on the offical[ApertureDB Documentation](https://docs.aperturedata.io)
21
+
A complete [reference](https://docs.aperturedata.io/category/aperturedb-python-sdk) of this SDK is available on the official[ApertureDB Documentation](https://docs.aperturedata.io)
22
22
23
23
24
24
# Development setup
@@ -31,7 +31,34 @@ pip install -e .[dev]
31
31
32
32
33
33
# Running tests
34
-
The tests are inside the `test` dir.
34
+
The tests are inside the `test` dir. Currently these get run in Linux container. Refer to `docker/tests` and `test/run_test_container` for details. Following explanation assumes that the current working directory is `test`.
35
+
36
+
The tests bring up a set of components in an isolated network, namely:
37
+
- aperturedb-community
38
+
- lenz
39
+
- nginx
40
+
- ca (for initial provisioning of certificates)
41
+
- webui
42
+
43
+
44
+
To connect to this setup, the ports are exposed to the host as follows:
45
+
- 55556 for TCP connection to aperturedb (via lenz).
46
+
- 8087 for HTTP connection to aperturedb (via nginx).
47
+
48
+
49
+
50
+
This can be done manually as:
51
+
```bash
52
+
docker compose up -d
53
+
```
54
+
55
+
## Changes to run the tests in development environment.
56
+
Edit the file `test/dbinfo.py` to loook like the following.
57
+
- DB_TCP_HOST = `localhost`
58
+
- DB_REST_HOST = `localhost`
59
+
- DB_TCP_PORT = `55556`
60
+
- DB_REST_PORT = `8087`
61
+
35
62
36
63
All the tests can be run with:
37
64
@@ -43,9 +70,23 @@ bash run_test.sh
43
70
Running specific tests can be accomplished by invoking it with pytest as follows:
44
71
45
72
```bash
46
-
cdtest&& docker compose up -d &&PROJECT=aperturedata KAGGLE_username=ci KAGGLE_key=dummy coverage run -m pytest test_Session.py -v --log-cli-level=DEBUG
**NOTE:The running environment is assumed to be Linux x86_64. There might be certain changes required for them to be run on MacOS or Windows python environments.**
77
+
78
+
## Certain Environment variables that affect the runtime beaviour of the SDK.
79
+
80
+
These can be used as debugging aids.
81
+
82
+
| Variable | type | Comments | Default value |
83
+
| --- | --- | --- | --- |
84
+
|ADB_DEBUGGABLE | boolean | allows the application to register a fault handler that dumps a trace when SIGUSR1 is sent to the process | not set |
85
+
|LOG_FILE_LEVEL | <ahref="https://docs.python.org/3/library/logging.html#logging-levels">log levels</a> | The threshold for emitting log messages into the error<timestamp>.log file | WARN |
86
+
|LOG_CONSOLE_LEVEL | <ahref="https://docs.python.org/3/library/logging.html#logging-levels">log levels</a> | The threshold for emitting log messages into stdout | ERROR |
87
+
|ADB_LOG_FILE | string | custom file path for the LOG file | not set|
88
+
89
+
49
90
# Reporting bugs
50
91
Any error in the functionality / documentation / tests maybe reported by creating a
0 commit comments