Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
448f2b1
Use Makefile for generating, building, checking documentation, and ru…
stevepiercy Nov 1, 2026
fa48bb6
Fixed .gitignore to exclude docs build dir
stevepiercy Nov 1, 2026
4479cce
REUSE
stevepiercy Nov 1, 2026
09ced34
Fix RTD build
stevepiercy Nov 1, 2026
fd16a43
Remove `-W` option so that warnings aren't treated as errors.
stevepiercy Nov 1, 2026
13d7634
Remove unchecked for building docs
stevepiercy Nov 1, 2026
f5edaa3
Move documentation into its own CI
stevepiercy Nov 1, 2026
a6ef015
REUSE
stevepiercy Nov 1, 2026
a93fc6a
Enable changes-check target for news fragments
stevepiercy Nov 1, 2026
4e1b8c8
Enable changes-check target for news fragments
stevepiercy Nov 1, 2026
2f4a294
Fix zizmor check
stevepiercy Nov 1, 2026
f12b248
news
stevepiercy Nov 1, 2026
9d5f599
Clean up `pyproject.toml` and add `tool.uv` configuration.
stevepiercy Nov 1, 2026
0e6864f
docs: clarify delete_event's old_state/new_state sentence
SashankBhamidi Nov 1, 2026
52a009f
Remove redundant news fragments check and rename
stevepiercy Nov 1, 2026
35a8246
Rewire towncrier check to changes-check target
stevepiercy Nov 1, 2026
4282185
Install uv for changes-check target
stevepiercy Nov 1, 2026
b94d4f4
quote opts
stevepiercy Nov 1, 2026
f213669
Fix comment paths
stevepiercy Nov 1, 2026
547bc10
Switch from pip to uv to lint and format code
stevepiercy Nov 1, 2026
2db8d98
Switch from pip to uv to run type checking and add new target to Make…
stevepiercy Nov 1, 2026
a6f017a
Switch from pip to uv to run tests with coverage
stevepiercy Nov 1, 2026
dfe4526
Add prerequisites to Contribute documentation.
stevepiercy Nov 2, 2026
572618a
- Add post-installation and uv to accept.txt
stevepiercy Nov 2, 2026
526ddb9
fix: restore Vale.Terms and uncomment project vocab, fixing CI
SashankBhamidi Nov 2, 2026
451102e
fix: dead requests extra, unmigrated integration CI, dropped -W, leak…
SashankBhamidi Nov 2, 2026
7cd24dc
fix: broken make targets, stale paths, wrong Sphinx role, and track u…
SashankBhamidi Nov 2, 2026
3c6312b
fix: anchor the private-base regex and guard against a non-string base
SashankBhamidi Nov 2, 2026
589eb98
docs: split the news/63 fragment per behavior and add the .rst extension
SashankBhamidi Nov 2, 2026
ba4ed98
Apply suggestion from @SashankBhamidi
SashankBhamidi Nov 2, 2026
a24aa28
docs: apply reviewer's news fragment prose suggestions
SashankBhamidi Nov 2, 2026
132a481
Merge branch 'makefile-docs-uv' of https://github.com/pycalendar/cale…
SashankBhamidi Nov 2, 2026
82ece5a
fix: revert pycalendar Open Collective link, it has no fiscal host yet
SashankBhamidi Nov 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# SPDX-FileCopyrightText: 2026 calendaring-jmap contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

name: Documentation build, check links, spelling, grammar, and style
on:
push:
branches:
- main
paths:
- 'docs/**'
# Build pull requests
pull_request:
paths:
- 'docs/**'
- 'Makefile'
- 'src/calendaring_jmap/*.py'
- 'src/calendaring_jmap/convert/*.py'
- 'src/calendaring_jmap/objects/*.py'
- '.github/workflows/documentation.yml'
- '.readthedocs.yaml'
- '.vale.ini'
- 'news/*.*'

