Skip to content

Commit 1930f04

Browse files
authored
Merge pull request #160 from lsst-sqre:tickets/DM-45676
DM-45676: Update repo infrastructure
2 parents a542c17 + 1bac26f commit 1930f04

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1129
-1225
lines changed

.github/workflows/ci.yaml

+24-22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: CI
22

3+
env:
4+
PYTHON_VERSION: "3.12"
5+
36
"on":
47
merge_group: {}
58
pull_request: {}
@@ -21,41 +24,39 @@ jobs:
2124
lint:
2225

2326
runs-on: ubuntu-latest
27+
timeout-minutes: 15
2428

2529
steps:
2630
- uses: actions/checkout@v4
2731

2832
- name: Set up Python
29-
uses: actions/setup-python@v4
33+
uses: actions/setup-python@v5
3034
with:
31-
python-version: "3.11"
35+
python-version: ${{ env.PYTHON_VERSION }}
3236

3337
- name: Run pre-commit
34-
uses: pre-commit/action@v3.0.0
38+
uses: pre-commit/action@v3.0.1
3539

3640
test:
3741
runs-on: ubuntu-latest
38-
39-
strategy:
40-
matrix:
41-
python:
42-
- "3.11"
42+
timeout-minutes: 15
4343

4444
steps:
4545
- uses: actions/checkout@v4
4646

4747
- name: Set up Python
4848
uses: actions/setup-python@v4
4949
with:
50-
python-version: "3.11"
51-
52-
- name: Install nox
53-
run: |
54-
pip install --upgrade pip
55-
pip install --upgrade nox
50+
python-version: ${{ env.PYTHON_VERSION }}
5651

5752
- name: Run nox
58-
run: "nox -s typing test"
53+
uses: lsst-sqre/run-nox@v1
54+
with:
55+
cache-dependency: "requirements/*.txt"
56+
cache-key-prefix: test
57+
nox-sessions: "typing test"
58+
python-version: ${{ env.PYTHON_VERSION }}
59+
nox-package: "nox[uv] testcontainers[kafka]"
5960

6061
docs:
6162
runs-on: ubuntu-latest
@@ -76,15 +77,16 @@ jobs:
7677
- name: Set up Python
7778
uses: actions/setup-python@v4
7879
with:
79-
python-version: "3.11"
80-
81-
- name: Install nox
82-
run: |
83-
pip install --upgrade pip
84-
pip install --upgrade nox
80+
python-version: ${{ env.PYTHON_VERSION }}
8581

8682
- name: Run nox
87-
run: "nox -s docs"
83+
uses: lsst-sqre/run-nox@v1
84+
with:
85+
cache-dependency: "requirements/*.txt"
86+
cache-key-prefix: docs
87+
nox-sessions: "docs"
88+
python-version: ${{ env.PYTHON_VERSION }}
89+
nox-package: "nox[uv] testcontainers[kafka]"
8890

8991
# Only attempt documentation uploads for long-lived branches, tagged
9092
# releases, and pull requests from ticket branches. This avoids version

.github/workflows/dependencies.yaml

-33
This file was deleted.

.github/workflows/periodic-ci.yaml

+13-18
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
name: Periodic CI
77

8+
env:
9+
PYTHON_VERSION: "3.12"
10+
811
"on":
912
schedule:
1013
- cron: "0 12 * * 1"
@@ -15,30 +18,22 @@ jobs:
1518
runs-on: ubuntu-latest
1619
timeout-minutes: 10
1720

18-
strategy:
19-
matrix:
20-
python:
21-
- "3.11"
22-
2321
steps:
2422
- uses: actions/checkout@v4
2523

26-
# Use the oldest supported version of Python to update dependencies,
27-
# not the matrixed Python version, since this accurately reflects
28-
# how dependencies should later be updated.
29-
- name: Run neophile
30-
uses: lsst-sqre/run-neophile@v1
24+
- name: Update dependencies
25+
uses: lsst-sqre/run-nox@v1
3126
with:
32-
python-version: "3.11"
33-
mode: update
34-
35-
- name: Install nox
36-
run: |
37-
pip install --upgrade pip
38-
pip install --upgrade nox
27+
nox-sessions: "update-deps"
28+
python-version: ${{ env.PYTHON_VERSION }}
3929

4030
- name: Run nox
41-
run: "nox -s typing test docs"
31+
uses: lsst-sqre/run-nox@v1
32+
with:
33+
nox-sessions: "typing test docs"
34+
python-version: ${{ env.PYTHON_VERSION }}
35+
use-cache: false
36+
nox-package: "nox[uv] testcontainers[kafka]"
4237

4338
- name: Report status
4439
if: always()

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.5.0
3+
rev: v4.6.0
44
hooks:
55
- id: trailing-whitespace
66
- id: check-yaml
@@ -11,12 +11,12 @@ repos:
1111
args: [--autofix, --indent=2, '--top-keys=name,doc,type']
1212

1313
- repo: https://github.com/charliermarsh/ruff-pre-commit
14-
rev: v0.0.290
14+
rev: v0.5.7
1515
hooks:
1616
- id: ruff
1717
args: [--fix, --exit-non-zero-on-fix]
1818

1919
- repo: https://github.com/psf/black
20-
rev: 23.11.0
20+
rev: 24.8.0
2121
hooks:
2222
- id: black

CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22

33
<!-- scriv-insert-here -->
44

5+
<a id='changelog-0.10.0'></a>
6+
## 0.10.0 (2024-08-14)
7+
8+
### New features
9+
10+
- Ook now uses [faststream](https://faststream.airt.ai/latest/) for managing its Kafka consumer and producer. This is also how the Squarebot ecosystem operates. With this change, Ook no longer uses the Confluent Schema Registry. Schemas are instead developed as Pydantic models.
11+
12+
### Other changes
13+
14+
- Use `uv` for installing and compiling dependencies in `noxfile.py`.
15+
- Update GitHub Actions workflows to use the [lsst-sqre/run-nox](https://github.com/lsst-sqre/run-nox) GitHub Action.
16+
- Adopt `ruff-shared.toml` for shared Ruff configuration (from https://github.com/lsst/templates)
17+
- Update Docker base to Python 3.12.5-slim-bookworm.
18+
- Switch to [testcontainers](https://testcontainers.com) for running Kafka during test sessions. The Kafka brokers is automatically started by the `nox` sessions.
19+
520
<a id='changelog-0.9.1'></a>
621
## 0.9.1 (2024-01-29)
722

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# - Runs a non-root user.
1515
# - Sets up the entrypoint and port.
1616

17-
FROM python:3.11.5-slim-bullseye as base-image
17+
FROM python:3.12.5-slim-bookworm as base-image
1818

1919
# Update system packages
2020
COPY scripts/install-base-packages.sh .

docker-compose.yaml

-47
This file was deleted.

docs/documenteer.toml

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ nitpick_ignore = [
5050
["py:class", "starlette.routing.Route"],
5151
["py:class", "starlette.routing.BaseRoute"],
5252
["py:exc", "starlette.exceptions.HTTPException"],
53+
["py:class", "pydantic_settings.sources.CliSettingsSource"],
5354
]
5455

5556
[sphinx.intersphinx.projects]

docs/user-guide/configuration-reference.rst

-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,3 @@ Configuration reference
66

77
.. autopydantic_settings:: ook.config.KafkaConnectionSettings
88

9-
.. autoclass:: kafkit.settings.KafkaSecurityProtocol
10-
11-
.. autoclass:: kafkit.settings.KafkaSaslMechanism

0 commit comments

Comments
 (0)