Skip to content

chore: declare the Apache-2.0 license - #77

Merged
jtroup merged 1 commit into
mainfrom
elmo/badly-guided-ram
Nov 6, 2026
Merged

jtroup merged 1 commit into
mainfrom
elmo/badly-guided-ram

Conversation

@jtroup

@jtroup jtroup commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

ENG-9384

what

Declare stacklet-mcp as Apache-2.0:

  • Add a LICENSE file with the Apache 2.0 text.
  • Set license and license-files in pyproject.toml, so the wheel
    and sdist carry License-Expression: Apache-2.0 and the LICENSE
    file.
  • Add SPDX-License-Identifier: Apache-2.0 to the header template
    and apply it to every Python file through the add-license-header
    hook.
  • Rename the template from license-header.tpl to .license-header
    to keep it out of the repository root listing.

why

The repository had no license. We published to PyPI with copyright
headers only, so a consumer had no statement of the terms. The SPDX
line gives scanners a per-file identifier that they can read.

testing

N/A

docs

No docs needed.


🤖 Generated with Claude Code

@jtroup
jtroup requested a review from a team as a code owner November 6, 2026 02:12

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 47 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.
Architecture diagram
sequenceDiagram
    participant Dev as Developer
    participant Repo as Git Repository
    participant Hook as Pre-commit Hook
    participant Hatch as Hatchling Build
    participant PyPI as PyPI Registry

    Note over Dev,PyPI: License Declaration Flow

    Dev->>Repo: Commit Python source files
    Repo->>Hook: Trigger pre-commit (add-license-header)
    Hook->>Repo: Read .license-header template
    Hook->>Repo: Scan Python files for SPDX line
    alt Missing SPDX Identifier
        Hook->>Repo: Insert SPDX-License-Identifier: Apache-2.0
        Hook-->>Dev: Apply license header
    else Already present
        Hook-->>Dev: Skip file
    end
    Hook-->>Repo: Commit passes

    Note over Dev,Hatch: Packaging Flow

    Dev->>Hatch: Run build (sdist/wheel)
    Hatch->>Repo: Read pyproject.toml
    Hatch->>Repo: Extract license = "Apache-2.0"
    Hatch->>Repo: Locate LICENSE file via license-files
    Hatch->>Hatch: Generate METADATA with License-Expression
    Hatch-->>Dev: Produce wheel + sdist

    Note over Dev,PyPI: Distribution Flow

    Dev->>PyPI: Publish package
    PyPI->>PyPI: Store package with license metadata
    PyPI-->>Consumer: Expose license info

    Note over Consumer: Package consumer queries PyPI
    Consumer->>PyPI: Check package metadata
    PyPI-->>Consumer: License-Expression: Apache-2.0
Loading

Re-trigger cubic

@jtroup
jtroup merged commit 5017ddf into main Nov 6, 2026
6 checks passed
@jtroup
jtroup deleted the elmo/badly-guided-ram branch November 6, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants