Enable pylint in NG-SA
Change-Id: Icd02cdb18d2a014f75e78e5ba527ca6ede550178
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/osm_webhook_translator/requirements-dist.txt b/osm_webhook_translator/requirements-dist.txt
index 64ae136..334e0e6 100644
--- a/osm_webhook_translator/requirements-dist.txt
+++ b/osm_webhook_translator/requirements-dist.txt
@@ -22,7 +22,7 @@
# via -r osm_webhook_translator/requirements-dist.in
tomli==2.0.1
# via setuptools-scm
-typing-extensions==4.5.0
+typing-extensions==4.6.0
# via setuptools-scm
# The following packages are considered to be unsafe in a requirements file:
diff --git a/osm_webhook_translator/requirements.txt b/osm_webhook_translator/requirements.txt
index aab3c69..3989987 100644
--- a/osm_webhook_translator/requirements.txt
+++ b/osm_webhook_translator/requirements.txt
@@ -22,7 +22,7 @@
# via requests
click==8.1.3
# via uvicorn
-fastapi==0.95.1
+fastapi==0.95.2
# via -r osm_webhook_translator/requirements.in
h11==0.14.0
# via uvicorn
@@ -30,15 +30,15 @@
# via
# anyio
# requests
-pydantic==1.10.7
+pydantic==1.10.8
# via fastapi
-requests==2.30.0
+requests==2.31.0
# via -r osm_webhook_translator/requirements.in
sniffio==1.3.0
# via anyio
-starlette==0.26.1
+starlette==0.27.0
# via fastapi
-typing-extensions==4.5.0
+typing-extensions==4.6.0
# via pydantic
urllib3==2.0.2
# via requests
diff --git a/osm_webhook_translator/setup.py b/osm_webhook_translator/setup.py
index 3323757..9cdff36 100644
--- a/osm_webhook_translator/setup.py
+++ b/osm_webhook_translator/setup.py
@@ -30,7 +30,7 @@
name=_name,
description=_description,
long_description=README,
- version=__version__, # noqa: F821
+ version=__version__, # noqa: F821 # pylint: disable=E0602
author="ETSI OSM",
author_email="osmsupport@etsi.org",
maintainer="ETSI OSM",
diff --git a/osm_webhook_translator/src/osm_webhook_translator/_version.py b/osm_webhook_translator/src/osm_webhook_translator/_version.py
new file mode 100644
index 0000000..8042457
--- /dev/null
+++ b/osm_webhook_translator/src/osm_webhook_translator/_version.py
@@ -0,0 +1,18 @@
+#######################################################################################
+# Copyright ETSI Contributors and Others.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#######################################################################################
+__version__ = version = '12.0.4.dev21+g4e36505'
+__version_tuple__ = version_tuple = (12, 0, 4, 'dev21', 'g4e36505')
diff --git a/osm_webhook_translator/src/osm_webhook_translator/main.py b/osm_webhook_translator/src/osm_webhook_translator/main.py
index 6e9e718..7c4404c 100644
--- a/osm_webhook_translator/src/osm_webhook_translator/main.py
+++ b/osm_webhook_translator/src/osm_webhook_translator/main.py
@@ -54,7 +54,7 @@
# timeout and retries
except Exception as e:
logger.error(f"HTTP error: {repr(e)}")
- raise requests.HTTPException(status_code=403, detail=repr(e))
+ raise requests.HTTPError(status_code=403, detail=repr(e))
@app.post("/{input_endpoint}")
diff --git a/requirements-dev.in b/requirements-dev.in
index bb16c88..0ed692a 100644
--- a/requirements-dev.in
+++ b/requirements-dev.in
@@ -18,3 +18,4 @@
git+https://osm.etsi.org/gerrit/osm/common.git@master#egg=osm-common
-r https://osm.etsi.org/gitweb/?p=osm/common.git;a=blob_plain;f=requirements.txt;hb=master
apache-airflow==2.5.3
+urllib3==1.26.16
diff --git a/requirements-dev.txt b/requirements-dev.txt
index cd40b8f..b46cedb 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -20,7 +20,7 @@
# via -r https://osm.etsi.org/gitweb/?p=osm/common.git;a=blob_plain;f=requirements.txt;hb=master
aiosignal==1.3.1
# via aiohttp
-alembic==1.10.4
+alembic==1.11.1
# via apache-airflow
anyio==3.6.2
# via httpcore
@@ -42,7 +42,7 @@
# via flask-appbuilder
argcomplete==3.0.8
# via apache-airflow
-asgiref==3.6.0
+asgiref==3.7.0
# via apache-airflow-providers-http
async-timeout==4.0.2
# via
@@ -91,7 +91,7 @@
# via apache-airflow
connexion[flask]==2.14.2
# via apache-airflow
-cron-descriptor==1.3.0
+cron-descriptor==1.4.0
# via apache-airflow
croniter==1.3.14
# via apache-airflow
@@ -108,7 +108,7 @@
# -r https://osm.etsi.org/gitweb/?p=osm/common.git;a=blob_plain;f=requirements.txt;hb=master
# email-validator
# pymongo
-docutils==0.20
+docutils==0.20.1
# via python-daemon
email-validator==1.3.1
# via flask-appbuilder
@@ -138,7 +138,7 @@
# via
# apache-airflow
# flask-appbuilder
-flask-session==0.4.1
+flask-session==0.5.0
# via apache-airflow
flask-sqlalchemy==2.5.1
# via flask-appbuilder
@@ -158,9 +158,9 @@
# via apache-airflow
h11==0.14.0
# via httpcore
-httpcore==0.17.0
+httpcore==0.17.2
# via httpx
-httpx==0.24.0
+httpx==0.24.1
# via apache-airflow
idna==3.4
# via
@@ -300,7 +300,7 @@
# apispec
# clickclick
# connexion
-requests==2.30.0
+requests==2.31.0
# via
# apache-airflow-providers-http
# connexion
@@ -346,16 +346,19 @@
# via apache-airflow
text-unidecode==1.3
# via python-slugify
-typing-extensions==4.5.0
+typing-extensions==4.6.0
# via
# alembic
# apache-airflow
+ # asgiref
uc-micro-py==1.0.2
# via linkify-it-py
unicodecsv==0.14.1
# via apache-airflow
-urllib3==2.0.2
- # via requests
+urllib3==1.26.16
+ # via
+ # -r requirements-dev.in
+ # requests
werkzeug==2.2.3
# via
# apache-airflow
diff --git a/requirements-dist.txt b/requirements-dist.txt
index 6b66483..801c111 100644
--- a/requirements-dist.txt
+++ b/requirements-dist.txt
@@ -22,7 +22,7 @@
# via -r requirements-dist.in
tomli==2.0.1
# via setuptools-scm
-typing-extensions==4.5.0
+typing-extensions==4.6.0
# via setuptools-scm
# The following packages are considered to be unsafe in a requirements file:
diff --git a/requirements.txt b/requirements.txt
index 3818f76..4102f16 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -242,7 +242,7 @@
# oslo-config
regex==2023.5.5
# via dateparser
-requests==2.30.0
+requests==2.31.0
# via
# azure-core
# google-api-core
@@ -280,7 +280,7 @@
# python-ceilometerclient
# python-keystoneclient
# python-novaclient
-typing-extensions==4.5.0
+typing-extensions==4.6.0
# via azure-core
tzdata==2023.3
# via pandas
@@ -290,7 +290,7 @@
# via gnocchiclient
uritemplate==4.1.1
# via google-api-python-client
-urllib3==1.26.15
+urllib3==1.26.16
# via
# google-auth
# requests
diff --git a/tox.ini b/tox.ini
index 39d19f2..fb89d5c 100644
--- a/tox.ini
+++ b/tox.ini
@@ -16,7 +16,7 @@
#######################################################################################
[tox]
-envlist = black, flake8
+envlist = black, flake8, pylint, pylint-webhook
[tox:jenkins]
toxworkdir = /tmp/.tox
@@ -75,8 +75,16 @@
pylint
skip_install = true
commands =
- pylint -E src
- pylint -E osm_webhook_translator
+ pylint -E src setup.py --disable=E0401
+
+
+[testenv:pylint-webhook]
+changedir = {toxinidir}/osm_webhook_translator
+deps = -r{toxinidir}/osm_webhook_translator/requirements.txt
+ pylint
+skip_install = true
+commands =
+ pylint -E src setup.py
#######################################################################################