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

enhance lint #25

Merged
merged 7 commits into from
Nov 7, 2024
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
42 changes: 9 additions & 33 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,56 +8,32 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


jobs:
unittest:
check:
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- { os: ubuntu-latest, pip: ~/.cache/pip }
- { os: macos-latest, pip: ~/Library/Caches/pip }
python: ["3.8", "3.9", "3.10"]
python: ["3.9", "3.10", "3.11", "3.12"]
name: "${{ matrix.config.os }} Python ${{ matrix.python }}"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: x64
- name: Cache
uses: actions/cache@v3
with:
path: ${{ matrix.config.pip }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml', '**/setup.cfg') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
- name: Install tox
run: |
pip install --upgrade pip
pip install .[test]
pip install tox tox-gh-actions
- name: Test
run: python -m unittest discover
- name: mypy
run: mypy .
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- uses: actions/checkout@v3
- name: Black
uses: psf/black@stable
with:
jupyter: true
run: tox
test-docs:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
needs: [unittest, lint]
needs: [check]
name: Test docs
steps:
- id: deployment
Expand All @@ -67,7 +43,7 @@ jobs:
deploy-docs:
if: github.event_name == 'push'
runs-on: ubuntu-latest
needs: [unittest, lint]
needs: [check]
name: Deploy docs
environment:
name: github-pages
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@
**/.ipynb_checkpoints
/.python-version
_build/
.tox
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Note that FISTA also requires $f$ to be convex.
- Documentation: https://zalgo3.github.io/zfista/

## Requirements
- Python 3.8 or later
- Python 3.9 or later

## Install
```sh
Expand Down
Loading
Loading