diff --git a/.cspell.json b/.cspell.json new file mode 100644 index 0000000..63d71da --- /dev/null +++ b/.cspell.json @@ -0,0 +1,60 @@ +{ + "version": "0.2", + "language": "en", + "caseSensitive": true, + "useGitignore": true, + "ignorePaths": [ + ".github/**", + ".cspell/**", + ".gemini/**", + ".vscode/**", + ".cspell.json", + "**/*.svg", + ".gitignore", + "package.json" + ], + "dictionaryDefinitions": [ + { + "name": "custom-words", + "path": ".cspell/custom-words.txt", + "addWords": true + } + ], + "dictionaries": [ + "custom-words", + "aws", + "bash-words", + "companies", + "css", + "data-science-models", + "data-science", + "data-science-tools", + "acronyms", + "shared-additional-words", + "en_GB", + "en_US", + "filetypes", + "fonts", + "fullstack", + "go", + "google", + "html", + "java", + "k8s", + "mnemonics", + "monkeyc_keywords", + "node", + "npm", + "people-names", + "python", + "python-common", + "shell-all-words", + "softwareTerms", + "webServices", + "common-terms", + "sql", + "tsql", + "terraform", + "typescript" + ] +} diff --git a/.cspell/custom-words.txt b/.cspell/custom-words.txt new file mode 100644 index 0000000..0a4b07d --- /dev/null +++ b/.cspell/custom-words.txt @@ -0,0 +1,78 @@ +# cspell-specific custom words related to UCP +Adyen +Alam +Amex +Ant +Anytown +Backordered +Braintree +Carrefour +Centricity +Chewy +Commerce +Credentialless +Depot +EWALLET +Etsy +Flipkart +Gap +GitHub +Google +Gpay +Kroger +Lowe's +Macy's +Mastercard +Paymentech +Paypal +Preorders +Queensway +Sephora +Shopify +Shopee +Stripe +Target +UCP +Ulta +Visa +Wayfair +Worldpay +Zalando +adyen +agentic +atok +backorder +checkout +credentialless +credentialization +datamodel +dpan +ewallet +fontawesome +fpan +fulfillable +gpay +ingestions +inlinehilite +linenums +llmstxt +mastercard +mkdocs +mtok +openapi +openrpc +paypal +permissionless +preorders +proto +protobuf +pymdownx +renderable +repudiable +schemas +sdjwt +shopify +superfences +vulnz +yaml +yml \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 0000000..a4ce6d9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,32 @@ +name: 🐞 Bug Report +description: File a bug report +title: "[Bug]: " +type: "Bug" +body: + - type: markdown + attributes: + value: | + Thanks for stopping by to let us know something could be better! + - type: textarea + id: what-happened + attributes: + label: What happened? + description: Also tell us what you expected to happen and how to reproduce the issue. + placeholder: Tell us what you see! + value: "A bug happened!" + validations: + required: true + - type: textarea + id: logs + attributes: + label: Relevant log output + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: shell + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our Code of Conduct + options: + - label: I agree to follow this project's Code of Conduct + required: true diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 0000000..883f4b4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,40 @@ +name: 💡 Feature Request +description: Suggest an idea for this repository +title: "[Feat]: " +type: "Feature" +body: + - type: markdown + attributes: + value: | + Thanks for stopping by to let us know something could be better! + - type: textarea + id: problem + attributes: + label: Is your feature request related to a problem? Please describe. + description: A clear and concise description of what the problem is. + placeholder: Ex. I'm always frustrated when [...] + - type: textarea + id: describe + attributes: + label: Describe the solution you'd like + description: A clear and concise description of what you want to happen. + validations: + required: true + - type: textarea + id: alternatives + attributes: + label: Describe alternatives you've considered + description: A clear and concise description of any alternative solutions or features you've considered. + - type: textarea + id: context + attributes: + label: Additional context + description: Add any other context or screenshots about the feature request here. + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our Code of Conduct + options: + - label: I agree to follow this project's Code of Conduct + required: true diff --git a/.github/linters/.markdownlint.json b/.github/linters/.markdownlint.json new file mode 100644 index 0000000..38fb124 --- /dev/null +++ b/.github/linters/.markdownlint.json @@ -0,0 +1,10 @@ +{ + "default": true, + "MD013": false, + "MD007": { + "indent": 4 + }, + "MD033": false, + "MD046": false, + "MD024": false +} diff --git a/.github/linters/.yamllint.yml b/.github/linters/.yamllint.yml new file mode 100644 index 0000000..c99862c --- /dev/null +++ b/.github/linters/.yamllint.yml @@ -0,0 +1,4 @@ +rules: + line-length: + max: 80 + level: warning diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..8edd7ea --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,91 @@ + + +# Description + +Please include a summary of the changes and the related issue. Please also +include relevant motivation and context. + +## Type of change + +Please delete options that are not relevant. + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] **Breaking change** (fix or feature that would cause existing + functionality to not work as expected, **including removal of schema files + or fields**) +- [ ] Documentation update + +--- + +### Is this a Breaking Change or Removal? + +If you checked "Breaking change" above, or if you are removing **any** schema +files or fields: + +- [ ] **I have added `!` to my PR title** (e.g., `feat!: remove field`). +- [ ] **I have added justification below.** + +## Breaking Changes / Removal Justification + +(Please provide a detailed technical and strategic rationale here for why this +breaking change or removal is necessary.) + +--- + +## Checklist + +- [ ] My code follows the style guidelines of this project +- [ ] I have performed a self-review of my own code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] My changes generate no new warnings +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes +- [ ] Any dependent changes have been merged and published in downstream modules + +--- + +### Pull Request Title + +This repository enforces **Conventional Commits**. Your PR title must follow +this format: `type: description` or `type!: description` for breaking changes. + +**Types:** + +- `feat`: A new feature +- `fix`: A bug fix +- `docs`: Documentation only changes +- `style`: Changes that do not affect the meaning of the code (white-space, + formatting, etc) +- `refactor`: A code change that neither fixes a bug nor adds a feature +- `perf`: A code change that improves performance +- `test`: Adding missing tests or correcting existing tests +- `chore`: Changes to the build process or auxiliary tools and libraries + +**Breaking Changes:** + +If your change is a breaking change (e.g., removing a field or file), you +**must** add `!` before the colon in your title: +`type!: description` + +**Examples:** + +- `feat: add new payment gateway` +- `fix: resolve crash on checkout` +- `docs: update setup guide` +- `feat!: remove deprecated buyer field from checkout` diff --git a/.github/workflows/conventional-commits.yml b/.github/workflows/conventional-commits.yml new file mode 100644 index 0000000..ceb70a5 --- /dev/null +++ b/.github/workflows/conventional-commits.yml @@ -0,0 +1,40 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: "Conventional Commits" + +on: + pull_request: + types: + - opened + - edited + - synchronize + +permissions: + contents: read + +jobs: + main: + permissions: + pull-requests: read + statuses: write + name: Validate PR Title + runs-on: ubuntu-latest + steps: + - name: semantic-pull-request + uses: amannn/action-semantic-pull-request@v6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + validateSingleCommit: false diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml new file mode 100644 index 0000000..52b7321 --- /dev/null +++ b/.github/workflows/linter.yaml @@ -0,0 +1,65 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: Lint Code Base + +on: + pull_request: + branches: [main] + +permissions: + contents: read # Required to checkout the code + packages: read # Required to pull the Super-Linter docker image + statuses: write # Required to fix the 403 error (updating status checks) + +jobs: + build: + name: Lint Code Base + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Lint Code Base + uses: super-linter/super-linter/slim@v8 + env: + DEFAULT_BRANCH: origin/main + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MARKDOWN_CONFIG_FILE: ".markdownlint.json" + PYTHON_RUFF_CONFIG_FILE: ../../pyproject.toml + PYTHON_RUFF_FORMAT_CONFIG_FILE: ../../pyproject.toml + PYTHON_RUFF_FORMAT_CHECK_ONLY_MODE_OPTIONS: "--check --diff" + LOG_LEVEL: INFO + SHELLCHECK_OPTS: -e SC1091 -e 2086 + VALIDATE_ALL_CODEBASE: false + FILTER_REGEX_EXCLUDE: "^(\\.github/|\\.vscode/).*|CODE_OF_CONDUCT.md|CHANGELOG.md" + VALIDATE_BIOME_FORMAT: false + VALIDATE_PYTHON_BLACK: false + VALIDATE_PYTHON_FLAKE8: false + VALIDATE_PYTHON_ISORT: false + VALIDATE_PYTHON_MYPY: false + VALIDATE_PYTHON_PYLINT: false + VALIDATE_PYTHON_RUFF: false + VALIDATE_CHECKOV: false + VALIDATE_NATURAL_LANGUAGE: false + VALIDATE_MARKDOWN_PRETTIER: false + VALIDATE_JAVASCRIPT_PRETTIER: false + VALIDATE_JSON_PRETTIER: false + VALIDATE_YAML_PRETTIER: false + VALIDATE_GIT_COMMITLINT: false + VALIDATE_GITHUB_ACTIONS_ZIZMOR: false + VALIDATE_JSCPD: false diff --git a/.github/workflows/spellcheck.yaml b/.github/workflows/spellcheck.yaml new file mode 100644 index 0000000..ec44922 --- /dev/null +++ b/.github/workflows/spellcheck.yaml @@ -0,0 +1,29 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: "Check Spelling" +on: + pull_request: + +jobs: + spellcheck: + runs-on: ubuntu-latest + permissions: + contents: read + actions: read + steps: + - uses: actions/checkout@v4 + - uses: streetsidesoftware/cspell-action@v7 + with: + incremental_files_only: true