Optional FrameData Uncertainties and Masks #537
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Code Style" | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
concurrency: | |
group: codestyle-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ruff: | |
name: ruff | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
cache-dependency-path: '**/pyproject.toml' | |
- name: Install base dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install tox | |
python -m pip install ruff | |
- name: Code Analyse | |
run: | | |
ruff check astropop | |
ruff check tests | |
ruff check --statistics astropop | |
ruff check --statistics tests | |
ruff_pull_request: | |
name: ruff-pull-request | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
cache: pip | |
cache-dependency-path: '**/pyproject.toml' | |
- uses: technote-space/get-diff-action@v6 | |
with: | |
PATTERNS: | | |
astropop/**/*.py | |
!tests/*.py | |
- name: Print DIFF | |
run: | | |
echo "GIT_DIFF: ${{ env.GIT_DIFF }}" | |
echo "GIT_DIFF_FILTERED: ${{ env.GIT_DIFF_FILTERED }}" | |
- name: Install base dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install ruff | |
- name: Run pycodestyle | |
run: | | |
ruff check ${{ env.GIT_DIFF_FILTERED }} | |
ruff check --statistics ${{ env.GIT_DIFF_FILTERED }} | |
if: env.GIT_DIFF_FILTERED | |
prospector_pull_request: | |
name: prospector-pull-request | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
cache-dependency-path: '**/pyproject.toml' | |
- uses: technote-space/get-diff-action@v6 | |
with: | |
PATTERNS: | | |
astropop/**/*.py | |
!tests/*.py | |
- name: Print DIFF | |
run: | | |
echo "GIT_DIFF: ${{ env.GIT_DIFF }}" | |
echo "GIT_DIFF_FILTERED: ${{ env.GIT_DIFF_FILTERED }}" | |
- name: Install base dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install prospector pylint pyflakes bandit | |
python -m pip install .[all] | |
- name: Code Analyse | |
continue-on-error: true | |
run: prospector -w pyflakes -w bandit -F --no-autodetect --doc-warnings ${{ env.GIT_DIFF_FILTERED}} | |
if: env.GIT_DIFF_FILTERED |