Skip to content

Update get_feature_names -> get_feature_names_out due to newer versio… #29

Update get_feature_names -> get_feature_names_out due to newer versio…

Update get_feature_names -> get_feature_names_out due to newer versio… #29

name: Code Validations
on: [pull_request]
jobs:
check-for-python-changes:
runs-on: ubuntu-latest
outputs:
run-python-validations: ${{ steps.changes.outputs.run-python-validations }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Get changed files
id: changes
run: |
echo "::set-output name=run-python-validations::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep .py$ | xargs)"
run-checks:
runs-on: ubuntu-latest
needs: check-for-python-changes
if: ${{needs.check-for-python-changes.outputs.run-python-validations}}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8.12
uses: actions/setup-python@v2
with:
python-version: 3.8.12
- uses: actions/cache@v3
id: cache
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.cfg') }}--${{ hashFiles('tests/requirements.txt') }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
python -m pip install --upgrade pip
pip install -e .
pip install -r tests/requirements.txt
- name: Make sure black formatter results in no diff
run: |
black $(git ls-files '*.py') --check
- name: Make sure isort formatter results in no diff
run: |
isort $(git ls-files '*.py') --check
- name: Analyzing the code with pylint
run: |
pylint openlayer tests
- name: Analyzing the code with flake8
run: |
flake8 openlayer tests
# Currently always succeeds because unit tests need to be fixed
- name: Running Pytest
run: |
pytest