From 9b824a891b873607aa9704dfa4cee08f0eec2a13 Mon Sep 17 00:00:00 2001 From: Vladisalv Sovrasov Date: Thu, 10 Apr 2025 21:50:01 +0900 Subject: [PATCH 1/4] Add a contribution guide --- CONTRIBUTING.md | 107 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..85f42d4f --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,107 @@ +# Contributing to Model API + +We welcome your input! 👐 + +We want to make it as simple and straightforward as possible to contribute to this project, whether it is a: + +- Bug Report +- Discussion +- Feature Request +- Creating a Pull Request (PR) +- Becoming a maintainer + +## Bug Report + +We use GitHub issues to track the bugs. Report a bug by using [Issues](https://github.com/open-edge-platform/model_api/issues/new) page. + +## Feature Request + +We utilize GitHub issues to track the feature requests as well. If you are certain regarding the feature you are interested and have a solid proposal, you could then create the feature request by [Issues](https://github.com/open-edge-platform/model_api/issues/new) page. + +## Development & PRs + +We actively welcome your pull requests: + +### Getting Started + +#### 1. Fork and Clone the Repository + +First, fork the Model API repository by following the GitHub documentation on [forking a repo](https://docs.github.com/en/enterprise-cloud@latest/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo). Then, clone your forked repository to your local machine and create a new branch from `master`. + +#### 2. Set Up Your Development Environment + +Set up your development environment to start contributing. This involves installing the required dependencies and setting up pre-commit hooks for code quality checks. Note that this guide assumes you are using [Venv](https://docs.python.org/3/library/venv.html) for python environments management. However, the steps are similar for other env managers. + +
+Development Environment Setup Instructions + +1. Create and activate a new python environment: + + ```bash + python -m venv .mapi + source .mapi/bin/activate + ``` + +2. Install the development requirements: + + ```bash + pip install -e ./src/python[full] + ``` + +3. [Build](https://github.com/open-edge-platform/model_api?tab=readme-ov-file#c) C++ binaries + +Make sure to address any pre-commit issues before finalizing your pull request. +Pre-commit checks can be launched by the command: + +```bash +pre-commit run --all-files +``` + +
+ +### Making Changes + +1. **Write Code:** Follow the project's coding standards and write your code with clear intent. Ensure your code is well-documented and includes examples where appropriate. For code quality we use ruff, whose configuration is in [`pyproject.toml`](pyproject.toml) file. + +2. **Add Tests:** If your code includes new functionality, add corresponding tests using [pytest](https://docs.pytest.org/en/7.4.x/) to maintain coverage and reliability. + +3. **Update Documentation:** If you've changed APIs or added new features, update the documentation accordingly. Ensure your docstrings are clear and follow [Google's docstring guide](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings). + +4. **Pass Tests and Quality Checks:** Ensure the test suite passes and that your code meets quality standards by running: + + ```bash + pre-commit run --all-files + python tests/cpp/precommit/prepare_data.py -d data -p tests/cpp/precommit/public_scope.json + python tests/python/accuracy/prepare_data.py -d data + pytest tests/python/ + + build/test_sanity -d data -p tests/cpp/precommit/public_scope.json && build/test_model_config -d data + build/test_accuracy -d data -p tests/python/accuracy/public_scope.json + ``` + +5. **Update the Changelog:** For significant changes, add a summary to the [CHANGELOG](CHANGELOG.md). + +6. **Check Licensing:** Ensure you own the code or have rights to use it, adhering to appropriate licensing. + +7. **Sign Your Commits:** Use signed commits to certify that you have the right to submit the code under the project's license: + + ```bash + git commit -S -m "Your detailed commit message" + ``` + + For more on signing commits, see [GitHub's guide on signing commits](https://docs.github.com/en/github/authenticating-to-github/managing-commit-signature-verification/signing-commits). + +### Submitting Pull Requests + +Once you've followed the above steps and are satisfied with your changes: + +1. Push your changes to your forked repository. +2. Go to the original Model API repository you forked and click "New pull request". +3. Choose your fork and the branch with your changes to open a pull request. +4. Fill in the pull request template with the necessary details about your changes. + +We look forward to your contributions! + +## License + +You accept that your contributions will be licensed under the [Apache-2.0 License](https://choosealicense.com/licenses/apache-2.0/) if you contribute to this repository. If this is a concern, please notify the maintainers. From 1cbef688d31a1c888ec685a8f1fcfebb35270909 Mon Sep 17 00:00:00 2001 From: Vladisalv Sovrasov Date: Thu, 10 Apr 2025 21:51:59 +0900 Subject: [PATCH 2/4] Update OV badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d260a4a5..25f654d1 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ -[![openvino](https://img.shields.io/badge/openvino-2025.0-purple)]() +[![openvino](https://img.shields.io/badge/openvino-2025.1-purple)]() From 349aaacedd94886ff48619c3a4c2a95b258f3bcc Mon Sep 17 00:00:00 2001 From: Vladisalv Sovrasov Date: Fri, 11 Apr 2025 20:48:57 +0900 Subject: [PATCH 3/4] Add issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 35 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 35 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/question.md | 13 +++++++++ 3 files changed, 83 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/ISSUE_TEMPLATE/question.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..29556fdd --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,35 @@ +--- +name: Bug report +about: Create a report to help us improve +title: "" +labels: bug +assignees: "" +--- + + + +**Describe the bug** + + + +**Steps to Reproduce** + +1. +2. +3. +4. + +**Environment:** + +- OS: +- OpenVINO version: +- Inference device model and memory: + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..c0a9d92f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,35 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "" +labels: enhancement +assignees: "" +--- + + + +**Is your feature request related to a problem? Please describe.** + + + +**Describe the solution you'd like to propose.** + + + +**Describe alternatives you've considered** + + + +**Additional context** + + diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md new file mode 100644 index 00000000..56aab9ad --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.md @@ -0,0 +1,13 @@ +--- +name: Question +about: Ask any question about this repository +title: "" +labels: question +assignees: "" +--- + + From 62c18152561ccbe4814f55f967c371c31a466444 Mon Sep 17 00:00:00 2001 From: Vladisalv Sovrasov Date: Fri, 11 Apr 2025 20:57:43 +0900 Subject: [PATCH 4/4] Fix linter --- .github/ISSUE_TEMPLATE/bug_report.md | 6 +++--- .github/ISSUE_TEMPLATE/feature_request.md | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 29556fdd..125b0e7d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -10,7 +10,7 @@ assignees: "" Thank you very much for contributing to this project by creating an issue! --> -**Describe the bug** +### Describe the bug -**Steps to Reproduce** +### Steps to Reproduce 1. 2. 3. 4. -**Environment:** +### Environment - OS: - OpenVINO version: diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index c0a9d92f..37aa39b2 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -10,25 +10,25 @@ assignees: "" Thank you very much for contributing to this project by creating an issue! --> -**Is your feature request related to a problem? Please describe.** +### Is your feature request related to a problem? Please describe -**Describe the solution you'd like to propose.** +### Describe the solution you'd like to propose -**Describe alternatives you've considered** +### Describe alternatives you've considered -**Additional context** +### Additional context