-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from melvinebenezer/workflow
test workflow
- Loading branch information
Showing
4 changed files
with
113 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Lint | ||
name: pre-commit | ||
on: | ||
pull_request: | ||
branches: | ||
|
@@ -7,15 +7,11 @@ on: | |
branches: | ||
- main | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Set up Git repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
|
||
- name: Pre-Commit Checks | ||
uses: pre-commit/[email protected] | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.x | ||
- uses: pre-commit/[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
[build-system] | ||
requires = ["hatchling"] | ||
build-backend = "hatchling.build" | ||
|
||
[project] | ||
name = "liah" | ||
dynamic = ["version"] | ||
description = "needle in a haystack" | ||
readme = "README.md" | ||
requires-python = ">=3.10" | ||
license = "MIT" | ||
authors = [ | ||
{name = "James Melvin Priyarajan", email = "[email protected]"}, | ||
] | ||
classifiers = [ | ||
"Intended Audience :: Developers", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
] | ||
dependencies = [ | ||
"xsdata==24.1", | ||
"typing_extensions>=4.6.3,<5.0", | ||
] | ||
|
||
[project.urls] | ||
Documentation = "https://github.com/melvinebenezer/Liah-Lie_in_a_haystack/#README.md" | ||
Issues = "https://github.com/melvinebenezer/Liah-Lie_in_a_haystack/issues" | ||
Source = "https://github.com/melvinebenezer/Liah-Lie_in_a_haystack" | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"black==24.1.1", | ||
"mypy==1.8.0", | ||
"ruff==0.1.14", | ||
"pre-commit==3.6.0", | ||
] | ||
|
||
[tool.hatch.version] | ||
path = "src/aiovantage/__about__.py" | ||
|
||
[[tool.hatch.envs.all.matrix]] | ||
python = ["3.10", "3.11", "3.12"] | ||
|
||
[tool.hatch.envs.dev] | ||
features = ["dev"] | ||
|
||
[tool.hatch.envs.lint] | ||
features = ["dev"] | ||
|
||
[tool.hatch.envs.lint.scripts] | ||
style = [ | ||
"ruff {args:.}", | ||
"black --check --diff {args:.}", | ||
] | ||
fmt = [ | ||
"black {args:.}", | ||
"ruff --fix {args:.}", | ||
] | ||
typing = "mypy {args:.}" | ||
|
||
[tool.mypy] | ||
strict = true | ||
|
||
[tool.black] | ||
target-version = ["py310"] | ||
skip-string-normalization = true | ||
|
||
[tool.ruff] | ||
target-version = "py310" | ||
select = [ | ||
"F", # pyflakes | ||
"E", # pycodestyle errors | ||
"W", # pycodestyle warnings | ||
"I", # isort | ||
"N", # pep8-naming | ||
"UP", # pyupgrade | ||
"D", # pydocstyle | ||
"C", # flake8-comprehensions | ||
"B", # flake8-bugbear | ||
"Q", # flake8-quotes | ||
"C90", # mccabe | ||
] | ||
ignore = [ | ||
"E501", # line too long, handled by black | ||
] | ||
|
||
[tool.ruff.per-file-ignores] | ||
"src/liah/config_client/models/**/*.py" = [ | ||
"D106" # Missing docstring in public nested class | ||
] | ||
|
||
[tool.ruff.isort] | ||
known-first-party = ["liah"] | ||
|
||
[tool.ruff.mccabe] | ||
max-complexity = 15 | ||
|
||
[tool.ruff.pydocstyle] | ||
convention = "google" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters