Commit ffa2153e authored by Vasilis Tsiligiannis's avatar Vasilis Tsiligiannis

tox: Introduce 'isort' check, reformat imports

Signed-off-by: Vasilis Tsiligiannis's avatarVasilis Tsiligiannis <acinonyx@openwrt.gr>
parent 6a2fde91
......@@ -4,6 +4,7 @@ ignore=_version.py
[MESSAGES CONTROL]
disable=
C0111,
C0412,
R0902,
R0912,
R0913,
......
......@@ -11,11 +11,11 @@ import time
from validators.url import url
import satnogsclient.config
from satnogsclient.settings import (SATNOGS_API_TOKEN, DEFAULT_LOGGING, SATNOGS_STATION_ID,
SATNOGS_STATION_LAT, SATNOGS_STATION_LON, SATNOGS_STATION_ELEV,
SATNOGS_NETWORK_API_URL, GPSD_ENABLED)
from satnogsclient.scheduler.tasks import status_listener, exec_rigctld
from satnogsclient.locator import locator
from satnogsclient.scheduler.tasks import exec_rigctld, status_listener
from satnogsclient.settings import DEFAULT_LOGGING, GPSD_ENABLED, \
SATNOGS_API_TOKEN, SATNOGS_NETWORK_API_URL, SATNOGS_STATION_ELEV, \
SATNOGS_STATION_ID, SATNOGS_STATION_LAT, SATNOGS_STATION_LON
__author__ = satnogsclient.config.AUTHOR
__email__ = satnogsclient.config.EMAIL
......
......@@ -4,6 +4,7 @@ SatNOGS Client module main function
from __future__ import absolute_import, division, print_function
import sys
import satnogsclient
if __name__ == '__main__':
......
import time
import logging
import logging.config
import time
import gps
from satnogsclient import settings
LOGGER = logging.getLogger('satnogsclient')
......
from __future__ import absolute_import, division, print_function
import json
import logging
import os
try:
from urllib.parse import urljoin
except ImportError:
from urlparse import urljoin
from datetime import datetime
from time import sleep
import json
import shlex
import subprocess
import requests
from datetime import datetime
from time import sleep
import numpy as np
import matplotlib.pyplot as plt
import numpy as np
import requests
import satnogsclient.config
from satnogsclient import settings
from satnogsclient.observer.worker import WorkerFreq, WorkerTrack
from satnogsclient.upsat import gnuradio_handler
try:
from urllib.parse import urljoin
except ImportError:
from urlparse import urljoin
plt.switch_backend('Agg')
LOGGER = logging.getLogger('default')
......
......@@ -2,7 +2,6 @@ from __future__ import absolute_import, division, print_function
import logging
import sys
from datetime import datetime
import ephem
......
......@@ -2,21 +2,19 @@ from __future__ import absolute_import, division, print_function
import logging
import math
import threading
import time
import os
import signal
import threading
import time
from datetime import datetime, timedelta
import ephem
import pytz
from satnogsclient import settings
from satnogsclient.observer.commsocket import Commsocket
from satnogsclient.observer.orbital import pinpoint
from satnogsclient import settings
LOGGER = logging.getLogger('default')
......
from __future__ import absolute_import, division, print_function
from pytz import utc
from apscheduler.executors.pool import ThreadPoolExecutor
from apscheduler.jobstores.sqlalchemy import SQLAlchemyJobStore
from apscheduler.schedulers.background import BackgroundScheduler
from pytz import utc
from satnogsclient import settings
......
......@@ -3,20 +3,21 @@ from __future__ import absolute_import, division, print_function
import logging
import os
import signal
try:
from urllib.parse import urljoin
except ImportError:
from urlparse import urljoin
from multiprocessing import Process
import subprocess
from multiprocessing import Process
import requests
from dateutil import parser
from satnogsclient.scheduler import SCHEDULER
from satnogsclient import settings
from satnogsclient.observer.observer import Observer
from satnogsclient.locator import locator
from satnogsclient.observer.observer import Observer
from satnogsclient.scheduler import SCHEDULER
try:
from urllib.parse import urljoin
except ImportError:
from urlparse import urljoin
LOGGER = logging.getLogger('default')
LOG_PATH = settings.SATNOGS_OUTPUT_PATH + "/files/"
......
......@@ -4,8 +4,8 @@ SatNOGS Client settings file
from __future__ import absolute_import, division, print_function
import os
from os import environ, path
from distutils.util import strtobool # pylint: disable=E0401,E0611
from os import environ, path
def _cast_or_none(func, value):
......
from __future__ import absolute_import, division, print_function
import json
import logging
import subprocess
import os
import json
import subprocess
from satnogsclient import settings as client_settings
......
......@@ -43,6 +43,13 @@ exclude = satnogsclient/_version.py,versioneer.py,doc,build,.tox
[yapf]
column_limit = 99
[tool:isort]
use_parentheses = True
skip_glob = doc,build,.tox
skip = _version.py,versioneer.py
line_width = 99
multi_line_output = 2
# See the docstring in versioneer.py for instructions. Note that you must
# re-run 'versioneer.py setup' after changing this section, and commit the
# resulting files.
......
from __future__ import absolute_import, division, print_function
from setuptools import setup
import versioneer
setup(
......
[tox]
envlist = {py2,py3}-flake8,yapf,{py2,py3}-{pylint,build},robot_lint,py2,py3
envlist = {py2,py3}-flake8,isort,yapf,{py2,py3}-{pylint,build},robot_lint,py2,py3
[testenv:py2-flake8]
deps =
......@@ -13,6 +13,11 @@ deps =
skip_install = True
commands = flake8
[testenv:isort]
deps =
isort==4.3.18
commands = isort -rc -c -df
[testenv:yapf]
deps =
yapf==0.27.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment