Merge pull request #15 from NOAA-GSL/chore/ncg-id-or-uuid #125
This file contains hidden or 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: Lint with pylint | |
on: | |
push: | |
branches: | |
- 'main' | |
pull_request: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
name: Lint | |
defaults: | |
run: | |
shell: bash -el {0} | |
strategy: | |
matrix: | |
python-version: [ "3.11" ] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest pylint==2.17.5 numpy==1.24.3 flask==2.3.2 flask-cors==4.0.0 python-dateutil==2.8.2 pint==0.21 importlib-metadata==6.7.0 jsonschema==4.19.0 pika==1.3.1 | |
- name: Checkout idss-engine-commons | |
uses: actions/checkout@v2 | |
with: | |
repository: NOAA-GSL/idss-engine-commons | |
ref: main | |
path: commons/ | |
- name: Install IDSSE python commons | |
working-directory: commons/python/idsse_common | |
run: pip install . | |
- name: Set PYTHONPATH for pylint | |
run: | | |
echo "PYTHONPATH=python/idsse/testing/" >> $GITHUB_ENV | |
- name: Run code linter | |
run: pylint ./python/idsse/testing --max-line-length=100 --recursive true | |
- name: Set PYTHONPATH for proxy service | |
run: | | |
echo "PYTHONPATH=python/nwsc_proxy" >> $GITHUB_ENV | |
- name: Run code linter for proxy service | |
run: pylint ./python/nwsc_proxy --max-line-length=100 --recursive true | |
- name: Run black formatter | |
uses: psf/black@stable | |
with: | |
options: "--check --line-length 99" # 100-1 due to black formatter bug | |
src: "./python" |