Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
sgolebiewski-intel committed Oct 8, 2024
1 parent 6c2957d commit 827ff5e
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 41 deletions.
2 changes: 1 addition & 1 deletion src/bindings/js/docs/CODESTYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Node.js bindings contain two parts: C++ and Typescript/JavaScript.

This article presents the coding standards for JavaScript and TypeScript parts of **openvino-node** package. The following rules will help maintain code quality and consistency throughout the codebase.

For C++ codestyle rules, please, refer to [this document](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/coding_style.md).
For C++ codestyle rules, refer to [this document](https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/coding_style.md).

Make sure your IDE has ESLint plugin installed. Its rules are specified in the [.eslint-global.js file](../.eslintrc-global.js). Keep in mind that your PR will not be approved if it does not meet the following requirements.

Expand Down
2 changes: 1 addition & 1 deletion src/bindings/js/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@

## Contributing

We welcome contributions! Please read our [Contributing Guide](https://github.com/openvinotoolkit/openvino/blob/master/src/bindings/js/node/CONTRIBUTING.md) to learn how you can get involved.
Your contributions are welcome! Make sure to read the [Contribution Guide](https://github.com/openvinotoolkit/openvino/blob/master/src/bindings/js/node/CONTRIBUTING.md) to learn how you can get involved.

## See Also

Expand Down
60 changes: 29 additions & 31 deletions src/bindings/js/node/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,61 @@
# Contributing to OpenVINO™ Node.js API

If you look at this guide, we already appreciate you. We try to support you
on the way to contributing to this project.
Your commitment to this project is greatly appreciated and the following guide is intended to help you contribute.

First of all, read [main contribution guide](https://github.com/openvinotoolkit/openvino/blob/master/CONTRIBUTING.md). It covers most topics related to contributing to OpenVINO.
Make sure to read [main contribution guide](https://github.com/openvinotoolkit/openvino/blob/master/CONTRIBUTING.md) first. It covers most topics related to contributing to OpenVINO.


## TLDR

- Decide what you want to change
- Create your fork of the openvino repository
- Implement changes, align code style, run tests
- Keep changes in the branch with a clear name
- Create a Pull Request, clearly describe what has been changed and why
- Go through Code Review
- Be merged, you are awesome!
1. Decide what you want to change.
2. Create your fork of the OpenVINO repository.
3. Create a branch with a meaningful name for your changes.
4. Align the code style, commit the changes, and run tests.
5. Create a Pull Request, which clearly describes what has been changed and why.
6. Go through the Code Review.
7. Get your awesome code merged!

Detailed explanation below:
Read the section below for more details.


## How to decide what to change
## How to Decide What to Change

It can be minor fixes, like changing variable names, additional parameter checks, etc. In this case, go ahead to the next step.
In case of minor fixes, like changing variable names, additional parameter checks, etc., go to the next step.

If you want to bring significant changes, for example, the extension of architecture or a big part of functionality, that touches a lot
of source code, please, open [an issue](https://github.com/openvinotoolkit/openvino/issues/new?assignees=octocat&labels=enhancement%2Cfeature&projects=&template=feature_request.yml&title=%5BFeature+Request%5D%3A+) first and discuss your idea with
codeowners. It prevents you from doing extra work.
However, if you want to bring significant changes, for example, the extension of architecture or a big part of functionality, that involves a large amount
of source code, open [an issue](https://github.com/openvinotoolkit/openvino/issues/new?assignees=octocat&labels=enhancement%2Cfeature&projects=&template=feature_request.yml&title=%5BFeature+Request%5D%3A+) first and discuss your idea with
codeowners. It will prevent you from doing extra work.

Or take one of the well-described tasks from the [Good First Issue](https://github.com/orgs/openvinotoolkit/projects/3/views/14) section. It can be a great start to contribution with codeowners support!
You can also take one of the well-described tasks from the [Good First Issue](https://github.com/orgs/openvinotoolkit/projects/3/views/14) section. It can be a great start to contributing with codeowners' support!


## Let's code

Be familiar with Node.js API architecture and code samples.
This [well-written guide](../docs/code_examples.md) helps to understand the component structure and code style that we follow.
Get familiar with Node.js API architecture and code samples.
Refer to the [guide](../docs/code_examples.md), which will help you understand the component structure and the code style.

The environment setup and building instructions can be found in [Building the Node.js API](https://github.com/openvinotoolkit/openvino/blob/master/src/bindings/js/docs/README.md#openvino-node-package-developer-documentation).
The environment setup and build instructions can be found in [Building the Node.js API](https://github.com/openvinotoolkit/openvino/blob/master/src/bindings/js/docs/README.md#openvino-node-package-developer-documentation).

Run tests! If you added some new functionality, please, make sure that it is covered by tests.
[This guide](../docs/test_examples.md) helps be familiar with our tests and their run.
Run tests! If you add a new functionality, make sure that it is covered by tests first.
Read [the guide](../docs/test_examples.md) for more details about the tests and their runs.
Many CI checks will run after getting a Code Review. Make sure that
all checks are green. CI checks are composed of both functional tests and code-style checks and may fail because of warnings/errors in both stages.
all checks have passed. CI checks are composed of both functional tests and code-style checks and may fail because of warnings/errors in both stages.

Make sure that you follow [our codestyle](../docs/CODESTYLE.md).
Remember to follow [our codestyle](../docs/CODESTYLE.md).
By following the provided guide and using an automotive code style checking tool, like
**eslint** and **clang-format-9** save you and the reviewers time to perform a code review of
proposed changes.
**eslint** and **clang-format-9**, you will save some time and help with the code review of proposed changes.


## Description of the Pull Request

Please append all PR titles with the tag `[OV JS]`. Feel free to describe any level of relevant details in the PR, it helps a lot with the review process. The minimum requirement is a compact description of changes made, the form of a bullet-point list is appreciated.
Append all PR titles with the `[OV JS]` tag. Provide any relevant details in the description, as it will definitely help with the review. The minimum requirement is a compact, bulleted list of proposed changes.

Template for contributors:
Use the following template:
```
*What was the purpose of this PR*
*Describe what is the purpose of this PR*
### Details:
- *what you've done*
- *Describe your changes.*
- ...
```
Expand All @@ -66,4 +64,4 @@ Template for contributors:
## License

By contributing to the OpenVINO project, you agree that your contributions will be
licensed under the terms stated in the [LICENSE](https://github.com/openvinotoolkit/openvino/blob/master/LICENSE) file.
licensed under the terms of the [LICENSE](https://github.com/openvinotoolkit/openvino/blob/master/LICENSE).
16 changes: 8 additions & 8 deletions src/bindings/js/node/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# OpenVINO™ Node.js Bindings

Execute deep learning models in Node.js applications with ease using OpenVINO™.
Use OpenVINO to deploy deep learning models easily in Node.js applications.

## Introduction

OpenVINO™ is an open-source toolkit designed for high-performance deep learning inference.
Node.js API provides bindings to subset APIs from OpenVINO Runtime.
These Node.js bindings allow JavaScript developers to use the power of OpenVINO in their applications.
The Node.js bindings enable JavaScript developers to use the capabilities of OpenVINO in their applications.

## Quick Start

Expand All @@ -20,9 +20,9 @@ Use the **openvino-node** package:
const { addon: ov } = require('openvino-node');
```

Full `addon` API you can find at documentation [page](https://docs.openvino.ai/2024/api/nodejs_api/addon.html).
Refer to the complete description of the `addon` API in the [documentation](https://docs.openvino.ai/2024/api/nodejs_api/addon.html).

See more samples in [samples section](https://github.com/openvinotoolkit/openvino/blob/master/samples/js/node/README.md).
See the [samples](https://github.com/openvinotoolkit/openvino/blob/master/samples/js/node/README.md) for more details on how to use it.

## Usage in Electron applications

Expand All @@ -33,8 +33,8 @@ To use the package in development of Electron applications on Windows, make sure
## Supported Platforms

- Windows x86
- Linux x86/arm
- MacOS x86/arm
- Linux x86/ARM
- MacOS x86/ARM

## Documentation & Samples

Expand All @@ -43,7 +43,7 @@ To use the package in development of Electron applications on Windows, make sure

## Live Sample

You can run this sample in the browser, no installation is required.
You can run the following sample in the browser, no installation is required.
[Codesandbox](https://codesandbox.io/) is a free online service with limited resources. For optimal performance and more control, it is recommended to run the sample locally.

- [hello-classification-sample](https://codesandbox.io/p/devbox/openvino-node-hello-classification-sample-djl893)
Expand All @@ -54,7 +54,7 @@ For more details, refer to the [OpenVINO™ JavaScript API Developer Documentati

## Contributing

We welcome contributions! Please read our [Contributing Guide](https://github.com/openvinotoolkit/openvino/blob/master/src/bindings/js/node/CONTRIBUTING.md) to learn how you can get involved.
Contributions are always welcome! Read the [Contribution Guide](https://github.com/openvinotoolkit/openvino/blob/master/src/bindings/js/node/CONTRIBUTING.md) to learn how you can get involved.

## See Also

Expand Down

0 comments on commit 827ff5e

Please sign in to comment.