Skip to content

Commit 7613662

Browse files
authored
Merge pull request #4 from judehung/update-readme
fix: Update README.md with clear steps to run SDK unit tests
2 parents 4a66dc3 + d343c19 commit 7613662

File tree

1 file changed

+13
-25
lines changed

1 file changed

+13
-25
lines changed

README.md

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -55,35 +55,23 @@ The SDK also provides the following built-in functions to process/transform/expo
5555

5656
## Run Tests
5757

58-
To run the unit-tests against SDK, you can use the following command:
58+
To run the unit-tests against SDK, you will have to follow steps as described below:
5959

60-
```shell
61-
make test-sdk
62-
```
60+
1. Create a virtual environment in the root of the repository in your local environment:
61+
- `python3 -m venv venv`
6362

64-
You can also run the tests against the app-service-template by using the following command:
63+
2. Switch to the virtual environment:
64+
- `source ./venv/bin/activate`
6565

66-
```shell
67-
make test-template
68-
```
66+
3. Install the dependencies for the App Functions Python SDK in the virtual environment:
67+
- `pip install -r requirements.txt`
6968

70-
To have lint to analyse the SDK, you can use the following command:
69+
4. Install the App Functions Python SDK in the virtual environment:
70+
- `make install-sdk`
7171

72-
```shell
73-
make lint
74-
```
72+
5. Run the tests against the SDK by using the following command:
73+
- `make test-sdk`
7574

76-
To run tests, and lint analysis altogether, you can use the following command:
75+
## Try the sample application service
7776

78-
```shell
79-
make test
80-
```
81-
82-
## Build Docker images
83-
84-
To build the Docker image for the app-service-template, you can use the following command:
85-
86-
```shell
87-
make docker
88-
```
89-
By a successful build, a docker image **$(USER)/app-service-template:latest** will be created in your local environment.
77+
To further understand the usage of this Python SDK, you can try the sample application service provided in the [app-service-template](./app-service-template) folder. This sample application service is configured with default Message Bus trigger to subscribe for any event messages published to EdgeX message bus, and process these event messages with the default pipeline containing two functions: `filter_by_device_name` and `mqtt_send`, so the app service will only process event messages coming from **Random-Integer-Device**, and then republish such event messages to an external MQTT broker **test.mosquitto.org** via **test_topic** topic.

0 commit comments

Comments
 (0)