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

Patch asl context #1

Merged
merged 8 commits into from
May 17, 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
31 changes: 20 additions & 11 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,38 @@ jobs:
name: "Lint Code Base"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v4
with:
# super-linter needs the full git history to get the
# list of files that changed across commits
fetch-depth: 0
- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.2
virtualenvs-create: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry==1.1.8
BLACK_VERSION=$(poetry show black | grep version | rev | cut -d " " -f 1 | rev)
FLAKE8_VERSION=$(poetry show flake8 | grep version | rev | cut -d " " -f 1 | rev)
pip install "black==${BLACK_VERSION}" "flake8==${FLAKE8_VERSION}"
poetry install --only dev --no-root --no-interaction
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --max-complexity=10 --max-line-length=88 --statistics
poetry run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
poetry run flake8 . --count --max-complexity=10 --max-line-length=88 --statistics
- name: Check with black
run: |
black . --check --diff
poetry run black . --check --diff
- name: Run GitHub super-linter
uses: docker://github/super-linter:v3
uses: github/super-linter/slim@v6
env:
DEFAULT_BRANCH: master
# To report GitHub Actions status checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: true
VALIDATE_YAML: true
VALIDATE_JSON: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ jobs:
wheels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python 3.x
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry==1.1.8
pip install poetry==1.8.2
- name: Build and Publish
run: |
poetry config pypi-token.pypi "$PYPI_TOKEN"
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/type-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@ jobs:
name: "Type Check Code Base"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: "Set up Python 3.8"
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: "Install Dependencies"
run: |
python -m pip install --upgrade pip
pip install poetry
pip install poetry==1.8.2
poetry config virtualenvs.create false
poetry install --no-interaction --no-dev
poetry install --no-interaction --only main
- name: "Set up Node.js"
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: "12.x"
node-version: "20.x"
- name: "Install Pyright"
run: |
npm install -g pyright
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ repos:
- id: name-tests-test
- id: requirements-txt-fixer
- repo: https://github.com/psf/black
rev: 21.5b2
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
Expand All @@ -28,12 +28,12 @@ repos:
- "--max-complexity=10"
- "--max-line-length=88"
- repo: https://github.com/asottile/reorder_python_imports
rev: v2.5.0
rev: v2.6.0
hooks:
- id: reorder-python-imports
args: [--py3-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v2.19.0
rev: v3.15.2
hooks:
- id: pyupgrade
args: [--py36-plus]
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
Plugin for the d2b package to handle ASL data

[![PyPI Version](https://img.shields.io/pypi/v/d2b-asl.svg)](https://pypi.org/project/d2b-asl/)
[![Type Check](https://github.com/d2b-dev/d2b-asl/actions/workflows/type-check.yaml/badge.svg)](https://github.com/d2b-dev/d2b-asl/actions/workflows/type-check.yaml)
[![Code Style](https://github.com/d2b-dev/d2b-asl/actions/workflows/lint.yaml/badge.svg)](https://github.com/d2b-dev/d2b-asl/actions/workflows/lint.yaml)

## Installation

Expand Down
Loading