diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..60eb537 --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,77 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our community include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall community + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or advances of any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official email address, posting via an official social media account, or acting as an appointed representative at an online or offline event. + +## Enforcement + +For a specific issue, pull request, discussion, or comment, use GitHub's **Report content** action and choose **Report to repository admins**. For other conduct on GitHub, use [GitHub's private abuse reporting form](https://support.github.com/contact/report-abuse). All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of actions. + +**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1, available at . + +Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). + +For answers to common questions about this code of conduct, see the [Contributor Covenant FAQ](https://www.contributor-covenant.org/faq). Translations are available on the [Contributor Covenant translations page](https://www.contributor-covenant.org/translations). diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..65523e8 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,37 @@ +# Contributing to light-ocr + +Thanks for helping improve light-ocr. Small, focused contributions are easiest to review. + +## Before you start + +- Search existing issues and pull requests before opening a new one. +- Use the bug or feature form for public reports. +- Report security vulnerabilities privately as described in [SECURITY.md](SECURITY.md). +- For a substantial API or architecture change, open an issue before investing in an implementation. + +## Development + +The project contains a C++17 core and a Node-API adapter. Start with: + +- [Build and release](../docs/build-and-release.md) for dependencies, presets, and tests. +- [C++ API](../docs/native-api.md) for native integration. +- [Node.js adapter](../bindings/node/README.md) for the package API and adapter tests. + +Run the narrowest relevant tests locally and list them in the pull request. CI covers the full platform matrix. + +## Changes + +- Keep each pull request focused on one problem. +- Add or update tests when behavior changes. +- Update public documentation and `CHANGELOG.md` for user-visible changes. +- Do not commit private OCR inputs, credentials, generated build trees, or unreviewed binary artifacts. + +## Titles and commits + +Use a concise, descriptive title for each issue and pull request. Keep commit messages focused and readable; Conventional Commits such as `feat:`, `fix:`, `docs:`, and `test:` are welcome but not required. + +## Pull requests + +A pull request should explain what changed, why it changed, and how it was verified. Maintainers may ask for a smaller scope or additional evidence before merging. + +By contributing, you agree that your contribution is licensed under the repository's [Apache License 2.0](../LICENSE). diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..8cd3ad4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,58 @@ +name: Bug report +description: Report reproducible incorrect behavior in light-ocr +title: "" +body: + - type: markdown + attributes: + value: | + Thanks for reporting a bug. Use a concise title that identifies the problem. Report security vulnerabilities through [GitHub private vulnerability reporting](https://github.com/arcships/light-ocr/security/advisories/new) instead. + - type: input + id: version + attributes: + label: light-ocr version + description: Enter a published version, `main`, or the commit SHA you tested. + placeholder: "0.x.y, main, or a commit SHA" + validations: + required: true + - type: dropdown + id: area + attributes: + label: Affected area + options: + - Node.js + - C++ + - Build, install, or packaging + - Documentation + - Other + validations: + required: true + - type: textarea + id: environment + attributes: + label: Environment + description: Include the operating system, architecture, Node.js version when relevant, and acceleration hardware. + validations: + required: true + - type: textarea + id: reproduction + attributes: + label: Minimal reproduction + description: Provide the smallest code and input description that reproduces the problem. Remove private images and secrets. + validations: + required: true + - type: textarea + id: behavior + attributes: + label: Actual and expected behavior + description: Explain what happened and what you expected instead. Include the complete error code and message when available. + validations: + required: true + - type: checkboxes + id: checks + attributes: + label: Checks + options: + - label: I searched existing issues for the same problem. + required: true + - label: I removed credentials and private OCR inputs from this report. + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..c663720 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Security vulnerability + url: https://github.com/arcships/light-ocr/security/advisories/new + about: Report a vulnerability privately to the maintainers. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..f931d25 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,36 @@ +name: Feature request +description: Propose a focused improvement to light-ocr +title: "" +body: + - type: markdown + attributes: + value: | + Thanks for the proposal. Use a concise title that describes the requested improvement. + - type: textarea + id: problem + attributes: + label: Problem + description: What user problem or workflow should this change improve? + validations: + required: true + - type: textarea + id: proposal + attributes: + label: Proposed behavior + description: Describe the smallest public behavior or API change that would solve the problem. + validations: + required: true + - type: textarea + id: context + attributes: + label: Context and alternatives + description: Add relevant platforms, workloads, examples, or alternatives you considered. + validations: + required: false + - type: checkboxes + id: checks + attributes: + label: Checks + options: + - label: I searched existing issues and pull requests for a similar proposal. + required: true diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 0000000..9a30a46 --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,18 @@ +# Security Policy + +## Supported versions + +Security fixes target the latest published light-ocr release. If a report affects an older version, maintainers may ask you to confirm it against the latest release. + +## Reporting a vulnerability + +Use [GitHub private vulnerability reporting](https://github.com/arcships/light-ocr/security/advisories/new). Please do not open a public issue for an undisclosed vulnerability. + +Include, when available: + +- The affected light-ocr version, API, operating system, and architecture. +- A clear description of the impact and the conditions required to reproduce it. +- A minimal reproduction or diagnostic output with secrets and private OCR inputs removed. +- Any suggested mitigation or fix. + +Maintainers will review the report privately and coordinate remediation and disclosure with the reporter. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..8c656e4 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,15 @@ + + +## Summary + + + +## Verification + + + +## Checklist + +- [ ] The change is focused; relevant tests were added or updated when behavior changed, otherwise this is N/A. +- [ ] Documentation and `CHANGELOG.md` were updated for user-visible changes, otherwise this is N/A. +- [ ] No credentials, private OCR inputs, generated build trees, or unrelated artifacts are included.