Skip to content

Migrate to pyproject.toml #93

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Nov 28, 2021
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions .github/workflows/kentik-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,23 +39,26 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install requirements
- name: Install dependencies
working-directory: ./kentik_api_library
run: pip3 install -r requirements.txt
- name: PyTest
run: |
set -xe
python -VV
python -m site
python -m pip install --upgrade -r requirements.txt
python -m pip install --upgrade -r requirements-dev.txt
- name: Code formatting
working-directory: ./kentik_api_library
run: python3 setup.py pytest
- name: Black
uses: piotrpawlaczek/python-blacken@release/stable
with:
path: './kentik_api_library'
line-length: '120'
run: python3 setup.py format --check
- name: Mypy
working-directory: ./kentik_api_library
run: python3 setup.py mypy
- name: PyLint
working-directory: ./kentik_api_library
run: python3 setup.py pylint
- name: Mypy
- name: PyTest
working-directory: ./kentik_api_library
run: python3 setup.py mypy
run: python3 setup.py pytest

build:
needs: python-versions-setup
Expand Down
8 changes: 0 additions & 8 deletions kentik_api_library/.pylintrc

This file was deleted.

2 changes: 1 addition & 1 deletion kentik_api_library/examples/alerting_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import logging
from datetime import datetime

from kentik_api import KentikAPI, ManualMitigation, AlertFilter
from kentik_api import AlertFilter, KentikAPI, ManualMitigation
from kentik_api.utils import get_credentials

logging.basicConfig(level=logging.INFO)
Expand Down
3 changes: 2 additions & 1 deletion kentik_api_library/examples/applications_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"""

import logging
from kentik_api import KentikAPI, CustomApplication

from kentik_api import CustomApplication, KentikAPI
from kentik_api.utils import get_credentials

logging.basicConfig(level=logging.INFO)
Expand Down
3 changes: 2 additions & 1 deletion kentik_api_library/examples/batch_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"""

import logging
from kentik_api import KentikAPI, Criterion, Upsert, Deletion, BatchOperationPart

from kentik_api import BatchOperationPart, Criterion, Deletion, KentikAPI, Upsert
from kentik_api.utils import get_credentials

logging.basicConfig(level=logging.INFO)
Expand Down
1 change: 1 addition & 0 deletions kentik_api_library/examples/bulk_user_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os

import yaml

import kentik_api


Expand Down
12 changes: 6 additions & 6 deletions kentik_api_library/examples/devices_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@

import logging

from kentik_api.public.types import ID
from kentik_api import (
KentikAPI,
Device,
SNMPv3Conf,
AuthenticationProtocol,
PrivacyProtocol,
DeviceSubtype,
CDNAttribute,
Device,
DeviceSubtype,
Interface,
KentikAPI,
PrivacyProtocol,
SNMPv3Conf,
)
from kentik_api.public.types import ID
from kentik_api.utils import get_credentials

logging.basicConfig(level=logging.INFO)
Expand Down
3 changes: 2 additions & 1 deletion kentik_api_library/examples/dimensions_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import logging
import random
import string
from kentik_api import KentikAPI, CustomDimension, Populator

from kentik_api import CustomDimension, KentikAPI, Populator
from kentik_api.utils import get_credentials

logging.basicConfig(level=logging.INFO)
Expand Down
2 changes: 1 addition & 1 deletion kentik_api_library/examples/error_handling_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import logging

from kentik_api import KentikAPI, AuthError, NotFoundError, IncompleteObjectError, Device, RateLimitExceededError
from kentik_api import AuthError, Device, IncompleteObjectError, KentikAPI, NotFoundError, RateLimitExceededError
from kentik_api.public.types import ID
from kentik_api.utils import get_credentials

Expand Down
3 changes: 2 additions & 1 deletion kentik_api_library/examples/labels_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"""

import logging
from kentik_api import KentikAPI, DeviceLabel

from kentik_api import DeviceLabel, KentikAPI
from kentik_api.public.types import ID
from kentik_api.utils import get_credentials

Expand Down
1 change: 1 addition & 0 deletions kentik_api_library/examples/my_kentik_portal_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""

import logging

from kentik_api import KentikAPI
from kentik_api.utils import get_credentials

Expand Down
1 change: 1 addition & 0 deletions kentik_api_library/examples/plans_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""

import logging

from kentik_api import KentikAPI
from kentik_api.utils import get_credentials

Expand Down
18 changes: 10 additions & 8 deletions kentik_api_library/examples/queries_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,22 @@

import logging
from io import BytesIO

from PIL import Image # type: ignore

from kentik_api import (
KentikAPI,
QuerySQL,
QueryObject,
QueryArrayItem,
Query,
Aggregate,
AggregateFunctionType,
FastDataType,
MetricType,
ChartViewType,
DimensionType,
FastDataType,
ImageType,
ChartViewType,
KentikAPI,
MetricType,
Query,
QueryArrayItem,
QueryObject,
QuerySQL,
)
from kentik_api.utils import get_credentials

Expand Down
3 changes: 2 additions & 1 deletion kentik_api_library/examples/saved_filters_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"""

import logging
from kentik_api import KentikAPI, SavedFilter, Filters, FilterGroups, Filter

from kentik_api import Filter, FilterGroups, Filters, KentikAPI, SavedFilter
from kentik_api.utils import get_credentials

logging.basicConfig(level=logging.INFO)
Expand Down
1 change: 1 addition & 0 deletions kentik_api_library/examples/sites_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""

import logging

from kentik_api import KentikAPI, Site
from kentik_api.utils import get_credentials

Expand Down
Loading