Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
matrix:
# Keep in step with the `Programming Language :: Python` classifiers in
# pyproject.toml and with the same matrix in release.yml.
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down Expand Up @@ -47,13 +47,13 @@ jobs:
# including a one-file local run -- measure the whole package and fail. Now
# that addopts is clean, THIS job is where the floor is actually asserted;
# delete it and fail_under becomes a number nothing reads. `needs: test`
# keeps the failure legible: a broken test reports as a broken test on five
# Python versions, not as an under-coverage number here.
# keeps the failure legible: a broken test reports as a broken test on every
# Python version in the matrix, not as an under-coverage number here.
#
# One version, not the matrix: coverage of this package does not vary by
# interpreter (there is no version-gated code), so five runs would produce
# five identical percentages, five uploads, and a Codecov report whose
# totals depend on which one landed last.
# interpreter (there is no version-gated code), so one run per matrix entry
# would produce identical percentages, one upload each, and a Codecov
# report whose totals depend on which one landed last.
needs: test
runs-on: ubuntu-latest
steps:
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@ jobs:
fail-fast: false
matrix:
# Mirrors ci.yml and the `Programming Language :: Python` classifiers in
# pyproject.toml. requires-python is >=3.10; the upper end is bounded by
# pyproject.toml. requires-python is >=3.11; the upper end is bounded by
# what the suite is verified on, not by anything in the code. The
# generated-_sync/ gate is the reason a new interpreter is not just
# added on faith: it is a byte-equality check whose output comes from
# tokenize-rt re-tokenizing the source, so a tokenizer change can fail
# it on one version alone. The suite and that gate were both run on
# 3.13.14 and 3.14.6 before either was listed here (600 passed, same
# coverage as 3.10, _sync/ regenerated identical under both).
# 3.13.14 and 3.14.6 before either was listed here (600 passed, the
# same coverage as 3.10 then gave, _sync/ regenerated identical under
# both).
# These entries are minor versions, not pinned patches: setup-python
# resolves a bare "3.14" to the newest STABLE 3.14.x and never to a
# pre-release, which needs allow-prereleases.
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.11", "3.12", "3.13", "3.14"]

steps:
- name: Check out repository
Expand All @@ -59,8 +60,9 @@ jobs:
# than left to skip on absent credentials, so a leaked secret could not
# make a release run go live. --strict-markers/--strict-config must be
# passed here, not in addopts, where pytest 9 silently ignores them.
# Coverage runs implicitly: --cov lives in pyproject's addopts and
# [tool.coverage.report] fail_under = 95 gates it.
# This job does not gate coverage: pyproject has no addopts, so no
# --cov runs here. In CI the 95% floor is enforced only by ci.yml's
# `coverage` job, and locally by the pre-push hook.
- name: Run tests
run: python -m pytest -m "not integration" --strict-markers --strict-config

Expand Down Expand Up @@ -135,10 +137,10 @@ jobs:
# easyvista_python_client.__version__ -- and the git tag is a third. PyPI
# takes whatever pyproject says, so a tag that disagrees publishes a
# release nobody can find by version, and a __version__ that disagrees
# misreports at runtime. Both are unfixable after upload. The repo's only
# existing tag, 0.1.0, is UNPREFIXED; v-prefixing starts at v0.2.0. The
# leading v is therefore stripped before comparing, so both forms
# validate.
# misreports at runtime. Both are unfixable after upload. Every tag so
# far (0.1.0, 0.2.0, 0.3.0) is unprefixed, as CHANGELOG.md says tags
# are. A leading v is still stripped before comparing, as a tolerance,
# so a v-prefixed tag validates too.
- name: Validate release tag matches package version
if: github.event_name == 'release'
shell: bash
Expand All @@ -149,10 +151,7 @@ jobs:
normalized_tag="${release_tag#v}"
pyproject_version="$(python - <<'PY'
from pathlib import Path
try:
from tomllib import loads as toml_loads
except ModuleNotFoundError:
from tomli import loads as toml_loads
from tomllib import loads as toml_loads

pyproject = toml_loads(Path('pyproject.toml').read_text(encoding='utf-8'))
print(pyproject['project']['version'])
Expand Down
20 changes: 19 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,25 @@ repos:
rev: v2.3.0
hooks:
- id: mypy
additional_dependencies: ["pydantic>=2.8", "httpx", "tenacity"]
# The runtime dependencies, then the TYPED packages of the `content`
# extra. The hook's venv holds only this list, so without those four
# every converter base class (MarkdownConverter, MDRenderer,
# RenderTreeNode, MarkdownIt) resolves to Any and strict mode's
# disallow_subclassing_any fails content/conversion.py even though
# `mypy easyvista_python_client` in CI is clean. The extra's other two,
# cmarkgfm and mdformat-tables, ship no type information, so they are
# Any either way and are left out; cmarkgfm would also make every
# contributor without a wheel for their platform compile it before
# any commit. Each line here must equal the extra's requirement in
# pyproject; testing/test_public_api.py fails if one drifts.
additional_dependencies:
- "pydantic>=2.8"
- "httpx"
- "tenacity"
- "beautifulsoup4>=4.15"
- "markdown-it-py>=3.0,<4"
- "markdownify>=1.2.3,<1.3"
- "mdformat>=0.7.22,<0.8"
# Must mirror [tool.mypy] exclude in pyproject.toml. pre-commit passes
# filenames explicitly, and mypy ignores its own `exclude` for files named
# on the command line -- so this regex is the ONLY thing keeping the hook
Expand Down
Loading
Loading