Skip to content

Commit

Permalink
SONARPY-975: Avoid running typeshed serializer in CI when not needed (S…
Browse files Browse the repository at this point in the history
  • Loading branch information
joke1196 authored Apr 25, 2023
1 parent 2745be6 commit a71c31c
Show file tree
Hide file tree
Showing 16 changed files with 502 additions and 114 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@ __pycache__
python-frontend/typeshed_serializer/serializer/proto_out

python-frontend/typeshed_serializer/output/*
python-frontend/typeshed_serializer/.tox
12 changes: 8 additions & 4 deletions python-frontend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<name>Python :: Frontend</name>
<properties>
<sonar.sources>pom.xml,src/main/java,typeshed_serializer/serializer</sonar.sources>
<sonar.sources>pom.xml,src/main/java,typeshed_serializer/serializer,typeshed_serializer/runners</sonar.sources>
<sonar.python.coverage.reportPaths>typeshed_serializer/cov.xml</sonar.python.coverage.reportPaths>
<sonar.python.version>3.9</sonar.python.version>
</properties>
Expand Down Expand Up @@ -144,16 +144,19 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<version>3.1.0</version>
<configuration>
<workingDirectory>typeshed_serializer</workingDirectory>
</configuration>
<executions>
<execution>
<id>tox</id>
<id>tox-runner</id>
<phase>generate-resources</phase>
<configuration>
<executable>tox</executable>
<executable>python</executable>
<arguments>
<argument>runners/tox_runner.py</argument>
</arguments>
</configuration>
<goals>
<goal>exec</goal>
Expand All @@ -169,6 +172,7 @@
<includes>
<include>src/*/java/**/*.java</include>
<include>typeshed_serializer/serializer/**/*.py</include>
<include>typeshed_serializer/runners/**/*.py</include>
<include>typeshed_serializer/tests/**/*.py</include>
</includes>
<excludes>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

docutils.parsers.null�
Parserdocutils.parsers.null.Parser"docutils.parsers.Parserj35j36j37j38j39j310r�
docutils.parsers.null�
Parserdocutils.parsers.null.Parser"builtins.objectj35j36j37j38j39j310r�
config_section_dependencies8docutils.parsers.null.Parser.config_section_dependenciesL
builtins.tuple[builtins.str]
builtins.str" builtins.str"builtins.tuple*35*36*37*38*39*310
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

geoip2.models�
geoip2.models�
Countrygeoip2.models.Country"geoip2.mixins.SimpleEquality*�
__init__geoip2.models.Country.__init__"
None*8
Expand All @@ -17,26 +17,26 @@ HTypeAlias[typing.Mapping[builtins.str,typing.Mapping[builtins.str,Any]]]
)Union[typing.Sequence[builtins.str],None]N
typing.Sequence[builtins.str]
builtins.str" builtins.str"typing.Sequence
None"geoip2.models._Locales z35z36z37z38z39z310j35j36j37j38j39j310rN
continentgeoip2.models.Country.continent
Any*35*36*37*38*39*310rJ
countrygeoip2.models.Country.country
Any*35*36*37*38*39*310r`
registered_country(geoip2.models.Country.registered_country
Any*35*36*37*38*39*310rb
represented_country)geoip2.models.Country.represented_country
Any*35*36*37*38*39*310rJ
maxmindgeoip2.models.Country.maxmind
Any*35*36*37*38*39*310rH
traitsgeoip2.models.Country.traits
Any*35*36*37*38*39*310r�
None"geoip2.models._Locales z35z36z37z38z39z310j35j36j37j38j39j310r{
continentgeoip2.models.Country.continent4
geoip2.records.Continent"geoip2.records.Continent*35*36*37*38*39*310rs
countrygeoip2.models.Country.country0
geoip2.records.Country"geoip2.records.Country*35*36*37*38*39*310r�
registered_country(geoip2.models.Country.registered_country0
geoip2.records.Country"geoip2.records.Country*35*36*37*38*39*310r�
represented_country)geoip2.models.Country.represented_countryF
!geoip2.records.RepresentedCountry"!geoip2.records.RepresentedCountry*35*36*37*38*39*310rs
maxmindgeoip2.models.Country.maxmind0
geoip2.records.MaxMind"geoip2.records.MaxMind*35*36*37*38*39*310ro
traitsgeoip2.models.Country.traits.
geoip2.records.Traits"geoip2.records.Traits*35*36*37*38*39*310r�
rawgeoip2.models.Country.raw�
HTypeAlias[typing.Mapping[builtins.str,typing.Mapping[builtins.str,Any]]]�
=typing.Mapping[builtins.str,typing.Mapping[builtins.str,Any]]
builtins.str" builtins.strY
typing.Mapping[builtins.str,Any]
builtins.str" builtins.str
Any"typing.Mapping"typing.Mapping"geoip2.models._RawResponse*35*36*37*38*39*310�
Any"typing.Mapping"typing.Mapping"geoip2.models._RawResponse*35*36*37*38*39*310�
Citygeoip2.models.City"geoip2.models.Country*�
__init__geoip2.models.City.__init__"
None*2
Expand All @@ -54,15 +54,16 @@ HTypeAlias[typing.Mapping[builtins.str,typing.Mapping[builtins.str,Any]]]
)Union[typing.Sequence[builtins.str],None]N
typing.Sequence[builtins.str]
builtins.str" builtins.str"typing.Sequence
None"geoip2.models._Locales z35z36z37z38z39z310j35j36j37j38j39j310rA
citygeoip2.models.City.city
Any*35*36*37*38*39*310rI
locationgeoip2.models.City.location
Any*35*36*37*38*39*310rE
postalgeoip2.models.City.postal
Any*35*36*37*38*39*310rQ
subdivisionsgeoip2.models.City.subdivisions
Any*35*36*37*38*39*310O
None"geoip2.models._Locales z35z36z37z38z39z310j35j36j37j38j39j310rd
citygeoip2.models.City.city*
geoip2.records.City"geoip2.records.City*35*36*37*38*39*310rt
locationgeoip2.models.City.location2
geoip2.records.Location"geoip2.records.Location*35*36*37*38*39*310rl
postalgeoip2.models.City.postal.
geoip2.records.Postal"geoip2.records.Postal*35*36*37*38*39*310r�
subdivisionsgeoip2.models.City.subdivisions_
!Tuple[geoip2.records.Subdivision]8
geoip2.records.Subdivision"geoip2.records.Subdivision*35*36*37*38*39*310O
Insightsgeoip2.models.Insights"geoip2.models.Cityj35j36j37j38j39j310S

Enterprisegeoip2.models.Enterprise"geoip2.models.Cityj35j36j37j38j39j310_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,19 @@ $Tuple[builtins.float,builtins.float]
CallableType[builtins.function]&
builtins.function"builtins.function*35*36*37*38*39*310*d
DEFAULT_CA_BUNDLE_PATH(requests.adapters.DEFAULT_CA_BUNDLE_PATH
Any*35*36*37*38*39*310*j
get_encoding_from_headers+requests.adapters.get_encoding_from_headers
Any*35*36*37*38*39*310*h
prepend_scheme_if_needed*requests.adapters.prepend_scheme_if_needed
Any*35*36*37*38*39*310*Z
get_auth_from_url#requests.adapters.get_auth_from_url
Any*35*36*37*38*39*310*R
urldefragauthrequests.adapters.urldefragauth
Any*35*36*37*38*39*310*�
Any*35*36*37*38*39*310*�
get_encoding_from_headers+requests.adapters.get_encoding_from_headersK
CallableType[builtins.function]&
builtins.function"builtins.function*35*36*37*38*39*310*�
prepend_scheme_if_needed*requests.adapters.prepend_scheme_if_neededK
CallableType[builtins.function]&
builtins.function"builtins.function*35*36*37*38*39*310*�
get_auth_from_url#requests.adapters.get_auth_from_urlK
CallableType[builtins.function]&
builtins.function"builtins.function*35*36*37*38*39*310*�
urldefragauthrequests.adapters.urldefragauthK
CallableType[builtins.function]&
builtins.function"builtins.function*35*36*37*38*39*310*�
extract_cookies_to_jar(requests.adapters.extract_cookies_to_jarK
CallableType[builtins.function]&
builtins.function"builtins.function*35*36*37*38*39*310*q
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@
kwz35z36z37z38z39z310*S
_connection)requests.packages.urllib3.util.connection *35*36*37*38*39*310*k
port_by_scheme7requests.packages.urllib3.connectionpool.port_by_scheme
Any*35*36*37*38*39*310*g
HTTPResponse5requests.packages.urllib3.connectionpool.HTTPResponse
Any*35*36*37*38*39*310*�
is_connection_dropped>requests.packages.urllib3.connectionpool.is_connection_droppedK
CallableType[builtins.function]&
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

tornado.httpserver�
tornado.httpserver�

HTTPServertornado.httpserver.HTTPServer"tornado.tcpserver.TCPServer"tornado.util.Configurable"-tornado.httputil.HTTPServerConnectionDelegate*�
HTTPServertornado.httpserver.HTTPServer"tornado.tcpserver.TCPServer"tornado.util.Configurable*�
__init__&tornado.httpserver.HTTPServer.__init__"
None*H
self>
Expand Down Expand Up @@ -73,8 +73,8 @@ chunk_size *
address_family5tornado.httpserver._HTTPRequestContext.address_family
Any*27rJ
remote_ip0tornado.httpserver._HTTPRequestContext.remote_ip
Any*27�
_ServerRequestAdapter(tornado.httpserver._ServerRequestAdapter"$tornado.httputil.HTTPMessageDelegate*�
Any*27�
_ServerRequestAdapter(tornado.httpserver._ServerRequestAdapter"builtins.object*�
__init__1tornado.httpserver._ServerRequestAdapter.__init__"
None*^
selfT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

tornado.web�=
tornado.web�=
RequestHandlertornado.web.RequestHandler"builtins.object*�
__init__#tornado.web.RequestHandler.__init__"
None*B
Expand Down Expand Up @@ -232,9 +232,9 @@ static_url%tornado.web.RequestHandler.static_url*
SUPPORTED_METHODS,tornado.web.RequestHandler.SUPPORTED_METHODS
Any*27rm
application&tornado.web.RequestHandler.application2
tornado.web.Application"tornado.web.Application*27r{
request"tornado.web.RequestHandler.requestH
"tornado.httputil.HTTPServerRequest""tornado.httputil.HTTPServerRequest*27r�
tornado.web.Application"tornado.web.Application*27r:
request"tornado.web.RequestHandler.request
Any*27r�
path_args$tornado.web.RequestHandler.path_argsJ
builtins.list[builtins.str]
builtins.str" builtins.str"builtins.list*27r�
Expand Down Expand Up @@ -275,9 +275,9 @@ initialize%tornado.web.RequestHandler.initializeK
options"tornado.web.RequestHandler.options�
*TypeAlias[CallableType[builtins.function]]K
CallableType[builtins.function]&
builtins.function"builtins.function"tornado.web._MethodType*27�
builtins.function"builtins.function"tornado.web._MethodType*27�

Applicationtornado.web.Application"-tornado.httputil.HTTPServerConnectionDelegate*�
Applicationtornado.web.Application"builtins.object*�
__init__ tornado.web.Application.__init__"
None*<
self2
Expand Down Expand Up @@ -334,8 +334,8 @@ ui_modules"tornado.web.Application.ui_modules
Any*27r=

ui_methods"tornado.web.Application.ui_methods
Any*27�
_RequestDispatchertornado.web._RequestDispatcher"$tornado.httputil.HTTPMessageDelegate*�
Any*27�
_RequestDispatchertornado.web._RequestDispatcher"builtins.object*�
__init__'tornado.web._RequestDispatcher.__init__"
None*J
self@
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,61 +31,14 @@ useragentswerkzeug.useragents *35*36*37*38*39*310*2
run_simplewerkzeug.run_simple
Any*35*36*37*38*39*310*?
test_appwerkzeug.test_app
Any*35*36*37*38*39*310*A
UserAgentwerkzeug.UserAgent
Any*35*36*37*38*39*310*�

_eastereggwerkzeug._eastereggK
CallableType[builtins.function]&
builtins.function"builtins.function*35*36*37*38*39*310*U
DebuggedApplicationwerkzeug.DebuggedApplication
Any*35*36*37*38*39*310*A
MultiDictwerkzeug.MultiDict
Any*35*36*37*38*39*310*Q
CombinedMultiDictwerkzeug.CombinedMultiDict
Any*35*36*37*38*39*310*=
Headerswerkzeug.Headers
Any*35*36*37*38*39*310*K
EnvironHeaderswerkzeug.EnvironHeaders
Any*35*36*37*38*39*310*I
ImmutableListwerkzeug.ImmutableList
Any*35*36*37*38*39*310*I
ImmutableDictwerkzeug.ImmutableDict
Any*35*36*37*38*39*310*S
ImmutableMultiDictwerkzeug.ImmutableMultiDict
Any*35*36*37*38*39*310*S
TypeConversionDictwerkzeug.TypeConversionDict
Any*35*36*37*38*39*310*e
ImmutableTypeConversionDict$werkzeug.ImmutableTypeConversionDict
Any*35*36*37*38*39*310*;
Acceptwerkzeug.Accept
Any*35*36*37*38*39*310*C

MIMEAcceptwerkzeug.MIMEAccept
Any*35*36*37*38*39*310*I
CharsetAcceptwerkzeug.CharsetAccept
Any*35*36*37*38*39*310*K
LanguageAcceptwerkzeug.LanguageAccept
Any*35*36*37*38*39*310*U
RequestCacheControlwerkzeug.RequestCacheControl
Any*35*36*37*38*39*310*W
ResponseCacheControlwerkzeug.ResponseCacheControl
Any*35*36*37*38*39*310*9
ETagswerkzeug.ETags
Any*35*36*37*38*39*310*A
HeaderSetwerkzeug.HeaderSet
Any*35*36*37*38*39*310*M
WWWAuthenticatewerkzeug.WWWAuthenticate
Any*35*36*37*38*39*310*I
Authorizationwerkzeug.Authorization
Any*35*36*37*38*39*310*I
FileMultiDictwerkzeug.FileMultiDict
Any*35*36*37*38*39*310*G
CallbackDictwerkzeug.CallbackDict
Any*35*36*37*38*39*310*E
FileStoragewerkzeug.FileStorage
Any*35*36*37*38*39*310*O
OrderedMultiDictwerkzeug.OrderedMultiDict
Any*35*36*37*38*39*310*a
ImmutableOrderedMultiDict"werkzeug.ImmutableOrderedMultiDict
Any*35*36*37*38*39*310*;
escapewerkzeug.escape
Any*35*36*37*38*39*310*O
Expand Down Expand Up @@ -150,19 +103,10 @@ MIMEAcceptwerkzeug.MIMEAccept
WWWAuthenticateMixinwerkzeug.WWWAuthenticateMixin
Any*35*36*37*38*39*310*i
CommonRequestDescriptorsMixin&werkzeug.CommonRequestDescriptorsMixin
Any*35*36*37*38*39*310*9
Localwerkzeug.Local
Any*35*36*37*38*39*310*G
LocalManagerwerkzeug.LocalManager
Any*35*36*37*38*39*310*C

LocalProxywerkzeug.LocalProxy
Any*35*36*37*38*39*310*C

LocalStackwerkzeug.LocalStack
Any*35*36*37*38*39*310*I
release_localwerkzeug.release_local
Any*35*36*37*38*39*310*�
Any*35*36*37*38*39*310*�
release_localwerkzeug.release_localK
CallableType[builtins.function]&
builtins.function"builtins.function*35*36*37*38*39*310*�
generate_password_hashwerkzeug.generate_password_hashK
CallableType[builtins.function]&
builtins.function"builtins.function*35*36*37*38*39*310*�
Expand Down
4 changes: 4 additions & 0 deletions python-frontend/typeshed_serializer/.coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[report]

exclude_lines =
if __name__ == .__main__.:
2 changes: 2 additions & 0 deletions python-frontend/typeshed_serializer/checksum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ec8fbfb2c613fcbee0e6ada09e4709d647365941dea12caa49199ac487ce1ff5
6065c4301981148c0a78c6f2d7a832947fdd11a221adcc44c75693097446b329
20 changes: 20 additions & 0 deletions python-frontend/typeshed_serializer/runners/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# SonarQube Python Plugin
# Copyright (C) 2011-2023 SonarSource SA
# mailto:info AT sonarsource DOT com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#

Loading

0 comments on commit a71c31c

Please sign in to comment.