Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference#package-ecosystem-
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
14 changes: 14 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Ruff
on:
push:
branches:
- main
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v3
- run: ruff check --fix
Comment thread
paultltc marked this conversation as resolved.
Outdated
- run: ruff format --check
34 changes: 34 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: PyTest

on:
push:
branches:
- main
pull_request:

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e '.[rag,dev]' # or custom setup
pip install pytest # if not in requirements.txt

- name: Run tests
run: |
pytest
18 changes: 17 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ rag = [
"nltk>=3.9",
]

dev = ["pytest>=8.0.0", "ruff>=0.4.0"]

[tool.uv]
conflicts = [
[
Expand All @@ -126,4 +128,18 @@ url = "https://download.pytorch.org/whl/cu124"
explicit = true

[project.scripts]
mmore = "mmore:__main__"
mmore = "mmore:__main__"

[tool.pytest.ini_options]
filterwarnings = ["ignore::Warning"]
testpaths = ["tests"]

[tool.ruff.lint]
select = ["E", "F", "W", "I", "N"]

# Avoid enforcing line-length violations (`E501`)
ignore = ["E501"]

# Ignore `E402` (import violations) in all `__init__.py` files, and in selected subdirectories.
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401"]