Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 8 additions & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: Pylint

on: [push]
on:
push:
branch: main
pull_request:
paths:
- "**.py"
- ".github/workflows/pytest.yml"


jobs:
lint:
Expand Down
26 changes: 17 additions & 9 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
name: Tests

on: [push]
on:
push:
branch: main
pull_request:
paths:
- "**.py"
- ".github/workflows/pytest.yml"

jobs:
tests:
strategy:
matrix:
python-version:
- "3.11"
- "3.12"
- "3.13"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install requirements.txt
run: |
pip install -r requirements.txt
pip install pytest pytest-cov
- name: Install UV
run: astral-sh/setup-uv@v5
python-version: ${{ matrix.python-version }}
- uses: astral-sh/ruff-action@v3
- name: Run the tests
run: pytest --cov --cov-report=json:coverage.json tests/
- name: Extract coverage
Expand Down
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.18
hooks:
- id: uv-lock
- id: ruff
args: [ --fix ]
- id: ruff-format
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13
2 changes: 1 addition & 1 deletion lib/pyclamd.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ def __init__(self, filename=None, timeout=None):

# try to get unix socket from clamd.conf
if filename is None:
for clamdpath in ["/etc/clamav/clamd.conf", "/etc/clamd.conf"]:
for clamdpath in ["/etc/clamav/clamd.conf", "/etc/clamd.conf", "/opt/homebrew/etc/clamav/clamd.conf"]:
if os.path.isfile(clamdpath):
break
else:
Expand Down
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[project]
name = "pyclamav"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"dateparser>=1.2.0",
"logging>=0.4.9.6",
"pyclamd>=0.4.0",
"pydantic>=2.10.5",
"pytest>=8.3.4",
"python-json-logger>=3.2.1",
"ruff>=0.9.1",
]
328 changes: 328 additions & 0 deletions uv.lock

Large diffs are not rendered by default.

Loading