Skip to content

Commit aa3a6ce

Browse files
gunnarmarinoclaude
andcommitted
Port PR AndyEverything#15: add uvx/pip installation support with entry point
- pyproject.toml: add [project.scripts] entry point (openproject-mcp -> src.server:main), Python 3.13 classifier, ruff/mypy tool config, [dependency-groups] - src/server.py: add main() entry point function for CLI invocation - LICENSE: add MIT license file (AndyEverything + Compass Rose Systems) - .github/workflows/ci.yml: CI with lint, test matrix (3.10-3.13), build jobs - .github/workflows/publish.yml: PyPI Trusted Publishing on version tags - .github/workflows/security.yml: dependency review, SBOM, CodeQL - .github/dependabot.yml: weekly updates for Actions and pip - CI_CD.md, RELEASING.md, TROUBLESHOOTING.md: new CI/CD documentation - .gitignore: minor additions (uv.lock comment, GITHUB_ACTIONS_PLAN.md) - README.md: add uvx/pip Quick Start and Claude Code/Desktop config examples - tests/: add test_basic.py and test_client.py (adapted for src/ layout) Skipped: file rename (openproject-mcp.py -> openproject_mcp.py), uv.lock regeneration Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent a3a71f4 commit aa3a6ce

15 files changed

Lines changed: 965 additions & 12 deletions

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
version: 2
2+
updates:
3+
# GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
commit-message:
9+
prefix: "ci"
10+
include: "scope"
11+
12+
# Python dependencies
13+
- package-ecosystem: "pip"
14+
directory: "/"
15+
schedule:
16+
interval: "weekly"
17+
commit-message:
18+
prefix: "deps"
19+
include: "scope"

