Skip to content

Commit b2f4083

Browse files
Merge pull request #14 from wphillipmoore/feature/standards-alignment
chore: align pymqrest with library standards
2 parents e16f344 + ba2dc9b commit b2f4083

21 files changed

Lines changed: 3282 additions & 27 deletions

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false

.github/ISSUE_TEMPLATE/issue.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Issue
2+
description: Track work with explicit acceptance criteria.
3+
title: "[Issue]: "
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Use this form to capture the required issue details.
9+
- type: textarea
10+
id: summary
11+
attributes:
12+
label: Summary
13+
description: Short, single-paragraph summary.
14+
placeholder: What is the change or problem?
15+
validations:
16+
required: true
17+
- type: textarea
18+
id: problem
19+
attributes:
20+
label: Problem / Goal
21+
description: What is broken or what outcome is needed?
22+
validations:
23+
required: true
24+
- type: checkboxes
25+
id: acceptance_obvious
26+
attributes:
27+
label: Acceptance criteria clarity
28+
options:
29+
- label: Criteria are obvious (docs-only or trivial change)
30+
- type: textarea
31+
id: acceptance
32+
attributes:
33+
label: Acceptance criteria (if not obvious)
34+
description: If criteria are obvious, write "Obvious" with a short note.
35+
placeholder: List explicit criteria or success conditions.
36+
validations:
37+
required: true
38+
- type: textarea
39+
id: validation
40+
attributes:
41+
label: Validation / Evidence
42+
description: How will completion be verified?
43+
validations:
44+
required: true

.github/pull_request_template.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Pull Request
2+
3+
## Summary
4+
-
5+
6+
## Issue Linkage
7+
- Fixes # (default; use when no acceptance criteria exist)
8+
- Ref # (use when acceptance criteria exist)
9+
- Work is not complete until the issue is closed.
10+
- If no issue exists, open one before any work begins.
11+
12+
## Testing
13+
- poetry run python3 scripts/dev/validate_local.py
14+
15+
## Notes
16+
-