jobs:
docs:
name: Documentation
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11', '3.14']
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
fetch-tags: true
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
persist-credentials: false

- name: Install uv
uses: astral-sh/setup-uv@4c58170a945e4e68ce3fc5b7af3d341d9b8c64ef # v10.3.3
with:
version: "0.13.6"

- name: Create Python virtual environment, install requirements
run: make .venv PYTHONVERSION=${{ matrix.python-version }}

- name: Build HTML documentation
run: make html PYTHONVERSION=${{ matrix.python-version }}

- name: Run vale
run: make vale VALEOPTS="--minAlertLevel='warning'" PYTHONVERSION=${{ matrix.python-version }}

- name: Check for broken links
run: make linkcheckbroken PYTHONVERSION=${{ matrix.python-version }}
12 changes: 4 additions & 8 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,10 @@ jobs:
persist-credentials: false
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
- name: Install uv
uses: astral-sh/setup-uv@4c58170a945e4e68ce3fc5b7af3d341d9b8c64ef # v10.3.3
with:
python-version: "3.13"
pip-version: "26.2.2"

- name: Install dependencies
run: pip install -e ".[dev]"
version: "0.13.6"

- name: Run integration tests
run: pytest src/calendaring_jmap/tests/test_jmap_integration.py
run: uv run pytest src/calendaring_jmap/tests/test_jmap_integration.py
108 changes: 18 additions & 90 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,13 @@ jobs:
persist-credentials: false
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
- name: Install uv
uses: astral-sh/setup-uv@4c58170a945e4e68ce3fc5b7af3d341d9b8c64ef # v10.3.3
with:
python-version: "3.13"
pip-version: "26.2.2"

- name: Install towncrier
run: pip install towncrier==26.9.0
version: "0.13.6"

- name: Check for a news fragment
run: towncrier check --compare-with origin/${GITHUB_BASE_REF}
run: make changes-check TOWNCRIEROPTS="--compare-with origin/${GITHUB_BASE_REF}"

lint:
name: Lint with Ruff
Expand All @@ -52,70 +48,13 @@ jobs:
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.13"
pip-version: "26.2.2"

- name: Install ruff
run: pip install ruff==0.16.6

- name: Lint code
run: ruff check .

- name: Check code format
run: ruff format --check .

vale:
name: Check docs prose with Vale
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.13"
pip-version: "26.2.2"

- name: Install docutils
run: pip install docutils==0.22.4

- name: Install Vale
run: |
curl -sL https://github.com/errata-ai/vale/releases/download/v3.24.0/vale_3.24.0_Linux_64-bit.tar.gz | tar -xz -C /usr/local/bin vale

- name: Sync Vale styles
run: vale sync

- name: Lint docs
run: vale --no-exit docs/

docs:
name: Build docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
- name: Install uv
uses: astral-sh/setup-uv@4c58170a945e4e68ce3fc5b7af3d341d9b8c64ef # v10.3.3
with:
python-version: "3.13"
pip-version: "26.2.2"
version: "0.13.6"

- name: Install dependencies
run: pip install -e ".[docs]"

- name: Build docs
run: sphinx-build -W -b html docs docs/_build/html
- name: Lint and format code
run: make format

mypy:
name: Type check with mypy
Expand All @@ -126,17 +65,13 @@ jobs:
with:
persist-credentials: false

- name: Set up Python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
- name: Install uv
uses: astral-sh/setup-uv@4c58170a945e4e68ce3fc5b7af3d341d9b8c64ef # v10.3.3
with:
python-version: "3.13"
pip-version: "26.2.2"

- name: Install dependencies
run: pip install -e ".[dev]"
version: "0.13.6"

- name: Type check
run: python -m mypy src/calendaring_jmap --ignore-missing-imports
run: make type-check

