Merge pull request #1342 from jooola/feat/ci_start_linting_again
Follow up #1339
This commit is contained in:
commit
b9bfa618a6
|
@ -6,5 +6,6 @@ PIP_INSTALL := --editable .[dev]
|
||||||
PYLINT_ARG := libretimeapi
|
PYLINT_ARG := libretimeapi
|
||||||
MYPY_ARG := libretimeapi
|
MYPY_ARG := libretimeapi
|
||||||
|
|
||||||
|
format: .format
|
||||||
lint: .pylint .mypy
|
lint: .pylint .mypy
|
||||||
clean: .clean
|
clean: .clean
|
||||||
|
|
|
@ -35,8 +35,6 @@ setup(
|
||||||
],
|
],
|
||||||
"dev": [
|
"dev": [
|
||||||
"psycopg2-binary",
|
"psycopg2-binary",
|
||||||
"mypy",
|
|
||||||
"pylint",
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
10
install
10
install
|
@ -1023,11 +1023,11 @@ if [ ! -d /var/log/airtime ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
verbose "\n * Installing API client..."
|
verbose "\n * Installing API client..."
|
||||||
loudCmd "$python_bin ${AIRTIMEROOT}/python_apps/api_clients/setup.py install --install-scripts=/usr/bin"
|
loudCmd "$python_bin" -m pip install "${AIRTIMEROOT}/python_apps/api_clients"
|
||||||
verbose "...Done"
|
verbose "...Done"
|
||||||
|
|
||||||
verbose "\n * Installing pypo and liquidsoap..."
|
verbose "\n * Installing pypo and liquidsoap..."
|
||||||
loudCmd "$python_bin ${AIRTIMEROOT}/python_apps/pypo/setup.py install --install-scripts=/usr/bin"
|
loudCmd "$python_bin" -m pip install "${AIRTIMEROOT}/python_apps/pypo" --install-option="--install-scripts=/usr/bin"
|
||||||
loudCmd "mkdir -p /var/log/airtime/{pypo,pypo-liquidsoap} /var/tmp/airtime/pypo/{cache,files,tmp} /var/tmp/airtime/show-recorder/"
|
loudCmd "mkdir -p /var/log/airtime/{pypo,pypo-liquidsoap} /var/tmp/airtime/pypo/{cache,files,tmp} /var/tmp/airtime/show-recorder/"
|
||||||
loudCmd "chown -R ${web_user}:${web_user} /var/log/airtime/{pypo,pypo-liquidsoap} /var/tmp/airtime/pypo/{cache,files,tmp} /var/tmp/airtime/show-recorder/"
|
loudCmd "chown -R ${web_user}:${web_user} /var/log/airtime/{pypo,pypo-liquidsoap} /var/tmp/airtime/pypo/{cache,files,tmp} /var/tmp/airtime/show-recorder/"
|
||||||
systemInitInstall libretime-liquidsoap "$web_user"
|
systemInitInstall libretime-liquidsoap "$web_user"
|
||||||
|
@ -1035,7 +1035,7 @@ systemInitInstall libretime-playout "$web_user"
|
||||||
verbose "...Done"
|
verbose "...Done"
|
||||||
|
|
||||||
verbose "\n * Installing airtime-celery..."
|
verbose "\n * Installing airtime-celery..."
|
||||||
loudCmd "$python_bin ${AIRTIMEROOT}/python_apps/airtime-celery/setup.py install"
|
loudCmd "$python_bin" -m pip install "${AIRTIMEROOT}/python_apps/airtime-celery"
|
||||||
# Create the Celery user
|
# Create the Celery user
|
||||||
if $is_centos_dist; then
|
if $is_centos_dist; then
|
||||||
loudCmd "id celery 2>/dev/null || adduser --no-create-home -c 'LibreTime Celery' -r celery || true"
|
loudCmd "id celery 2>/dev/null || adduser --no-create-home -c 'LibreTime Celery' -r celery || true"
|
||||||
|
@ -1051,12 +1051,12 @@ systemInitInstall libretime-celery
|
||||||
verbose "...Done"
|
verbose "...Done"
|
||||||
|
|
||||||
verbose "\n * Installing libretime-analyzer..."
|
verbose "\n * Installing libretime-analyzer..."
|
||||||
loudCmd "$python_bin ${AIRTIMEROOT}/python_apps/airtime_analyzer/setup.py install --install-scripts=/usr/bin"
|
loudCmd "$python_bin" -m pip install "${AIRTIMEROOT}/python_apps/airtime_analyzer" --install-option="--install-scripts=/usr/bin"
|
||||||
systemInitInstall libretime-analyzer "$web_user"
|
systemInitInstall libretime-analyzer "$web_user"
|
||||||
verbose "...Done"
|
verbose "...Done"
|
||||||
|
|
||||||
verbose "\n * Installing API..."
|
verbose "\n * Installing API..."
|
||||||
loudCmd "python3 ${AIRTIMEROOT}/api/setup.py install --install-scripts=/usr/bin"
|
loudCmd "$python_bin" -m pip install "${AIRTIMEROOT}/api[prod]"
|
||||||
systemInitInstall libretime-api "$web_user"
|
systemInitInstall libretime-api "$web_user"
|
||||||
mkdir -p /etc/airtime
|
mkdir -p /etc/airtime
|
||||||
sed -e "s@WEB_USER@${web_user}@g" \
|
sed -e "s@WEB_USER@${web_user}@g" \
|
||||||
|
|
|
@ -2,9 +2,10 @@ all: lint
|
||||||
|
|
||||||
include ../../tools/python.mk
|
include ../../tools/python.mk
|
||||||
|
|
||||||
PIP_INSTALL := --editable .[dev]
|
PIP_INSTALL := --editable .
|
||||||
PYLINT_ARG := airtime-celery
|
PYLINT_ARG := airtime-celery
|
||||||
MYPY_ARG := airtime-celery
|
MYPY_ARG := airtime-celery
|
||||||
|
|
||||||
|
format: .format
|
||||||
lint: .pylint .mypy
|
lint: .pylint .mypy
|
||||||
clean: .clean
|
clean: .clean
|
||||||
|
|
|
@ -24,12 +24,5 @@ setup(
|
||||||
"kombu==4.6.10",
|
"kombu==4.6.10",
|
||||||
"configobj",
|
"configobj",
|
||||||
],
|
],
|
||||||
extras_require={
|
|
||||||
"prod": [],
|
|
||||||
"dev": [
|
|
||||||
"mypy",
|
|
||||||
"pylint",
|
|
||||||
],
|
|
||||||
},
|
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
)
|
)
|
||||||
|
|
|
@ -7,6 +7,7 @@ PYLINT_ARG := airtime_analyzer tests
|
||||||
MYPY_ARG := airtime_analyzer tests
|
MYPY_ARG := airtime_analyzer tests
|
||||||
PYTEST_ARG := --cov=airtime_analyzer tests
|
PYTEST_ARG := --cov=airtime_analyzer tests
|
||||||
|
|
||||||
|
format: .format
|
||||||
lint: .pylint .mypy
|
lint: .pylint .mypy
|
||||||
|
|
||||||
fixtures:
|
fixtures:
|
||||||
|
|
|
@ -35,14 +35,8 @@ setup(
|
||||||
"pycairo==1.19.1",
|
"pycairo==1.19.1",
|
||||||
],
|
],
|
||||||
extras_require={
|
extras_require={
|
||||||
"prod": [],
|
|
||||||
"dev": [
|
"dev": [
|
||||||
"distro",
|
"distro",
|
||||||
"mypy",
|
|
||||||
"pylint",
|
|
||||||
"pytest",
|
|
||||||
"pytest-cov",
|
|
||||||
"pytest-xdist",
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
|
|
|
@ -2,11 +2,12 @@ all: lint test
|
||||||
|
|
||||||
include ../../tools/python.mk
|
include ../../tools/python.mk
|
||||||
|
|
||||||
PIP_INSTALL := --editable .[dev]
|
PIP_INSTALL := --editable .
|
||||||
PYLINT_ARG := api_clients tests
|
PYLINT_ARG := api_clients tests
|
||||||
MYPY_ARG := api_clients tests
|
MYPY_ARG := api_clients tests
|
||||||
PYTEST_ARG := --cov=api_clients tests
|
PYTEST_ARG := --cov=api_clients tests
|
||||||
|
|
||||||
|
format: .format
|
||||||
lint: .pylint .mypy
|
lint: .pylint .mypy
|
||||||
test: .pytest
|
test: .pytest
|
||||||
clean: .clean
|
clean: .clean
|
||||||
|
|
|
@ -24,15 +24,5 @@ setup(
|
||||||
"python-dateutil>=2.7.0",
|
"python-dateutil>=2.7.0",
|
||||||
"requests",
|
"requests",
|
||||||
],
|
],
|
||||||
extras_require={
|
|
||||||
"prod": [],
|
|
||||||
"dev": [
|
|
||||||
"mypy",
|
|
||||||
"pylint",
|
|
||||||
"pytest",
|
|
||||||
"pytest-cov",
|
|
||||||
"pytest-xdist",
|
|
||||||
],
|
|
||||||
},
|
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,9 +2,10 @@ all: lint
|
||||||
|
|
||||||
include ../../tools/python.mk
|
include ../../tools/python.mk
|
||||||
|
|
||||||
PIP_INSTALL := --editable .[dev]
|
PIP_INSTALL := --editable .
|
||||||
PYLINT_ARG := liquidsoap pypo
|
PYLINT_ARG := liquidsoap pypo
|
||||||
MYPY_ARG := liquidsoap pypo
|
MYPY_ARG := liquidsoap pypo
|
||||||
|
|
||||||
|
format: .format
|
||||||
lint: .pylint .mypy
|
lint: .pylint .mypy
|
||||||
clean: .clean
|
clean: .clean
|
||||||
|
|
|
@ -38,12 +38,5 @@ setup(
|
||||||
"pytz",
|
"pytz",
|
||||||
"requests",
|
"requests",
|
||||||
],
|
],
|
||||||
extras_require={
|
|
||||||
"prod": [],
|
|
||||||
"dev": [
|
|
||||||
"mypy",
|
|
||||||
"pylint",
|
|
||||||
],
|
|
||||||
},
|
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
)
|
)
|
||||||
|
|
|
@ -2,11 +2,12 @@ all: lint test
|
||||||
|
|
||||||
include python.mk
|
include python.mk
|
||||||
|
|
||||||
PIP_INSTALL := -r requirements-dev.txt
|
PIP_INSTALL =
|
||||||
PYLINT_ARG := tools
|
PYLINT_ARG = tools
|
||||||
MYPY_ARG := .
|
MYPY_ARG = .
|
||||||
PYTEST_ARG := .
|
PYTEST_ARG = .
|
||||||
|
|
||||||
|
format: .format
|
||||||
lint: .pylint .mypy
|
lint: .pylint .mypy
|
||||||
test: .pytest
|
test: .pytest
|
||||||
clean: .clean
|
clean: .clean
|
||||||
|
|
|
@ -1,19 +1,34 @@
|
||||||
.ONESHELL:
|
.ONESHELL:
|
||||||
|
|
||||||
SHELL := bash
|
SHELL = bash
|
||||||
CPU_CORES := $(shell nproc)
|
CPU_CORES = $(shell nproc)
|
||||||
|
|
||||||
# PIP_INSTALL := --editable .[dev]
|
# PIP_INSTALL = --editable .
|
||||||
# PYLINT_ARG :=
|
# PYLINT_ARG =
|
||||||
# MYPY_ARG :=
|
# MYPY_ARG =
|
||||||
# PYTEST_ARG :=
|
# PYTEST_ARG =
|
||||||
|
|
||||||
VENV := venv
|
SHARED_DEV_REQUIREMENTS = \
|
||||||
|
black \
|
||||||
|
isort \
|
||||||
|
mypy \
|
||||||
|
pylint \
|
||||||
|
pytest \
|
||||||
|
pytest-cov \
|
||||||
|
pytest-xdist
|
||||||
|
|
||||||
|
VENV = venv
|
||||||
$(VENV):
|
$(VENV):
|
||||||
python3 -m venv $(VENV)
|
python3 -m venv $(VENV)
|
||||||
source $(VENV)/bin/activate
|
source $(VENV)/bin/activate
|
||||||
pip install --upgrade pip setuptools wheel
|
pip install --upgrade pip setuptools wheel
|
||||||
pip install $(PIP_INSTALL)
|
pip install $(SHARED_DEV_REQUIREMENTS) $(PIP_INSTALL)
|
||||||
|
|
||||||
|
.PHONY: .format
|
||||||
|
.format: $(VENV)
|
||||||
|
source $(VENV)/bin/activate
|
||||||
|
black .
|
||||||
|
isort --profile black .
|
||||||
|
|
||||||
.PHONY: .pylint
|
.PHONY: .pylint
|
||||||
.pylint: $(VENV)
|
.pylint: $(VENV)
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
mypy
|
|
||||||
pylint
|
|
||||||
pytest
|
|
||||||
pytest-xdist
|
|
Loading…
Reference in New Issue