Skip to content

Commit

Permalink
docs(en):Improve the document and correct any errors in it
Browse files Browse the repository at this point in the history
  • Loading branch information
menshibin committed Feb 5, 2025
1 parent d191683 commit 278f730
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ English | [简体中文](README-CN.md)
- [Table of Contents](#table-of-contents)
- [1. Introduction](#1-introduction)
- [2. Documentation](#2-documentation)
- [4. Prerequisites](#4-prerequisites)
- [5. Build](#5-build)
- [6. Testing](#6-testing)
- [6.1 Test Execution](#61-test-execution)
- [6.2 Test Case Addition](#62-test-case-addition)
- [6.3 Performance Testing](#63-performance-testing)
- [3. Prerequisites](#3-prerequisites)
- [4. Build](#4-build)
- [5. Testing](#5-testing)
- [5.1 Test Execution](#51-test-execution)
- [5.2 Test Case Addition](#52-test-case-addition)
- [5.3 Performance Testing](#53-performance-testing)
- [6. CI/CD](#6-cicd)
- [7. Submitting Issues](#7-submitting-issues)
- [8. Submitting PRs](#8-submitting-prs)
- [9. References](#9-references)
Expand All @@ -38,23 +39,24 @@ English | [简体中文](README-CN.md)

## 2. Documentation

- For development examples, see [Developer Guide](https://docs.tdengine.com/developer-guide/), which includes examples of data writing, querying, schemaless writing, parameter binding, and data subscription.
- For other reference information, see [Reference Manual](https://docs.tdengine.com/tdengine-reference/client-libraries/node/), which includes version history, data types, example programs, API descriptions, and FAQs.
- To use Node.js connector, please check [Developer Guide](https://docs.tdengine.com/developer-guide/), which includes how an application can introduce the `@tdengine/websocket`, as well as examples of data writing, querying, schemaless writing, parameter binding, and data subscription.
- For other reference information, please check [Reference Manual](https://docs.tdengine.com/tdengine-reference/client-libraries/node/), which includes version history, data types, example programs, API descriptions, and FAQs.
- This quick guide is mainly for developers who like to contribute/build/test the Node.js connector by themselves. To learn about TDengine, you can visit the [official documentation](https://docs.tdengine.com).

## 4. Prerequisites
## 3. Prerequisites

- Install the Node.js development environment, using version 14 or above. Download link: [https://nodejs.org/en/download/](https://nodejs.org/en/download/)
- Install the Node.js connector using npm.
- Install TypeScript 5.3.3 and above using npm.
- TDengine has been deployed locally. For specific steps, please refer to Deploy TDengine, and `taosd` and `taosAdapter` have been started.
- TDengine has been deployed locally. For specific steps, please refer to [Deploy TDengine](https://docs.tdengine.com/get-started/deploy-from-package/), and `taosd` and `taosAdapter` have been started.

## 5. Build
## 4. Build

Execute `tsc` to build the project in the 'nodejs' directory.

## 6. Testing
## 5. Testing

### 6.1 Test Execution
### 5.1 Test Execution

Execute `npm run test` in the project directory to run the tests. The test cases will connect to the local TDengine server and taosAdapter for testing.
After running the tests, the result similar to the following will be printed eventually. If all test cases pass, without any failures or errors.
Expand All @@ -67,15 +69,20 @@ Time: 20.373 s
Ran all test suites.
```

### 6.2 Test Case Addition
### 5.2 Test Case Addition

All tests are located in the `nodejs/test/bulkPulling` directory of the project. You can add new test files or add test cases in existing test files.
The test cases use the jest framework. Generally, a connection is established and a database is created in the `beforeAll` method, and the database is droped and the connection is released in the `afterAll` method.

### 6.3 Performance Testing
### 5.3 Performance Testing

Performance testing is in progress.

## 6. CI/CD

- [Build Workflow](https://github.com/taosdata/taos-connector-node/actions/workflows/build.yaml)
- [Code Coverage](https://app.codecov.io/gh/taosdata/taos-connector-node)

## 7. Submitting Issues

We welcome the submission of [GitHub Issue](https://github.com/taosdata/taos-connector-node/issues/new?template=Blank+issue). When submitting, please provide the following information:
Expand All @@ -95,6 +102,7 @@ We welcome developers to contribute to this project. When submitting PRs, please
1. Modify the code, ensure all unit tests pass, and add new unit tests to verify the changes.
1. Push the changes to the remote branch (`git push origin my_branch`).
1. Create a Pull Request on GitHub ([how to create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request)).
1. After submitting the PR, you can find your PR through the [Pull Request](https://github.com/taosdata/taos-connector-node/pulls). Click on the corresponding link to see if the CI for your PR has passed. If it has passed, it will display "All checks have passed". Regardless of whether the CI passes or not, you can click "Show all checks" -> "Details" to view the detailed test case logs.
1. After submitting the PR, if CI passes, you can find your PR on the [codecov](https://app.codecov.io/gh/taosdata/taos-connector-node/pulls) page to check the test coverage.

## 9. References
Expand Down

0 comments on commit 278f730

Please sign in to comment.