test:
name: Test on Python ${{ matrix.python-version }}
Expand All @@ -156,20 +91,13 @@ jobs:
persist-credentials: false
fetch-depth: 0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
- name: Install uv
uses: astral-sh/setup-uv@4c58170a945e4e68ce3fc5b7af3d341d9b8c64ef # v10.3.3
with:
python-version: ${{ matrix.python-version }}
pip-version: "26.2.2"

- name: Install dependencies
run: pip install -e ".[dev]"
version: "0.13.6"

- name: Run tests
run: |
pytest --cov --cov-branch --cov-report=xml \
--junitxml=junit.xml -o junit_family=legacy \
src/calendaring_jmap/tests/test_jmap_unit.py
- name: Run tests with coverage
run: make test-coverage

- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
Expand Down
15 changes: 4 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ htmlcov/
.mypy_cache/

# Virtual environments
.venv
venv/
ENV/
env/
/.venv/

# Environment variables
.env
Expand All @@ -62,12 +59,8 @@ env/
# Generated version file
src/calendaring_jmap/_version.py

# uv lock file
uv.lock

# Docs build (including comparison builds under other names, e.g. docs/_build2)
docs/_build*/
# Docs build
_build/

# Vale-synced third-party style packages (fetched by `vale sync`)
docs/.vale/styles/Microsoft/
docs/.vale/styles/signs-of-ai-writing/
/docs/styles/Microsoft/
42 changes: 25 additions & 17 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,28 @@ version: 2
build:
os: ubuntu-24.04
tools:
python: "3.12"
jobs:
post_checkout:
# sphinx-last-updated-by-git needs full history; RTD's default clone
# is shallow (depth 50), so a file untouched longer than that would
# otherwise show no last-updated date.
- git fetch --unshallow || true

sphinx:
configuration: docs/conf.py

python:
install:
- method: pip
path: .
extra_requirements:
- docs
python: "3.14"
commands:
# Cancel building pull requests when there aren't changes in the docs directory or YAML file.
# You can add any other files or directories that you'd like here as well,
# like your docs requirements file, or other files that will change your docs build.
#
# If there are no changes (git diff exits with 0) we force the command to return with 183.
# This is a special exit code on Read the Docs that will cancel the build immediately.
- |
if [ "$READTHEDOCS_VERSION_TYPE" = "external" ] && git diff --quiet origin/main -- . docs/ \
src/calendaring_jmap/**/*.py \
.github/workflows/documentation.yml \
.readthedocs.yml \
.vale.ini \
Makefile \
pyproject.toml \
':!src/calendaring_jmap/tests';
then
exit 183;
fi
# sphinx-last-updated-by-git needs full history; RTD's default clone
# is shallow (depth 50), so a file untouched longer than that would
# otherwise show no last-updated date.
- git fetch --unshallow || true
- make rtd-pr-preview
19 changes: 14 additions & 5 deletions .vale.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
# SPDX-FileCopyrightText: 2026 calendaring-jmap contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

StylesPath = docs/.vale/styles
Vocab = Base
StylesPath = docs/styles
MinAlertLevel = suggestion
Packages = Microsoft, https://github.com/ammil-industries/vale-signs-of-ai-writing/releases/download/v0.1.1/signs-of-ai-writing.zip
Vocab = Base, calendaring-jmap
Packages = Microsoft

[*.rst]
BasedOnStyles = Vale, Microsoft, signs-of-ai-writing, calendaring-jmap
Vale.Terms = NO
BasedOnStyles = Vale, Microsoft, calendaring-jmap
Microsoft.Contractions = suggestion
Microsoft.GeneralURL = NO
# Override Microsoft.Quotes to allow a single letter in quotes followed by punctuation.
# docs/styles/icalendar/Quotes.yml
Microsoft.Quotes = NO
Microsoft.Units = suggestion

# Ignore Sphinx Python object roles, such as ":class:" and ":meth:",
# to prevent false positives from Microsoft.Spacing on dotted Python names.
TokenIgnores = :[a-z]+:\x60.+\x60
Loading
Loading