Skip to content

Commit 5828e4a

Browse files
committed
update python april9 and refactor tests from user.dir
1 parent 6dbe8e5 commit 5828e4a

13 files changed

+108
-23
lines changed

python3/CHANGELOG.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,90 @@
11
# IBM Functions Python 3 Runtime Container
22

3+
## 1.4.0
4+
Changes:
5+
- update Python Runtime from 3.6.4 to 3.6.5
6+
- updated httplib2 from 0.10.3 to 0.11.3
7+
- updated kafka_python from 1.4.1 to 1.4.2
8+
- updated lxml from 4.1.1 to 4.2.1
9+
- updated python-dateutil from 2.6.1 to 2.7.2
10+
- updated virtualenv from 15.1.0 to 15.2.0
11+
- updated numpy from 1.14.1 to 1.14.2
12+
- updated scipy from 1.0.0 to 1.0.1
13+
- updated watson-developer-cloud from 1.0.2 to 1.3.0
14+
- updated ibm-cos-sdk from 2.0.2 to 2.1.0
15+
- updated ibmcloudsql from 0.2.5 to 0.2.13
16+
17+
Python version:
18+
- [3.6.5](https://github.com/docker-library/python/blob/a1aa406bfd8c7b129e6e0ee0ba972b863624ac0d/3.6/jessie/Dockerfile)
19+
20+
Python packages:
21+
- asn1crypto (0.24.0)
22+
- attrs (17.4.0)
23+
- autobahn (18.4.1)
24+
- Automat (0.6.0)
25+
- beautifulsoup4 (4.6.0)
26+
- botocore (1.10.4)
27+
- cassandra-driver (3.13.0)
28+
- certifi (2018.1.18)
29+
- cffi (1.11.5)
30+
- chardet (3.0.4)
31+
- click (6.7)
32+
- cloudant (2.8.1)
33+
- constantly (15.1.0)
34+
- cryptography (2.2.2)
35+
- cssselect (1.0.3)
36+
- docutils (0.14)
37+
- elasticsearch (5.5.2)
38+
- Flask (0.12.2)
39+
- gevent (1.2.2)
40+
- greenlet (0.4.13)
41+
- httplib2 (0.11.3)
42+
- hyperlink (18.0.0)
43+
- ibm-cos-sdk (2.1.0)
44+
- ibm-db (2.0.8a0)
45+
- ibmcloudsql (0.2.13)
46+
- idna (2.6)
47+
- incremental (17.5.0)
48+
- itsdangerous (0.24)
49+
- Jinja2 (2.10)
50+
- jmespath (0.9.3)
51+
- kafka-python (1.4.2)
52+
- lxml (4.2.1)
53+
- MarkupSafe (1.0)
54+
- numpy (1.14.2)
55+
- pandas (0.22.0)
56+
- parsel (1.4.0)
57+
- pika (0.11.2)
58+
- psycopg2 (2.7.4)
59+
- pyasn1 (0.4.2)
60+
- pyasn1-modules (0.2.1)
61+
- pycparser (2.18)
62+
- PyDispatcher (2.0.5)
63+
- pymongo (3.6.1)
64+
- pyOpenSSL (17.5.0)
65+
- pysolr (3.7.0)
66+
- python-dateutil (2.7.2)
67+
- pytz (2018.4)
68+
- queuelib (1.5.0)
69+
- redis (2.10.6)
70+
- requests (2.18.4)
71+
- scikit-learn (0.19.1)
72+
- scipy (1.0.1)
73+
- Scrapy (1.5.0)
74+
- service-identity (17.0.0)
75+
- simplejson (3.13.2)
76+
- six (1.11.0)
77+
- tornado (4.5.2)
78+
- Twisted (17.9.0)
79+
- txaio (2.10.0)
80+
- urllib3 (1.22)
81+
- virtualenv (15.2.0)
82+
- w3lib (1.19.0)
83+
- watson-developer-cloud (1.3.0)
84+
- Werkzeug (0.14.1)
85+
- wheel (0.30.0)
86+
- zope.interface (4.4.3)
87+
388

489
## 1.3.0
590
Changes:

python3/requirements.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,28 @@ flask == 0.12.2
66

77
# default available packages for python3action
88
beautifulsoup4 == 4.6.0
9-
httplib2 == 0.10.3
10-
kafka_python == 1.4.1
11-
lxml == 4.1.1
12-
python-dateutil == 2.6.1
9+
httplib2 == 0.11.3
10+
kafka_python == 1.4.2
11+
lxml == 4.2.1
12+
python-dateutil == 2.7.2
1313
requests == 2.18.4
1414
scrapy == 1.5.0
1515
simplejson == 3.13.2
16-
virtualenv == 15.1.0
16+
virtualenv == 15.2.0
1717
twisted == 17.9.0.
1818

1919
# packages for numerics
20-
numpy == 1.14.1
20+
numpy == 1.14.2
2121
scikit-learn == 0.19.1
22-
scipy == 1.0.0
22+
scipy == 1.0.1
2323
pandas == 0.22.0
2424

2525
# IBM specific python modules
2626
ibm_db == 2.0.8a
2727
cloudant == 2.8.1
28-
watson-developer-cloud == 1.0.2
29-
ibm-cos-sdk == 2.0.2
30-
ibmcloudsql == 0.2.5
28+
watson-developer-cloud == 1.3.0
29+
ibm-cos-sdk == 2.1.0
30+
ibmcloudsql == 0.2.13
3131

3232
# Compose Libs
3333
psycopg2 == 2.7.4

tests/dat/watson/testWatsonSDK.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from watson_developer_cloud import DiscoveryV1
44

55
def main(dict):
6-
return {"message": DiscoveryV1.VERSION_DATE_2017_11_07}
6+
return {"message": DiscoveryV1.default_url}
77

88
if __name__ == "__main__":
99
# execute only if run as a script

tests/src/test/scala/actionContainers/IBMPythonActionCOSTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class IBMPythonActionCOSTests extends TestHelpers with WskTestHelpers {
3030
implicit val wskprops: WskProps = WskProps()
3131
var defaultKind = Some("python-jessie:3")
3232
val wsk = new WskRest
33-
val datdir = System.getProperty("user.dir") + "/dat/cos/"
33+
val datdir = "tests/dat/cos/"
3434
val actionName = "testCOSSDK"
3535
val actionFileName = "testCOSSDK.py"
3636

tests/src/test/scala/actionContainers/IBMPythonActionCloudantTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class IBMPythonActionCloudantTests extends TestHelpers with WskTestHelpers {
3030
implicit val wskprops: WskProps = WskProps()
3131
var defaultKind = Some("python-jessie:3")
3232
val wsk = new WskRest
33-
val datdir = System.getProperty("user.dir") + "/dat/cloudant/"
33+
val datdir = "tests/dat/cloudant/"
3434
val actionName = "testCloudantSDK"
3535
val actionFileName = "testCloudantSDK.py"
3636

tests/src/test/scala/actionContainers/IBMPythonActionDB2Tests.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ class IBMPythonActionDB2Tests extends TestHelpers with WskTestHelpers with Befor
3232
implicit val wskprops: WskProps = WskProps()
3333
var defaultKind = Some("python-jessie:3")
3434
val wsk = new WskRest
35-
val userdir = System.getProperty("user.dir")
36-
val db2dir = userdir + "/dat/db2/"
35+
val db2dir = "tests/dat/db2/"
3736
val db2containerName = "db2test"
3837

3938
it should "test DB2 using local db2 container with python action" in withAssetCleaner(wskprops) { (wp, assetHelper) =>

tests/src/test/scala/actionContainers/IBMPythonActionWatsonTests.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class IBMPythonActionWatsonTests extends TestHelpers with WskTestHelpers {
3131
implicit val wskprops: WskProps = WskProps()
3232
var defaultKind = Some("python-jessie:3")
3333
val wsk = new WskRest
34-
val datdir = System.getProperty("user.dir") + "/dat/watson/"
34+
val datdir = "tests/dat/watson/"
3535
val actionName = "testWatsonSDK"
3636
val actionFileName = "testWatsonSDK.py"
3737

@@ -57,9 +57,9 @@ class IBMPythonActionWatsonTests extends TestHelpers with WskTestHelpers {
5757
withActivation(wsk.activation, wsk.action.invoke(actionName)) { activation =>
5858
val response = activation.response
5959
response.result.get.fields.get("error") shouldBe empty
60-
response.result.get.fields.get("message") should be(Some(JsString("2017-11-07")))
60+
response.result.get.fields.get("message") should equal(
61+
Some(JsString("https://gateway.watsonplatform.net/discovery/api")))
6162
}
6263

6364
}
64-
6565
}

tests/src/test/scala/integration/CredentialsIBMPythonCOSTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class CredentialsIBMPythonCOSTests extends TestHelpers with WskTestHelpers with
2929
implicit val wskprops: WskProps = WskProps()
3030
var defaultKind = Some("python-jessie:3")
3131
val wsk = new WskRest
32-
val datdir = System.getProperty("user.dir") + "/dat/cos"
32+
val datdir = "tests/dat/cos"
3333
val actionName = "testCOSService"
3434
val actionFileName = "testCOSService.py"
3535
val creds = TestUtils.getVCAPcredentials("cloud-object-storage")

tests/src/test/scala/integration/CredentialsIBMPythonCloudantTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class CredentialsIBMPythonCloudantTests extends TestHelpers with WskTestHelpers
3131
implicit val wskprops: WskProps = WskProps()
3232
var defaultKind = Some("python-jessie:3")
3333
val wsk = new WskRest
34-
val datdir = System.getProperty("user.dir") + "/dat/cloudant/"
34+
val datdir = "tests/dat/cloudant/"
3535
var creds = TestUtils.getVCAPcredentials("cloudantNoSQLDB")
3636
val actionName = "testCloudantService"
3737
val actionFileName = "testCloudantService.py"

tests/src/test/scala/integration/CredentialsIBMPythonDb2CloudTests.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class CredentialsIBMPythonDb2CloudTests extends TestHelpers with WskTestHelpers
2828
implicit val wskprops: WskProps = WskProps()
2929
val defaultKind = Some("python-jessie:3")
3030
val wsk = new WskRest
31-
val datdir = System.getProperty("user.dir") + "/dat/db2"
31+
val datdir = "tests/dat/db2"
3232
val actionName = "testDB2Service"
3333
val actionFileName = "testDB2Service.py"
3434

0 commit comments

Comments
 (0)