Skip to content

Commit

Permalink
Use poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
sbalian committed Feb 25, 2024
1 parent 4cefd76 commit ed90416
Show file tree
Hide file tree
Showing 6 changed files with 746 additions and 121 deletions.
8 changes: 0 additions & 8 deletions .flake8

This file was deleted.

64 changes: 32 additions & 32 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Testing, type checking and linting
name: Tests

on: push

Expand All @@ -8,39 +8,39 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12']
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox
- name: Run tests
run: |
tox -e py
- name: Check types
run: |
mkdir .mypy_cache
tox -e mypy
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install the package (no lock file)
run: rm poetry.lock && poetry install -E numpy
- name: pytest
run: QRANDOM_API_KEY=key poetry run pytest
- name: mypy
run: poetry run mypy --install-types --non-interactive .

lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install tox
- name: Checki linting
run: |
tox -e flake8,black,isort
- name: Checkout repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install the package
run: poetry install -E numpy
- name: black
run: poetry run black --check .
- name: isort
run: poetry run isort --check .
- name: flake8
run: flake8
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
*.pyc
.tox/
dist/
*.egg-info/
TODO
Expand Down
Loading

0 comments on commit ed90416

Please sign in to comment.