Skip to content

Commit

Permalink
Merge branch 'main' into use-github-attestations
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon committed May 22, 2024
2 parents 36244e4 + 6ce6491 commit 27951b3
Show file tree
Hide file tree
Showing 11 changed files with 271 additions and 198 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
- [ ] I have read the [CONTRIBUTING] guide.
- [ ] I have added tests that prove my fix is effective or that my feature works.
- [ ] If appropriate, I have added necessary documentation.
- [ ] For user-facing changes, refactorings, performance improvements or documentation updates, I have added a changelog entry using the [Changie] tool.
- [ ] For user-facing changes, refactorings, performance improvements or documentation updates, I have added a changelog entry using [Changie].

For both the title of the PR and the changelog entry, prefer simple past tense or constructions with "now". For example:

Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ env:

jobs:
tests:
name: "Test ${{ matrix.python-version }}/ ${{ matrix.os }}"
name: "Test ${{ matrix.python-version }} ${{ matrix.nightly && '(nightly) ' || '' }}/ ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental || false }}
env:
Expand All @@ -60,13 +60,15 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "pypy3.10"
os: ["ubuntu-latest"]
include:
- python-version: "3.13"
- python-version: "3.14"
os: "ubuntu-latest"
session: "tests"
experimental: true
nightly: true

- python-version: "3.12"
os: "windows-latest"
Expand All @@ -83,6 +85,7 @@ jobs:
fetch-tags: true

- name: Setup Python ${{ matrix.python-version }}
if: "${{ !matrix.nightly }}"
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: ${{ matrix.python-version }}
Expand All @@ -93,6 +96,12 @@ jobs:
pyproject.toml
.github/workflows/constraint.txt
- name: Setup Python ${{ matrix.python-version }} (nightly)
if: "${{ matrix.nightly }}"
uses: deadsnakes/action@241105c567c5b7600b24062b638324ff3ae8f4cd
with:
python-version: "${{ matrix.python-version }}-dev"

- name: Install tools
uses: ./.github/actions/install-tools

