Skip to content

Fix selection to dataframe #14

Fix selection to dataframe

Fix selection to dataframe #14

name: Pull Request Checks
on:
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
black-format-check: # Check that the codebase is formatted with black
name: Black format check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies and check black format
run: |
python -m pip install --upgrade pip
pip install black
black --check --diff .
flake8-check: # Check that the codebase does not contain linting errors
name: Flake8 check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies and check flake8 format
run: |
python -m pip install --upgrade pip
pip install flake8
flake8 .
cspell-check: # Check that the project does not contain spelling errors
name: CSpell check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: 18
- name: Install dependencies and check prettier format
run: npm install -g cspell && cspell --no-summary --no-progress --no-color .
version-upgrade-check: # Check that the version is greater than the previous commit version
name: Version upgrade check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check branch setup.py version
id: version-check
run: |
VERSION=$(cat setup.py | grep -m1 version | cut -d '"' -f 2)
echo "BRANCH_VERSION=$VERSION" >> $GITHUB_OUTPUT
- uses: actions/checkout@v3
with:
ref: main
- name: Check main setup.py version
run: |
BRANCH_VERSION=${{ steps.version-check.outputs.BRANCH_VERSION }}
PREVIOUS_VERSION=$(cat setup.py | grep -m1 version | cut -d '"' -f 2)
echo "PREVIOUS_VERSION=$PREVIOUS_VERSION"
echo "BRANCH_VERSION=$BRANCH_VERSION"
if [ "$BRANCH_VERSION" == "" ]; then
echo "No version found in current branch."
exit 1
fi
if [ "$PREVIOUS_VERSION" == "" ]; then
echo "No version found in main branch."
exit 1
fi
if [[ $PREVIOUS_VERSION == $BRANCH_VERSION ]]; then
echo "Version not upgraded: setup.py version '$PREVIOUS_VERSION' == branch version '$BRANCH_VERSION'."
exit 1
fi
if [[ $PREVIOUS_VERSION > $BRANCH_VERSION ]]; then
echo "Version not upgraded: setup.py version '$PREVIOUS_VERSION' > branch version '$BRANCH_VERSION'."
exit 1
fi
echo "Version upgraded: setup.py version '$PREVIOUS_VERSION' < branch version '$BRANCH_VERSION'."