.github/workflows/ci.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
pull-requests: read
12+
13+
jobs:
14+
lint:
15+
name: Lint & Format Check
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
persist-credentials: false
21+
22+
- name: Set up uv
23+
uses: astral-sh/setup-uv@v7
24+
with:
25+
enable-cache: true
26+
27+
- name: Set up Python
28+
run: uv python install 3.12
29+
30+
- name: Install dependencies
31+
run: uv sync --frozen --dev
32+
33+
- name: Lint and format check with Ruff
34+
run: |
35+
uv run ruff check .
36+
uv run ruff format --check .
37+
38+
- name: Type check with mypy
39+
run: uv run mypy src/server.py
40+
continue-on-error: true # Report issues but don't fail build
41+
42+
test:
43+
name: Test (Python ${{ matrix.python-version }})
44+
runs-on: ubuntu-latest
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
python-version: ["3.10", "3.11", "3.12", "3.13"]
49+
50+
steps:
51+
- uses: actions/checkout@v4
52+
with:
53+
persist-credentials: false
54+
55+
- name: Set up uv
56+
uses: astral-sh/setup-uv@v7
57+
with:
58+
enable-cache: true
59+
60+
- name: Set up Python ${{ matrix.python-version }}
61+
run: uv python install ${{ matrix.python-version }}
62+
63+
- name: Install dependencies
64+
run: uv sync --frozen --dev
65+
66+
- name: Create junit directory
67+
run: mkdir -p junit
68+
69+
- name: Run tests
70+
run: uv run pytest tests/ --junitxml=junit/test-results-${{ matrix.python-version }}.xml
71+
72+
- name: Upload test results
73+
if: always()
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: test-results-${{ matrix.python-version }}
77+
path: junit/test-results-*.xml
78+
79+
build:
80+
name: Build Package
81+
runs-on: ubuntu-latest
82+
steps:
83+
- uses: actions/checkout@v4
84+
with:
85+
persist-credentials: false
86+
87+
- name: Set up uv
88+
uses: astral-sh/setup-uv@v7
89+
with:
90+
enable-cache: true
91+
92+
- name: Set up Python
93+
run: uv python install 3.12
94+
95+
- name: Build package
96+
run: uv build
97+
98+
- name: Verify build outputs
99+
run: |
100+
test -f dist/*.whl
101+
test -f dist/*.tar.gz
102+
103+
- name: Upload build artifacts
104+
uses: actions/upload-artifact@v4
105+
with:
106+
name: dist
107+
path: dist/

.github/workflows/publish.yml

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Trigger on any tag starting with 'v' (e.g., v1.0.0, v1.2.3)
7+
8+
permissions:
9+
contents: write # Required to create GitHub releases
10+
id-token: write # Required for PyPI trusted publishing
11+
12+
jobs:
13+
build:
14+
name: Build Distribution
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
persist-credentials: false
20+
21+
- name: Set up uv
22+
uses: astral-sh/setup-uv@v7
23+
with:
24+
enable-cache: true
25+
26+
- name: Set up Python
27+
run: uv python install 3.12
28+
29+
- name: Build package
30+
run: uv build
31+
32+
- name: Upload artifacts
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: dist
36+
path: dist/
37+
38+
publish:
39+
name: Publish to PyPI
40+
runs-on: ubuntu-latest
41+
needs: build
42+
environment:
43+
name: pypi
44+
url: https://pypi.org/project/openproject-mcp-server
45+
46+
steps:
47+
- name: Download artifacts
48+
uses: actions/download-artifact@v4
49+
with:
50+
name: dist
51+
path: dist/
52+
53+
- name: Set up uv
54+
uses: astral-sh/setup-uv@v7
55+
56+
- name: Publish to PyPI
57+
uses: pypa/gh-action-pypi-publish@release/v1
58+
with:
59+
attestations: true
60+
61+
create-release:
62+
name: Create GitHub Release
63+
runs-on: ubuntu-latest
64+
needs: publish
65+
permissions:
66+
contents: write
67+
68+
steps:
69+
- uses: actions/checkout@v4
70+
with:
71+
persist-credentials: false
72+
73+
- name: Create GitHub Release
74+
env:
75+
GH_TOKEN: ${{ github.token }}
76+
run: |
77+
gh release create ${{ github.ref_name }} \
78+
--title "${{ github.ref_name }}" \
79+
--generate-notes \
80+
--latest

.github/workflows/security.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: Security
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
schedule:
9+
- cron: '0 0 * * 0' # Weekly on Sunday at midnight UTC
10+
11+
permissions:
12+
contents: read
13+
pull-requests: write # For dependency review comments
14+
15+
jobs:
16+
dependency-review:
17+
name: Dependency Review
18+
runs-on: ubuntu-latest
19+
if: github.event_name == 'pull_request'
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
persist-credentials: false
24+
25+
- name: Dependency Review
26+
uses: actions/dependency-review-action@v4
27+
with:
28+
fail-on-severity: high
29+
30+
sbom:
31+
name: Generate SBOM
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
with:
36+
persist-credentials: false
37+
38+
- name: Set up uv
39+
uses: astral-sh/setup-uv@v7
40+
with:
41+
enable-cache: true
42+
43+
- name: Set up Python
44+
run: uv python install 3.12
45+
46+
- name: Install dependencies
47+
run: uv sync --frozen --all-extras
48+
49+
- name: Generate SBOM
50+
run: uv run cyclonedx-py environment -o sbom.json --of json
51+
52+
- name: Upload SBOM
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: sbom
56+
path: sbom.json
57+
retention-days: 90
58+
59+
codeql:
60+
name: CodeQL Analysis
61+
runs-on: ubuntu-latest
62+
permissions:
63+
security-events: write
64+
actions: read
65+
contents: read
66+
67+
steps:
68+
- uses: actions/checkout@v4
69+
with:
70+
persist-credentials: false
71+
72+
- name: Initialize CodeQL
73+
uses: github/codeql-action/init@v3
74+
with:
75+
languages: python
76+
77+
- name: Autobuild
78+
uses: github/codeql-action/autobuild@v3
79+
80+
- name: Perform CodeQL Analysis
81+
uses: github/codeql-action/analyze@v3

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ ipython_config.py
9898
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
9999
# This is especially recommended for binary packages to ensure reproducibility, and is more
100100
# commonly ignored for libraries.
101-
#uv.lock
101+
# uv.lock is now tracked for reproducible CI builds
102102

103103
# poetry
104104
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
@@ -207,4 +207,7 @@ marimo/_lsp/
207207
__marimo__/
208208

209209
# Claude Code configuration
210-
CLAUDE.md
210+
CLAUDE.md
211+
212+
# GitHub Actions planning document (local use only)
213+
GITHUB_ACTIONS_PLAN.md

0 commit comments

Comments
 (0)