Skip to content
Merged

V2 #1

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
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
branches: [main, v2]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -e ".[dev]"
- name: Run tests
run: pytest tests/ -v

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: pip install ruff mypy numpy types-PyYAML
- name: Ruff check
run: ruff check v2/
- name: Type check
run: mypy v2/ --ignore-missing-imports
44 changes: 43 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
Hexify/Ilya/
Hexify/Ilya/

# Python
__pycache__/
*.py[cod]
*$py.class
*.so

# Build artifacts
dist/
build/
*.egg-info/

# Type checking
.mypy_cache/

# Linting
.ruff_cache/

# pytest
.pytest_cache/

# Coverage
htmlcov/
.coverage
.coverage.*
coverage.xml

# Virtual environments
venv/
.venv/
ENV/
env/

# IDE
.idea/
.vscode/
*.swp
*.swo

# OS
.DS_Store
Thumbs.db
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.6
hooks:
- id: ruff
args: [--fix]
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.7.1
hooks:
- id: mypy
additional_dependencies: [numpy, types-PyYAML]
args: [--ignore-missing-imports]
18 changes: 18 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.PHONY: install test lint format clean

install:
pip install -e ".[dev]"

test:
pytest tests/ -v

lint:
ruff check v2/
mypy v2/ --ignore-missing-imports

format:
ruff format v2/
ruff check --fix v2/

clean:
rm -rf dist/ build/ *.egg-info .pytest_cache .mypy_cache .ruff_cache
Loading
Loading