chore: only install extra modules when needed, bump up version (#103)
* chore: only install extra modules when needed, bump up version
* test: remove some of the versions to shorten test time
* test: give an image name to avoid unnecessary builds
diff --git a/tests/plugin/docker/Dockerfile.agent b/Dockerfile
similarity index 100%
rename from tests/plugin/docker/Dockerfile.agent
rename to Dockerfile
diff --git a/README.md b/README.md
index c3a8c8d..feb9f2a 100755
--- a/README.md
+++ b/README.md
@@ -20,8 +20,14 @@
The Python agent module is published to [Pypi](https://pypi.org/project/apache-skywalking/), from where you can use `pip` to install:
```shell
-# Install the latest version
-pip install apache-skywalking
+# Install the latest version, using the default gRPC protocol to report data to OAP
+pip install "apache-skywalking"
+
+# Install the latest version, using the http protocol to report data to OAP
+pip install "apache-skywalking[http]"
+
+# Install the latest version, using the kafka protocol to report data to OAP
+pip install "apache-skywalking[kafka]"
# Install a specific version x.y.z
# pip install apache-skywalking==x.y.z
diff --git a/setup.py b/setup.py
index 276cf81..295dd5c 100644
--- a/setup.py
+++ b/setup.py
@@ -25,7 +25,7 @@
setup(
name="apache-skywalking",
- version="0.4.0",
+ version="0.5.0",
description="Python Agent for Apache SkyWalking",
long_description=README,
long_description_content_type="text/markdown",
@@ -38,7 +38,6 @@
install_requires=[
"grpcio",
"grpcio-tools",
- "requests",
"packaging",
],
extras_require={
@@ -47,6 +46,12 @@
"pyyaml",
"pytest",
],
+ "http": [
+ "requests",
+ ],
+ "kafka": [
+ "kafka",
+ ],
},
classifiers=[
"Framework :: Flake8",
diff --git a/tests/plugin/docker/docker-compose.base.yml b/tests/plugin/docker/docker-compose.base.yml
index 8e70c24..7a2a09f 100644
--- a/tests/plugin/docker/docker-compose.base.yml
+++ b/tests/plugin/docker/docker-compose.base.yml
@@ -22,6 +22,7 @@
build:
context: .
dockerfile: Dockerfile.tool
+ image: skywalking-collector:ci
ports:
- 19876:19876
- 12800:12800
@@ -36,9 +37,9 @@
agent:
build:
context: ../../../
- dockerfile: tests/plugin/docker/Dockerfile.agent
args:
- SW_PYTHON_VERSION=${SW_PYTHON_VERSION:-latest}
+ image: skywalking-agent:ci
environment:
SW_AGENT_COLLECTOR_BACKEND_SERVICES: collector:19876
SW_AGENT_LOGGING_LEVEL: DEBUG
diff --git a/tests/plugin/sw_requests/test_request.py b/tests/plugin/sw_requests/test_request.py
index 7b50c2f..001f1f3 100644
--- a/tests/plugin/sw_requests/test_request.py
+++ b/tests/plugin/sw_requests/test_request.py
@@ -33,10 +33,7 @@
'requests==2.24.0',
'requests==2.20.0',
'requests==2.19.0',
- 'requests==2.18.0',
- 'requests==2.17.0',
'requests==2.13.0',
- 'requests==2.11.0',
'requests==2.9.0',
])
def test_plugin(self, docker_compose, version):
diff --git a/tests/plugin/sw_sanic/test_sanic.py b/tests/plugin/sw_sanic/test_sanic.py
index 2473a52..8fdec99 100644
--- a/tests/plugin/sw_sanic/test_sanic.py
+++ b/tests/plugin/sw_sanic/test_sanic.py
@@ -32,9 +32,6 @@
@pytest.mark.parametrize('version', [
'sanic==20.3.0',
'sanic==20.6.0',
- 'sanic==20.6.1',
- 'sanic==20.6.2',
- 'sanic==20.6.3',
'sanic==20.9.0',
'sanic==20.9.1',
])