Skip to content

Commit

Permalink
Merge pull request #11 from melvinebenezer/workflow
Browse files Browse the repository at this point in the history
test workflow
  • Loading branch information
melvinebenezer authored Apr 10, 2024
2 parents 7a1cbaf + 46a8225 commit 4392efc
Show file tree
Hide file tree
Showing 4 changed files with 113 additions and 14 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Lint
name: pre-commit
on:
pull_request:
branches:
Expand All @@ -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]
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
rev: 22.3.0
hooks:
- id: black
language_version: python3.9
language_version: python3.10

- repo: https://github.com/pycqa/flake8
rev: 6.1.0
Expand Down
101 changes: 101 additions & 0 deletions liah/pyproject.toml
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"
2 changes: 2 additions & 0 deletions liah/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@
retrieve_prompt = lie_needles[0]["question"]

if __name__ == "__main__":
print(eval_prompt)
print(expert_prompt)
print(system_prompt)

0 comments on commit 4392efc

Please sign in to comment.