.github/workflows/ci.yml

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
name: CI - Test and Validate
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- develop
8+
- 'release/**'
9+
10+
permissions:
11+
contents: read
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
docs-only:
19+
name: docs-only
20+
runs-on: ubuntu-latest
21+
outputs:
22+
docs_only: ${{ steps.detect.outputs.docs_only }}
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
27+
- name: Fetch base branch for diff
28+
if: github.event_name == 'pull_request'
29+
run: git fetch origin ${{ github.base_ref }} --depth=1
30+
31+
- name: Detect docs-only changes
32+
id: detect
33+
run: |
34+
if [ "${{ github.event_name }}" != "pull_request" ]; then
35+
echo "docs_only=false" >> "$GITHUB_OUTPUT"
36+
exit 0
37+
fi
38+
39+
files=$(git diff --name-only "origin/${{ github.base_ref }}"...HEAD)
40+
if [ -z "$files" ]; then
41+
echo "docs_only=false" >> "$GITHUB_OUTPUT"
42+
exit 0
43+
fi
44+
45+
docs_only=true
46+
for file in $files; do
47+
if [[ "$file" == docs/* ]] || [[ "$file" == "README.md" ]] || [[ "$file" == "CHANGELOG.md" ]]; then
48+
continue
49+
fi
50+
docs_only=false
51+
break
52+
done
53+
54+
echo "docs_only=$docs_only" >> "$GITHUB_OUTPUT"
55+
56+
dependency-audit:
57+
name: dependency-audit
58+
runs-on: ubuntu-latest
59+
steps:
60+
- name: Checkout code
61+
uses: actions/checkout@v4
62+
63+
- name: Set up Python 3.14
64+
uses: actions/setup-python@v5
65+
with:
66+
python-version: "3.14"
67+
68+
- name: Cache Poetry installation
69+
uses: actions/cache@v4
70+
with:
71+
path: |
72+
~/.local/share/pypoetry
73+
~/.local/bin/poetry
74+
key: poetry-install-${{ runner.os }}-3.14
75+
76+
- name: Install Poetry
77+
run: |
78+
if ! command -v poetry &> /dev/null; then
79+
curl -sSL https://install.python-poetry.org | python3 -
80+
echo "$HOME/.local/bin" >> $GITHUB_PATH
81+
fi
82+
poetry --version
83+
84+
- name: Cache dependencies
85+
uses: actions/cache@v4
86+
with:
87+
path: ~/.cache/pypoetry/virtualenvs
88+
key: poetry-${{ runner.os }}-py3.14-${{ hashFiles('poetry.lock') }}
89+
restore-keys: |
90+
poetry-${{ runner.os }}-py3.14-
91+
92+
- name: Install dependencies
93+
run: poetry install --no-interaction
94+
95+
- name: Run pip-audit (fail on any vulnerability)
96+
run: poetry run pip-audit -r requirements.txt -r requirements-dev.txt
97+
98+
test-and-validate:
99+
name: test-and-validate
100+
runs-on: ubuntu-latest
101+
needs: docs-only
102+
if: needs.docs-only.outputs.docs_only != 'true'
103+
strategy:
104+
matrix:
105+
python-version: ["3.14"]
106+
107+
steps:
108+
- name: Checkout code
109+
uses: actions/checkout@v4
110+
111+
- name: Fetch base branch for version checks
112+
if: github.event_name == 'pull_request'
113+
run: git fetch origin ${{ github.base_ref }} --depth=1
114+
115+
- name: Set up Python ${{ matrix.python-version }}
116+
uses: actions/setup-python@v5
117+
with:
118+
python-version: ${{ matrix.python-version }}
119+
120+
- name: Validate version string policy
121+
run: python3 scripts/dev/validate_version.py
122+
123+
- name: Cache Poetry installation
124+
uses: actions/cache@v4
125+
with:
126+
path: |
127+
~/.local/share/pypoetry
128+
~/.local/bin/poetry
129+
key: poetry-install-${{ runner.os }}-${{ matrix.python-version }}
130+
131+
- name: Install Poetry
132+
run: |
133+
if ! command -v poetry &> /dev/null; then
134+
curl -sSL https://install.python-poetry.org | python3 -
135+
echo "$HOME/.local/bin" >> $GITHUB_PATH
136+
fi
137+
poetry --version
138+
139+
- name: Validate dependency specifications
140+
run: python3 scripts/dev/validate_dependency_specs.py
141+
142+
- name: Verify poetry.lock sync
143+
run: poetry check --lock
144+
145+
- name: Cache dependencies
146+
uses: actions/cache@v4
147+
with:
148+
path: ~/.cache/pypoetry/virtualenvs
149+
key: poetry-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
150+
restore-keys: |
151+
poetry-${{ runner.os }}-py${{ matrix.python-version }}-
152+
153+
- name: Install dependencies
154+
run: poetry install --no-interaction
155+
156+
- name: Run ruff check
157+
run: poetry run ruff check
158+
159+
- name: Run mypy
160+
run: poetry run mypy src/
161+
162+
- name: Run tests with coverage
163+
run: |
164+
poetry run pytest \
165+
--cov=pymqrest \
166+
--cov-report=term-missing \
167+
--cov-branch \
168+
--cov-fail-under=100

.markdownlint.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"MD013": false
3+
}

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,33 @@
11
# pymqrest
2-
Python Wrapper for the IBM MQ REST API
2+
3+
Python wrapper for the IBM MQ REST API.
4+
5+
## Table of Contents
6+
- [Purpose](#purpose)
7+
- [Status](#status)
8+
- [Development](#development)
9+
- [License](#license)
10+
11+
## Purpose
12+
Provide a Python mapping layer for MQ REST API attribute translations and
13+
command metadata experiments.
14+
15+
## Status
16+
Experimental. The current focus is on attribute mapping and metadata modeling.
17+
18+
## Development
19+
Set up the environment and run the canonical validation command:
20+
21+
```bash
22+
poetry install
23+
poetry run python3 scripts/dev/validate_local.py
24+
```
25+
26+
Docs-only changes can use:
27+
28+
```bash
29+
python3 scripts/dev/validate_docs.py
30+
```
31+
32+
## License
33+
GPL-3.0-or-later. See `LICENSE`.

docs/plans/2026-01-19-standards-compliance.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
- [Acceptance criteria](#acceptance-criteria)
99

1010
## Purpose
11-
Bring pymqrest into compliance with the canonical standards and conventions
12-
without introducing non-documentation changes in this phase.
11+
Bring pymqrest into compliance with the canonical standards and conventions.
1312

1413
## Scope
1514
Documentation-only alignment, plus a concrete plan for required repository
@@ -19,19 +18,16 @@ configuration changes.
1918
- Added `docs/standards-and-conventions.md` with canonical references and local
2019
overlay.
2120
- Updated `AGENTS.md` to reference canonical standards and shared skills.
22-
23-
## Remaining work
24-
- Add GitHub Issue Forms:
21+
- Added GitHub Issue Forms:
2522
- `.github/ISSUE_TEMPLATE/issue.yml`
2623
- `.github/ISSUE_TEMPLATE/config.yml` with `blank_issues_enabled: false`
27-
- Add pull request template:
24+
- Added pull request template:
2825
- `.github/pull_request_template.md`
29-
- Implement CI hard gates and required status checks for `develop`, `release`,
30-
and `main`:
31-
- `test-and-validate (3.14)`
32-
- `integration-tests`
33-
- `dependency-audit`
34-
- Document the canonical local validation command for this repository.
26+
- Implemented CI hard gates with docs-only skip support.
27+
- Documented the canonical local validation command.
28+
29+
## Remaining work
30+
None.
3531

3632
## Acceptance criteria
3733
- Required documentation is in place and references the canonical standards.

docs/standards-and-conventions.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,26 @@ https://github.com/wphillipmoore/standards-and-conventions
1212
- https://github.com/wphillipmoore/standards-and-conventions/blob/develop/docs/code-management/commit-messages-and-authorship.md
1313
- https://github.com/wphillipmoore/standards-and-conventions/blob/develop/docs/code-management/github-issues.md
1414
- https://github.com/wphillipmoore/standards-and-conventions/blob/develop/docs/code-management/pull-request-workflow.md
15+
- https://github.com/wphillipmoore/standards-and-conventions/blob/develop/docs/code-management/library-branching-and-release.md
1516
- https://github.com/wphillipmoore/standards-and-conventions/blob/develop/docs/code-management/library-versioning-scheme.md
17+
- https://github.com/wphillipmoore/standards-and-conventions/blob/develop/docs/code-management/release-versioning.md
1618
- https://github.com/wphillipmoore/standards-and-conventions/blob/develop/docs/code-management/source-control-guidelines.md
1719
- https://github.com/wphillipmoore/standards-and-conventions/blob/develop/docs/development/environment-and-tooling.md
1820
- https://github.com/wphillipmoore/standards-and-conventions/blob/develop/docs/development/python/overview.md
1921
- https://github.com/wphillipmoore/standards-and-conventions/blob/develop/docs/foundation/markdown-standards.md
2022

2123
## Project-specific overlay
22-
- Repository type: Python library.
2324
- AI co-authors:
2425
- Co-Authored-By: wphillipmoore-codex <255923655+wphillipmoore-codex@users.noreply.github.com>
2526
- Co-Authored-By: wphillipmoore-claude <255925739+wphillipmoore-claude@users.noreply.github.com>
26-
- Deviations (tracked plans):
27-
- GitHub Issue Forms and blank-issue disabling are not yet implemented.
28-
- Pull request template is not yet installed.
29-
- CI hard gates and branch protection requirements are not yet implemented.
30-
- See `docs/plans/2026-01-19-standards-compliance.md`.
27+
- Repository profile:
28+
- repository_type: library
29+
- versioning_scheme: library
30+
- branching_model: library-release
31+
- release_model: artifact-publishing
32+
- supported_release_lines: current and previous
33+
- Local validation:
34+
- `poetry run python3 scripts/dev/validate_local.py`
35+
- Docs-only changes: `python3 scripts/dev/validate_docs.py`
36+
- Docs-only validation requires `markdownlint` `0.41.0` on the PATH or `npx`
37+
to run the pinned version.

0 commit comments

Comments
 (0)