Skip to content
This repository was archived by the owner on Dec 11, 2024. It is now read-only.

Commit e2011d8

Browse files
authored
Maintenance updates (#23)
* pre-commit autoupdate * updated ruff configurations * update read the docs python version * show line number in documentation * added version bounds * updated dependabot configuration * bump version * change workflow run conditions * added operating system tag * increased number of parallel matrix jobs * Revert "update read the docs python version" This reverts commit cc0cfee. * fixed typo * Revert "fixed typo" This reverts commit 5142d99. * debug commit * added dispatch support * configure codecov * debug commit * revert debug commits
1 parent 12c503d commit e2011d8

15 files changed

Lines changed: 112 additions & 72 deletions

File tree

.github/dependabot.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,23 @@ updates:
33
- package-ecosystem: pip
44
directory: /
55
schedule:
6-
interval: daily
6+
interval: monthly
77
commit-message:
8-
prefix: "[Dependabot]"
8+
prefix: "[Dependabot] [PIP]"
99
include: "scope"
1010
labels:
1111
- maintenance
12+
- bump-pip
1213
- package-ecosystem: github-actions
1314
directory: /
1415
schedule:
15-
interval: daily
16+
interval: weekly
17+
day: sunday
18+
time: 00:00
19+
timezone: Asia/Calcutta
1620
commit-message:
17-
prefix: "[Dependabot]"
21+
prefix: "[Dependabot] [GHA]"
1822
include: "scope"
1923
labels:
2024
- maintenance
25+
- bump-gha

.github/workflows/format.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
name: format-workflow-name
22
run-name: format workflow run name
3-
on:
4-
pull_request:
5-
branches:
6-
- main
7-
types:
8-
- opened
9-
- synchronize
3+
on: workflow_dispatch
104
defaults:
115
run:
126
shell: bash

.github/workflows/lint.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
name: lint-workflow-name
22
run-name: lint workflow run name
3-
on:
4-
pull_request:
5-
branches:
6-
- main
7-
types:
8-
- opened
9-
- synchronize
3+
on: workflow_dispatch
104
defaults:
115
run:
126
shell: bash

.github/workflows/pre-commit.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
name: pre-commit-workflow-name
22
run-name: pre-commit workflow run name
3-
on: push
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
types:
8+
- opened
9+
- synchronize
10+
push:
11+
branches:
12+
- main
13+
workflow_dispatch:
414
defaults:
515
run:
616
shell: bash

.github/workflows/test.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
name: test-workflow-name
22
run-name: test workflow run name
33
on:
4-
pull_request:
5-
branches:
6-
- main
4+
workflow_dispatch:
5+
workflow_run:
6+
workflows:
7+
- pre-commit-workflow-name
78
types:
8-
- opened
9-
- synchronize
10-
push:
11-
branches:
12-
- main
9+
- completed
1310
defaults:
1411
run:
1512
shell: bash
1613
jobs:
1714
test-job-identifier:
15+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1816
name: test job name
1917
strategy:
2018
fail-fast: false
@@ -27,7 +25,7 @@ jobs:
2725
- "3.10"
2826
- "3.11"
2927
- "3.12"
30-
max-parallel: 2
28+
max-parallel: 5
3129
runs-on: ${{ matrix.runner-platform }}
3230
steps:
3331
- name: checkout commit
@@ -49,4 +47,4 @@ jobs:
4947
with:
5048
token: ${{ secrets.CODECOV_TOKEN }}
5149
files: coverage_xml_report.xml
52-
flags: ${{ matrix.python-version }}
50+
flags: ${{ matrix.python-version }},${{ matrix.runner-platform }}

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ repos:
4242
- src
4343
pass_filenames: false
4444
- repo: https://github.com/psf/black
45-
rev: 23.9.1
45+
rev: 23.10.1
4646
hooks:
4747
- id: black
4848
args:
@@ -68,7 +68,7 @@ repos:
6868
- src
6969
pass_filenames: false
7070
- repo: https://github.com/pre-commit/mirrors-mypy
71-
rev: v1.5.1
71+
rev: v1.6.1
7272
hooks:
7373
- id: mypy
7474
additional_dependencies:
@@ -88,14 +88,14 @@ repos:
8888
stages:
8989
- manual
9090
- repo: https://github.com/RobertCraigie/pyright-python
91-
rev: v1.1.330.post0
91+
rev: v1.1.332
9292
hooks:
9393
- id: pyright
9494
pass_filenames: false
9595
stages:
9696
- manual
9797
- repo: https://github.com/charliermarsh/ruff-pre-commit
98-
rev: v0.0.292
98+
rev: v0.1.1
9999
hooks:
100100
- id: ruff
101101
args:
@@ -146,7 +146,7 @@ repos:
146146
hooks:
147147
- id: pyproject-fmt
148148
- repo: https://github.com/abravalheri/validate-pyproject
149-
rev: v0.14
149+
rev: v0.15
150150
hooks:
151151
- id: validate-pyproject
152152
- repo: https://github.com/codespell-project/codespell

codecov.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
codecov:
2+
require_ci_to_pass: true
3+
coverage:
4+
status:
5+
project:
6+
default:
7+
target: 80%
8+
ignore:
9+
- "**/tests/*.py"
10+
comment:
11+
layout: "reach, flags"
12+
behavior: new

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
todo_include_todos = True
6464

6565
viewcode_follow_imported_members = True
66+
viewcode_line_numbers = True
6667

6768
copybutton_prompt_text = r">>> |\.\.\. |\$ "
6869
copybutton_prompt_is_regexp = True

pyproject.toml

Lines changed: 57 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ requires = [
66

77
[project]
88
name = "package-name-to-install-with"
9-
version = "0.0.2"
9+
version = "0.0.3"
1010
description = "A small example package"
1111
keywords = [
1212
"development",
@@ -53,8 +53,8 @@ dynamic=[
5353
"readme",
5454
]
5555
dependencies = [
56-
"pydantic",
57-
"PySimpleGUI",
56+
"pydantic<3,>=2.4.2",
57+
"PySimpleGUI<4.61,>=4.60.4",
5858
]
5959
[project.optional-dependencies]
6060
all = [
@@ -181,53 +181,76 @@ extend-exclude = [
181181
]
182182
fix = true
183183
ignore = [
184-
"ANN401",
184+
"COM",
185185
"D203",
186186
"D213",
187+
"DTZ",
188+
"EM",
189+
"FBT",
190+
"FIX",
191+
"G",
192+
"ICN",
193+
"PD",
194+
"RET501",
195+
"RET502",
196+
"RET503",
197+
"RET504",
198+
"SLF",
187199
"TRY003",
188200
]
189201
ignore-init-module-imports = true
190202
line-length = 99
191203
output-format = "grouped"
192204
select = [
193-
"F",
194-
"E",
195-
"W",
196-
"C90",
197-
"I",
198-
"N",
199-
"D",
200-
"UP",
201-
"ANN",
202-
"S",
203-
"B",
204-
"A",
205-
"C4",
206-
"T10",
207-
"ISC",
208-
"G",
209-
"T20",
210-
"PT",
211-
"Q",
212-
"SIM",
213-
"TID",
214-
"ERA",
215-
"PD",
216-
"PGH",
217-
"PL",
218-
"TRY",
219-
"RUF",
205+
"ALL",
220206
]
221207
src = [
222208
"src",
223209
]
224210
target-version = "py310"
225211

212+
[tool.ruff.flake8-annotations]
213+
allow-star-arg-any = true
214+
ignore-fully-untyped = true
215+
216+
[tool.ruff.flake8-bugbear]
217+
extend-immutable-calls = [
218+
"fastapi.Depends",
219+
"fastapi.Query",
220+
]
221+
222+
[tool.ruff.flake8-type-checking]
223+
exempt-modules = [
224+
"typing",
225+
"typing_extensions",
226+
]
227+
runtime-evaluated-base-classes = [
228+
"pydantic.BaseModel",
229+
]
230+
231+
[tool.ruff.pep8-naming]
232+
classmethod-decorators = ["pydantic.field_validator"]
233+
226234
[tool.ruff.per-file-ignores]
235+
"**/__init__.py" = [
236+
"F401",
237+
]
227238
"**/test_*.py" = [
228239
"S101",
229240
]
230241

242+
[tool.ruff.pycodestyle]
243+
max-doc-length = 99
244+
245+
[tool.ruff.pydocstyle]
246+
convention = "numpy"
247+
ignore-decorators = [
248+
"typing.overload",
249+
]
250+
251+
[tool.ruff.pyupgrade]
252+
keep-runtime-typing = true
253+
231254
[tool.isort]
232255
overwrite_in_place = true
233256
profile = "black"
@@ -329,6 +352,9 @@ logging-format-style = "new"
329352
enable = [
330353
"all",
331354
]
355+
disable = [
356+
"logging-fstring-interpolation",
357+
]
332358

333359
[tool.pylint.reports]
334360
output-format = "colorized"

requirements/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
pydantic
2-
PySimpleGUI
1+
pydantic<3,>=2.4.2
2+
PySimpleGUI<4.61,>=4.60.4

0 commit comments

Comments
 (0)