Setup project

This commit is contained in:
Martin Popovski 2024-02-12 21:21:04 +00:00
parent b531f77b7b
commit faa2ecbfda
Signed by: martinkozle
GPG Key ID: 0A5F2984DB008108
12 changed files with 1681 additions and 0 deletions

3
.devcontainer/Dockerfile Normal file
View File

@ -0,0 +1,3 @@
FROM mcr.microsoft.com/devcontainers/python:1-3.12-bookworm
WORKDIR /workspace
RUN apt-get update && apt-get install gnupg2 -y

View File

@ -0,0 +1,8 @@
version: '3.8'
services:
devcontainer:
build: .
volumes:
- ..:/workspace:cached
command: sleep infinity

View File

@ -0,0 +1,50 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// "image": "mcr.microsoft.com/devcontainers/python:1-3.12-bookworm",
"dockerComposeFile": "compose.yaml",
"service": "devcontainer",
"workspaceFolder": "/workspace",
"shutdownAction": "stopCompose",
"features": {
"ghcr.io/devcontainers/features/git:1": {
"ppa": true,
"version": "os-provided"
},
"ghcr.io/devcontainers-contrib/features/poetry:2": {
"version": "latest"
},
"ghcr.io/prulloac/devcontainer-features/pre-commit:1": {},
},
"customizations": {
"vscode": {
"extensions": [
"donjayamanne.python-extension-pack",
"ms-python.mypy-type-checker",
"njpwerner.autodocstring",
"charliermarsh.ruff",
"naumovs.color-highlight",
"tamasfe.even-better-toml",
"eamodio.gitlens",
"yzhang.markdown-all-in-one",
"DavidAnson.vscode-markdownlint",
"ninoseki.vscode-pylens"
]
}
},
"postCreateCommand": "bash ./.devcontainer/post-create.sh",
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
8000
]
// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pip3 install --user -r requirements.txt",
// Configure tool-specific properties.
// "customizations": {},
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}

View File

@ -0,0 +1,2 @@
pre-commit install
(cd llm-qa; poetry install)

3
.gitignore vendored
View File

@ -158,3 +158,6 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# Data
data/

27
.pre-commit-config.yaml Normal file
View File

@ -0,0 +1,27 @@
default_language_version:
python: python3.12
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-case-conflict
- id: check-json
exclude: ^\.devcontainer|\.vscode$
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.2.1
hooks:
- id: ruff
args:
- --fix
- id: ruff-format
ci:
autofix_commit_msg: 🎨 [pre-commit.ci] Auto format from pre-commit.com hooks
autoupdate_commit_msg: ⬆ [pre-commit.ci] pre-commit autoupdate

11
.vscode/workspace.code-workspace vendored Normal file
View File

@ -0,0 +1,11 @@
{
"folders": [
{
"path": ".."
},
{
"path": "../llm-qa"
}
],
"settings": {}
}

1
README.md Normal file
View File

@ -0,0 +1 @@
# LLM QA

1
llm-qa/README.md Normal file
View File

@ -0,0 +1 @@
# LLM QA

View File

1555
llm-qa/poetry.lock generated Normal file

File diff suppressed because it is too large Load Diff

20
llm-qa/pyproject.toml Normal file
View File

@ -0,0 +1,20 @@
[tool.poetry]
name = "llm-qa"
version = "0.1.0"
description = ""
authors = ["Martin Popovski <martinkozle@yahoo.com>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.12"
langchain-community = "^0.0.19"
langchain = "^0.1.6"
[tool.poetry.group.dev.dependencies]
ruff = "0.2.1"
mypy = "^1.8.0"
ipython = "^8.21.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"