diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml new file mode 100644 index 0000000..1b06968 --- /dev/null +++ b/.github/workflows/pylint.yml @@ -0,0 +1,24 @@ +name: Pylint + +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.10", "3.11"] + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements/dev-requirements.txt + - name: Analysing the code with pylint + run: | + export PYTHONPATH=$(pwd) + pylint --fail-under=8 $(git ls-files 'src/*.py') --disable=C0114,C0115,C0116 diff --git a/src/router/species.py b/src/router/species.py index 3d1de5b..a492942 100644 --- a/src/router/species.py +++ b/src/router/species.py @@ -1,22 +1,13 @@ -from os import path +""" +TODO: species spefic endpoints: + - get the list of species + - get the list of sub-species (for each species) +""" -from fastapi import APIRouter, Depends, status, HTTPException -from fastapi.responses import FileResponse -from sqlalchemy.orm import Session - -from src.dependencies import get_db - -from src.models.responses import ErrorMessage - -from src.database.crud import get_image +from fastapi import APIRouter router = APIRouter( prefix="/species", tags=["species"], ) - - -# TODO: species spefic endpoints: -# - get the list of species -# - get the list of sub-species (for each species)