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
46 changes: 30 additions & 16 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,44 @@
name: pre-commit
name: CI

on:
pull_request:
push:
branches: [master, dev, feature/146]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.0
pytest:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4

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

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Create virtual environment
run: uv venv

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry==1.8.0
poetry install
- name: Test with pytest
source .venv/bin/activate
uv pip install -r requirements-dev.txt
uv pip install -e .

- name: Run pre-commit
run: |
source .venv/bin/activate
pre-commit run --all-files

- name: Run tests
run: |
poetry run pytest
source .venv/bin/activate
pytest
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ repos:
rev: v3.1.0
hooks:
- id: prettier
name: Run preittier
language_version: 16.20.2
name: Run prettier
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
Expand Down
67 changes: 67 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,76 @@

Renewing ...

## Requirements

- Python >= 3.10
- uv (recommended) or Poetry

## Install

### Using uv (Recommended)

[uv](https://github.com/astral-sh/uv) is a new, extremely fast Python package installer and resolver.

1. Install uv:

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```

2. Create and activate virtual environment:

```bash
uv venv
source .venv/bin/activate # On Unix/macOS
# or
.venv\Scripts\activate # On Windows
```

3. Install dependencies:

```bash
# Install production dependencies
uv pip install -r requirements.txt

# Install development dependencies
uv pip install -r requirements-dev.txt

# Or install all dependencies at once
uv pip install -r requirements-dev.txt
```

4. Install the package in development mode:

```bash
uv pip install -e .
```

### Using Poetry (Legacy)

```bash
pipx install poetry==1.8.0
poetry install
```

## Development

### Code Style

This project uses:

- [black](https://github.com/psf/black) for code formatting
- [ruff](https://github.com/astral-sh/ruff) for linting
- [pyright](https://github.com/microsoft/pyright) for type checking

To run all checks:

```bash
pre-commit run --all-files
```

### Testing

```bash
pytest
```
Loading