-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Iglesys347/feat/github-actions
Create pylint.yml action
- Loading branch information
Showing
2 changed files
with
30 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |