Skip to content

chore: set up fork tooling, CI/CD, docs publishing, and packaging - #2

Merged
nnayda merged 2 commits into
masterfrom
chore/fork-setup
Jun 18, 2026
Merged

chore: set up fork tooling, CI/CD, docs publishing, and packaging#2
nnayda merged 2 commits into
masterfrom
chore/fork-setup

Conversation

@nnayda

@nnayda nnayda commented Jun 18, 2026

Copy link
Copy Markdown
Owner

What

Establishes the fork's own engineering infrastructure so it can be built, tested, reviewed, released, and documented independently of upstream python-openxml/python-docx.

  • Agent/governance docs: AGENTS.md (+ CLAUDE.md pointer), CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md, CHANGELOG.md, .editorconfig, .gitattributes.
  • GitHub config: CODEOWNERS, PR template, bug/feature/config issue templates, Dependabot (uv + GitHub Actions).
  • CI/CD (.github/workflows/):
    • ci.yml — ruff lint+format, pyright (non-blocking), pytest + behave across Python 3.9–3.13
    • pr-title.yml — Conventional Commits enforcement (squash-merge → title becomes commit)
    • codeql.yml — security scanning (python + actions)
    • docs.yml — build Sphinx + deploy to GitHub Pages from master
    • release.yml — build + publish to PyPI via Trusted Publishing on GitHub Release, guarded by a tag-vs-__version__ check
  • CodeRabbit: .coderabbit.yaml with path-scoped review instructions.
  • Packaging: distribution renamed to python-docx-nnayda (import stays docx); refreshed classifiers (3.9–3.13), fork URLs, ruff target py39.
  • Docs: build with modern Sphinx + Furo theme; fixed conf.py intersphinx + missing substitutions and a broken RST reference; published via GitHub Pages.
  • Misc: README badges + fork note; modernized .gitignore; removed legacy .travis.yml.

Why

The fork needs its own trunk/branch workflow, automated checks, and a publish path. Follows the conventions used in the remora repo (Conventional Commits, squash-merge, CodeRabbit, CodeQL, Dependabot).

Verified locally

  • ruff check / ruff format --check — clean
  • pytest — 1648 passed
  • behave — 654 scenarios passed
  • sphinx-build — builds clean
  • uv build + twine check — builds python_docx_nnayda-1.2.0, PASSED

Manual setup still required (GitHub/PyPI UI)

  • PyPI Trusted Publishing: register nnayda/python-docx -> release.yml -> env pypi; create a pypi GitHub environment.
  • Enable GitHub Pages -> Source: "GitHub Actions".
  • Install the CodeRabbit GitHub App.
  • Branch protection on master: require CI + PR-title checks; squash-merge only.

Notes

  • pyright runs non-blocking: strict config is aspirational; forked source predates full type annotations (~2,200 pre-existing errors). Tighten incrementally, then drop continue-on-error.
  • The pr-title check won't run on this PR (workflow not yet on master); it activates for subsequent PRs.

🤖 Generated with Claude Code

nnayda and others added 2 commits June 17, 2026 23:13
Make this fork independently buildable, testable, releasable, and
documented, following the conventions from the remora repo.

- Add AGENTS.md (+ CLAUDE.md pointer), CONTRIBUTING.md, SECURITY.md,
  CODE_OF_CONDUCT.md, CHANGELOG.md, .editorconfig, .gitattributes.
- Add GitHub config: CODEOWNERS, PR template, issue templates,
  dependabot (pip + actions).
- Add GitHub Actions: CI (ruff, pyright [non-blocking], pytest + behave
  across py3.9-3.13), Conventional Commits PR-title check, CodeQL, docs
  (build + deploy to GitHub Pages), release (build + PyPI Trusted
  Publishing on GitHub Release).
- Integrate CodeRabbit via .coderabbit.yaml with path-scoped instructions.
- Packaging: publish as python-docx-nnayda (import name stays docx);
  refresh metadata, classifiers (py3.9-3.13), URLs, and ruff target.
- Docs: build with modern Sphinx + Furo theme; fix conf.py intersphinx,
  missing substitutions, and a broken reference; publish via GitHub Pages.
- Update README (badges, fork note, install/docs links); modernize
  .gitignore; remove legacy .travis.yml.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Apply pre-landing review findings:
- release.yml: fail fast unless the git tag matches src/docx/__init__.py
  __version__, so we never publish a wrong or duplicate version to PyPI.
- dependabot.yml: use the native `uv` ecosystem so uv.lock and the
  dependency groups actually get update PRs (the pip ecosystem doesn't).
- docs.yml: drop `-W` (keep --keep-going) so a stray docstring warning
  from the legacy source can't block publishing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nnayda
nnayda merged commit db5032f into master Jun 18, 2026
12 of 13 checks passed
@nnayda
nnayda deleted the chore/fork-setup branch June 18, 2026 02:58
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.

1 participant