Skip to content

Commit

Permalink
Rm py2.7 (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
tammoippen authored Nov 7, 2024
1 parent cbc80ae commit bdb3438
Show file tree
Hide file tree
Showing 17 changed files with 589 additions and 521 deletions.
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
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ __pycache__/

# macOS
.DS_Store

.vscode/
.pypy_cache/
.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 iso4217parse

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

0 comments on commit bdb3438

Please sign in to comment.