Skip to content

Commit ea41b7a

Browse files
committed
add lock and update workflows
1 parent afdda2f commit ea41b7a

5 files changed

Lines changed: 483 additions & 25 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
11
name: CI
22

3-
on:
4-
push:
5-
branches: ["main"]
6-
pull_request:
7-
branches: ["main"]
8-
3+
on: [push, pull_request]
94
jobs:
105
test:
116
runs-on: ubuntu-latest
127
strategy:
138
matrix:
14-
python-version: ["3.13"]
9+
python-version:
10+
- "3.13"
11+
- "3.14"
1512

1613
steps:
17-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v6
1815

19-
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v5
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v7
2118
with:
19+
version: "0.10.7"
2220
python-version: ${{ matrix.python-version }}
21+
enable-cache: true
2322

24-
- name: Install dependencies
25-
run: |
26-
python -m pip install --upgrade pip
27-
pip install ".[test,lint]"
23+
- name: Sync dependencies
24+
run: uv sync --locked --all-extras --dev
2825

2926
- name: Lint with pylint
30-
run: pylint tind_client/
27+
run: uv run pylint tind_client tests
3128

3229
- name: Type-check with mypy
33-
run: mypy tind_client/
30+
run: uv run mypy tind_client tests
3431

3532
- name: Run tests
36-
run: pytest
33+
run: uv run pytest

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- Implemented TINDClient to wrap API interactions
1414

1515
### Changed
16-
- N/A
16+
- updates to workflow actions and pyproject.toml
1717

1818
### Deprecated
1919
- N/A

pyproject.toml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,19 @@ testpaths = ["tests"]
4444

4545
[tool.mypy]
4646
python_version = "3.13"
47-
strict = true
47+
warn_unused_configs = true
48+
warn_redundant_casts = true
49+
warn_return_any = true
50+
strict_equality = true
51+
check_untyped_defs = true
52+
disallow_subclassing_any = true
53+
# We can't enable disallow_untyped_calls because of PyMARC.
54+
disallow_untyped_calls = false
55+
disallow_incomplete_defs = true
56+
disallow_untyped_defs = true
4857

49-
[tool.pylint.main]
50-
py-version = "3.13"
58+
[tool.pydoclint]
59+
allow-init-docstring = true
60+
skip-checking-raises = true
61+
style = "sphinx"
5162

52-
[tool.pylint.messages_control]
53-
disable = ["C0114"] # missing-module-docstring — already covered by file-level docstrings

tind_client/fetch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def fetch_metadata(record: str, *, api_key: str, api_url: str) -> Record:
3535
if status == 404 or len(response.strip()) == 0:
3636
raise RecordNotFoundError(f"Record {record} not found in TIND.")
3737

38-
records: list[Record] = parse_xml_to_array(StringIO(response)) # type: ignore[no-untyped-call]
38+
records: list[Record] = parse_xml_to_array(StringIO(response))
3939
# When the record does not match any records, we may receive a zero-length array of records.
4040
# Additionally, if the XML is malformed, the parser function may return multiple records.
4141
# We need to ensure that exactly one record is parsed out of the TIND API response.
@@ -232,7 +232,7 @@ def search(
232232
records = list(collection) if collection is not None else []
233233

234234
if result_format == "pymarc":
235-
recs = recs + parse_xml_to_array(StringIO(response)) # type: ignore[no-untyped-call]
235+
recs = recs + parse_xml_to_array(StringIO(response))
236236
else:
237237
for record in records:
238238
recs.append(E.tostring(record, encoding="unicode"))

0 commit comments

Comments
 (0)