Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rm py2.7 #13

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
178 changes: 0 additions & 178 deletions .circleci/config.yml

This file was deleted.

80 changes: 80 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI

on:
push:
branches:
- "master"
pull_request:
branches:
- "master"

jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['pypy-3.9', 3.9, '3.10', 'pypy-3.10', '3.11', '3.12', '3.13']
include:
- os: ubuntu-latest
path: ~/.cache/pip
- os: macos-latest
path: ~/Library/Caches/pip
- os: windows-latest
path: ~\AppData\Local\pip\Cache
exclude:
- os: macos-latest
python-version: 'pypy-3.9'
- os: macos-latest
python-version: 'pypy-3.10'
- os: windows-latest
python-version: 'pypy-3.9'
- os: windows-latest
python-version: 'pypy-3.10'
defaults:
run:
shell: bash

runs-on: ${{ matrix.os }}
env:
PYTHONIOENCODING: UTF-8
steps:
- name: Checkout repo
uses: actions/checkout@v4

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

- name: Cache Install
id: restore-cache
uses: actions/cache@v4
with:
path: |
${{ matrix.path }}
poetry.lock
key: ${{ matrix.os }}-${{ matrix.python-version }}-pip-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('tests/requirements.txt') }}

- name: Install Poetry
uses: snok/install-poetry@v1
with:
version: '1.8.3' # ${{ startsWith(matrix.python-version, 'pypy') && '1.2.2' || '1.8.3' }}
virtualenvs-create: false

- name: Install
run: poetry install

- name: Style
if: ${{ ! startsWith(matrix.python-version, 'pypy-') && startsWith(matrix.os, 'ubuntu') }}
run: make check

- name: Tests
run: make test

- uses: codecov/codecov-action@v4
with:
file: coverage.xml
name: coverage-${{ matrix.os }}-${{ matrix.python-version }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ __pycache__/
# macOS
.DS_Store

.vscode/
.ruff_cache/
dist/
pyproject.lock
poetry.lock
cov_html/
coverage.xml
.pytest_cache/
.hypothesis/
.venv/
Expand Down
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Debug Tests",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"purpose": ["debug-test"],
// "console": "integratedTerminal",
"justMyCode": false,
"env": {"PYTHONDEVMODE": "1"}
}
]
}
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"python.testing.pytestArgs": [
"tests",
"--no-cov",
"-s",
"-vvv"
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
}
}
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.PHONY: fmt check test

fmt:
poetry run ruff format .
poetry run ruff check --fix .

check:
poetry run ruff format --check .
poetry run ruff check .
# poetry run mypy src

test:
PYTHONDEVMODE=1 poetry run pytest -vvv -s
Loading