Skip to content

Commit b346f03

Browse files
committed
CI and doc improvements
1 parent 1bd560e commit b346f03

File tree

6 files changed

+56
-322
lines changed

6 files changed

+56
-322
lines changed

.coderabbit.yaml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
language: "en-US"
33
early_access: true
44
reviews:
5-
profile: "pythonic"
5+
profile: "assertive"
66
request_changes_workflow: true
77
high_level_summary: true
88
poem: false
@@ -11,11 +11,7 @@ reviews:
1111
auto_review:
1212
enabled: true
1313
drafts: false
14-
auto_fix:
15-
enabled: true
16-
include_imports: true
17-
include_type_hints: true
18-
include_security_fixes: true
14+
1915
path_filters:
2016
- "!tests/**/cassettes/**"
2117
path_instructions:

.github/workflows/ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,17 @@ jobs:
6161
# pdm run coverage xml
6262
# continue-on-error: true
6363

64+
- name: Check for coverage report
65+
id: coverage_check
66+
run: |
67+
if [ -f coverage.xml ]; then
68+
echo "coverage_generated=true" >> "$GITHUB_OUTPUT"
69+
else
70+
echo "coverage_generated=false" >> "$GITHUB_OUTPUT"
71+
fi
72+
6473
- name: Upload coverage artifact
65-
if: matrix.python-version == '3.11'
74+
if: matrix.python-version == '3.11' && steps.coverage_check.outputs.coverage_generated == 'true'
6675
uses: actions/upload-artifact@v4
6776
with:
6877
name: coverage-xml

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ repos:
3636
hooks:
3737
- id: mypy
3838
name: mypy type checking
39-
entry: .venv/bin/pdm run mypy garminconnect tests
39+
entry: pdm run mypy garminconnect tests
4040
types: [python]
4141
language: system
4242
pass_filenames: false

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ pdm install --group :all
210210
```
211211

212212
**Run Tests:**
213+
213214
```bash
214215
pdm run test # Run all tests
215216
pdm run testcov # Run tests with coverage report
@@ -232,6 +233,7 @@ pdm run test
232233
For package maintainers:
233234

234235
**Setup PyPI credentials:**
236+
235237
```bash
236238
pip install twine
237239
# Edit with your preferred editor, or create via here-doc:
@@ -241,6 +243,7 @@ pip install twine
241243
# password = <PyPI_API_TOKEN>
242244
# EOF
243245
```
246+
244247
```ini
245248
[pypi]
246249
username = __token__
@@ -256,11 +259,13 @@ export TWINE_PASSWORD="<PyPI_API_TOKEN>"
256259
```
257260

258261
**Publish new version:**
262+
259263
```bash
260264
pdm run publish # Build and publish to PyPI
261265
```
262266

263267
**Alternative publishing steps:**
268+
264269
```bash
265270
pdm run build # Build package only
266271
pdm publish # Publish pre-built package

0 commit comments

Comments
 (0)