Expand Down Expand Up @@ -136,7 +145,8 @@ jobs:
cache: pip
cache-dependency-path: |
pyproject.toml
.github/workflows/constraint.txt
requirements/*.txt
.github/workflows/constraints.txt
- name: Install tools
uses: ./.github/actions/install-tools
Expand Down
14 changes: 10 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.3
rev: 0.28.4
hooks:
- id: check-dependabot
- id: check-github-workflows
Expand Down Expand Up @@ -66,14 +66,20 @@ repos:
args: [--all]

- repo: https://github.com/tox-dev/pyproject-fmt
rev: "1.8.0"
rev: "2.1.3"
hooks:
- id: pyproject-fmt

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.1.42
rev: 0.1.45
hooks:
- id: pip-compile
files: ^pyproject\.toml$
args: ["pyproject.toml", "--extra", "docs", "-o", "docs/requirements.txt"]
args: ["pyproject.toml", "--pre", "--python-version", "3.12", "--extra", "docs", "-o", "docs/requirements.txt"]
language_version: python3.12
- id: pip-compile
files: ^pyproject\.toml$
args: ["pyproject.toml", "--resolution", "highest", "-o", "requirements/requirements-highest.txt"]
- id: pip-compile
files: ^pyproject\.toml$
args: ["pyproject.toml", "--resolution", "lowest-direct", "-o", "requirements/requirements-lowest-direct.txt"]
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,11 @@ If you'd like to contribute to this project, please see the [contributing guide]

## Credits

- The [LimeSurvey][limesurvey-site] team for providing a great survey platform.
- [Markus Opolka][martialblog] for maintaining a very robust set of [LimeSurvey Docker images](https://github.com/martialblog/docker-limesurvey/).
- [Claudio Jolowicz][claudio] and [his amazing blog post][hypermodern].

[claudio]: https://twitter.com/cjolowicz/
[hypermodern]: https://cjolowicz.github.io/posts/hypermodern-python-01-setup/
[limesurvey-site]: https://www.limesurvey.org/
[martialblog]: https://github.com/martialblog/
2 changes: 1 addition & 1 deletion code_samples/duckdb_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

# ruff: noqa: I001, PTH123
# ruff: noqa: I001, PTH123, FURB103

# start example
from pathlib import Path
Expand Down
13 changes: 6 additions & 7 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ Release **v{sub-ref}`version`**. ([What's new?](./changelog.md))

Integration tests are run against a LimeSurvey instance, and both PostgreSQL and MySQL backends, using Docker Compose. The following versions of LimeSurvey were tested for this release:

- {ls_tag}`6.4.5+240205`
- {ls_tag}`6.4.4+240130`
- {ls_tag}`6.4.3+240122`
- {ls_tag}`6.4.2+240115`
- {ls_tag}`5.6.53+240131`
- {ls_tag}`5.6.52+240123`
- {ls_tag}`5.6.51+240116`
- {ls_tag}`6.5.3+240415`
- {ls_tag}`6.5.1+240320`
- {ls_tag}`6.5.0+240319`
- {ls_tag}`5.6.59+240416`
- {ls_tag}`5.6.57+240312`
- {ls_tag}`5.6.56+240227`

But also, the latest 5.x and 6.x are tested continuously and are expected to work.

Expand Down
70 changes: 48 additions & 22 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,52 +1,62 @@
# This file was autogenerated by uv via the following command:
# uv pip compile pyproject.toml --extra docs -o docs/requirements.txt
# uv pip compile pyproject.toml --pre --python-version 3.12 --extra docs -o docs/requirements.txt
alabaster==0.7.16
# via sphinx
anyascii==0.3.2
# via sphinx-autoapi
astroid==3.1.0
anyio==4.3.0
# via
# starlette
# watchfiles
astroid==3.2.1
# via sphinx-autoapi
autodocsumm==0.2.12
babel==2.14.0
# via citric (pyproject.toml)
babel==2.15.0
# via sphinx
beautifulsoup4==4.12.3
beautifulsoup4==4.13.0b2
# via furo
certifi==2024.2.2
# via requests
charset-normalizer==3.3.2
# via requests
click==8.1.7
# via uvicorn
colorama==0.4.6
# via sphinx-autobuild
docutils==0.20.1
docutils==0.21.2
# via
# citric (pyproject.toml)
# myst-parser
# sphinx
furo==2024.1.29
furo==2024.5.6
# via citric (pyproject.toml)
h11==0.14.0
# via uvicorn
idna==3.7
# via requests
# via
# anyio
# requests
imagesize==1.4.1
# via sphinx
jinja2==3.1.4
# via
# myst-parser
# sphinx
# sphinx-autoapi
livereload==2.6.3
# via sphinx-autobuild
markdown-it-py==3.0.0
# via
# mdit-py-plugins
# myst-parser
markupsafe==2.1.5
# via jinja2
mdit-py-plugins==0.4.0
mdit-py-plugins==0.4.1
# via myst-parser
mdurl==0.1.2
# via markdown-it-py
myst-parser==2.0.0
myst-parser==3.0.1
# via citric (pyproject.toml)
packaging==24.0
# via sphinx
pygments==2.17.2
pygments==2.18.0
# via
# furo
# sphinx
Expand All @@ -55,15 +65,18 @@ pyyaml==6.0.1
# myst-parser
# sphinx-autoapi
requests==2.31.0
# via sphinx
six==1.16.0
# via livereload
# via
# citric (pyproject.toml)
# sphinx
sniffio==1.3.1
# via anyio
snowballstemmer==2.2.0
# via sphinx
soupsieve==2.5
# via beautifulsoup4
sphinx==7.2.6
sphinx==7.3.7
# via
# citric (pyproject.toml)
# autodocsumm
# furo
# myst-parser
Expand All @@ -74,13 +87,18 @@ sphinx==7.2.6
# sphinx-hoverxref
# sphinx-notfound-page
# sphinxcontrib-jquery
sphinx-autoapi==3.0.0
sphinx-autobuild==2024.2.4
sphinx-autoapi==3.1.0b0
# via citric (pyproject.toml)
sphinx-autobuild==2024.4.16
# via citric (pyproject.toml)
sphinx-basic-ng==1.0.0b2
# via furo
sphinx-copybutton==0.5.2
# via citric (pyproject.toml)
sphinx-hoverxref==1.3.0
# via citric (pyproject.toml)
sphinx-notfound-page==1.0.0
# via citric (pyproject.toml)
sphinxcontrib-applehelp==1.0.8
# via sphinx
sphinxcontrib-devhelp==1.0.6
Expand All @@ -95,7 +113,15 @@ sphinxcontrib-qthelp==1.0.7
# via sphinx
sphinxcontrib-serializinghtml==1.1.10
# via sphinx
tornado==6.4
# via livereload
starlette==0.37.2
# via sphinx-autobuild
typing-extensions==4.12.0rc1
# via beautifulsoup4
urllib3==2.2.1
# via requests
uvicorn==0.29.0
# via sphinx-autobuild
watchfiles==0.21.0
# via sphinx-autobuild
websockets==12.0
# via sphinx-autobuild
25 changes: 20 additions & 5 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@
GH_ACTIONS_ENV_VAR = "GITHUB_ACTIONS"
FORCE_COLOR = "FORCE_COLOR"

nox.options.default_venv_backend = "uv"
nox.options.sessions = [
"tests",
"xdoctest",
"deps",
"mypy",
"docs-build",
"api",
]
nox.needs_version = ">=2024.4.15"
nox.options.default_venv_backend = "uv|virtualenv"

package = "citric"

Expand All @@ -20,7 +29,7 @@
all_python_versions = python_versions + pypy_versions

main_cpython_version = "3.12"
main_pypy_version = "pypy3.9"
main_pypy_version = "pypy3.10"

locations = "src", "tests", "noxfile.py", "docs/conf.py"

Expand All @@ -34,10 +43,16 @@ def _run_tests(session: nox.Session, *args: str) -> None:
session.notify("coverage", posargs=[])


@nox.session(python=all_python_versions, tags=["test"])
def tests(session: nox.Session) -> None:
@nox.session(python=python_versions, tags=["test"])
@nox.parametrize("constraints", ["highest", "lowest-direct"])
def tests(session: nox.Session, constraints: str) -> None:
"""Execute pytest tests and compute coverage."""
session.install("-v", "citric[tests] @ .")
session.install(
"-v",
"citric[tests] @ .",
"-c",
f"requirements/requirements-{constraints}.txt",
)
args = session.posargs or ["-m", "not integration_test"]
_run_tests(session, *args)

Expand Down

0 comments on commit 27951b3

Please sign in to comment.