From c5df5ff6938028f593e8a64f224a43e7f57186d0 Mon Sep 17 00:00:00 2001 From: Daniel Abercrombie Date: Thu, 5 Dec 2019 07:51:59 -0500 Subject: [PATCH 01/10] Pass user to submit2 --- setup.py | 2 +- workflowwebtools/__init__.py | 2 +- workflowwebtools/manageactions.py | 3 ++- workflowwebtools/workflowtools.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 14f37b8..77a9c6f 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ 'passlib>=1.6', 'bcrypt', 'pyOpenSSL', - 'pyyaml', + 'pyyaml>=5.1', 'validators', 'tabulate', 'pymongo<3.5.0', diff --git a/workflowwebtools/__init__.py b/workflowwebtools/__init__.py index 9725434..31e4b4f 100644 --- a/workflowwebtools/__init__.py +++ b/workflowwebtools/__init__.py @@ -4,6 +4,6 @@ :author: Daniel Abercrombie """ -__version__ = '0.10.0' +__version__ = '0.10.1' __all__ = [] diff --git a/workflowwebtools/manageactions.py b/workflowwebtools/manageactions.py index 7e63e4e..5bb678b 100644 --- a/workflowwebtools/manageactions.py +++ b/workflowwebtools/manageactions.py @@ -182,7 +182,7 @@ def submitaction(user, workflows, action, session=None, **kwargs): return workflows, reasons, params -def submit2(documents): # pylint: disable=missing-docstring +def submit2(user, documents): # pylint: disable=missing-docstring coll = get_actions_collection() for document in documents: @@ -194,6 +194,7 @@ def submit2(documents): # pylint: disable=missing-docstring coll.update_one({'workflow': workflow}, {'$set': {'timestamp': int(time.time()), + 'user': user, 'parameters': params, 'acted': 0}}, upsert=True) diff --git a/workflowwebtools/workflowtools.py b/workflowwebtools/workflowtools.py index b922ef1..0919dc1 100644 --- a/workflowwebtools/workflowtools.py +++ b/workflowwebtools/workflowtools.py @@ -215,7 +215,7 @@ def getworkflows(self, prepid): @cherrypy.tools.json_out() def submit2(self): input_json = cherrypy.request.json - manageactions.submit2(input_json['documents']) + manageactions.submit2(cherrypy.request.login, input_json['documents']) self.update_statuses() return {'message': 'Done'} From 531def8d2ba132cc649e9f51aa63dd52735cb3d2 Mon Sep 17 00:00:00 2001 From: Daniel Abercrombie Date: Thu, 5 Dec 2019 08:44:56 -0500 Subject: [PATCH 02/10] Pandas dropped Python 2.7 support --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 77a9c6f..cbbc4fb 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ 'tabulate', 'pymongo<3.5.0', 'cx_Oracle', - 'pandas', + 'pandas<0.25.0', 'keras', 'tensorflow<2.0' ] From f646fdaee6ccb2b432774fcefd213eb44f96d06c Mon Sep 17 00:00:00 2001 From: Daniel Abercrombie Date: Thu, 5 Dec 2019 08:48:55 -0500 Subject: [PATCH 03/10] Problems with PyYAML too --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index cbbc4fb..8b5bdbe 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ 'passlib>=1.6', 'bcrypt', 'pyOpenSSL', - 'pyyaml>=5.1', + 'pyyaml>=5.1,<5.2', 'validators', 'tabulate', 'pymongo<3.5.0', From aa4316396f94ee057ae3fa47313e5298462a7af0 Mon Sep 17 00:00:00 2001 From: Daniel Abercrombie Date: Thu, 5 Dec 2019 08:54:05 -0500 Subject: [PATCH 04/10] Not PyYAML, numpy --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 8b5bdbe..416d747 100644 --- a/setup.py +++ b/setup.py @@ -22,13 +22,13 @@ 'more-itertools<6.0.0', 'cherrypy<18.0.0', 'mako', - 'numpy>=1.6.1', + 'numpy<2.0,>=1.14.5', 'scipy==1.1.0', 'scikit-learn==0.20.3', 'passlib>=1.6', 'bcrypt', 'pyOpenSSL', - 'pyyaml>=5.1,<5.2', + 'pyyaml>=5.1', 'validators', 'tabulate', 'pymongo<3.5.0', From 611d4c602c626e4ed405517d4ef96b815c772614 Mon Sep 17 00:00:00 2001 From: Daniel Abercrombie Date: Thu, 5 Dec 2019 09:02:45 -0500 Subject: [PATCH 05/10] Maybe older numpy --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 416d747..3f6d725 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ 'more-itertools<6.0.0', 'cherrypy<18.0.0', 'mako', - 'numpy<2.0,>=1.14.5', + 'numpy>=1.14.5,<1.17', 'scipy==1.1.0', 'scikit-learn==0.20.3', 'passlib>=1.6', From 818f44c9b75ce7f10b1047593b5ca467ea7db453 Mon Sep 17 00:00:00 2001 From: Daniel Abercrombie Date: Thu, 5 Dec 2019 09:14:56 -0500 Subject: [PATCH 06/10] Use newer numpy, but not too new --- setup.py | 2 +- workflowmonit/requirements.txt | 2 +- workflowmonit/stompAMQ.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index cbbc4fb..3f6d725 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ 'more-itertools<6.0.0', 'cherrypy<18.0.0', 'mako', - 'numpy>=1.6.1', + 'numpy>=1.14.5,<1.17', 'scipy==1.1.0', 'scikit-learn==0.20.3', 'passlib>=1.6', diff --git a/workflowmonit/requirements.txt b/workflowmonit/requirements.txt index 8ee8921..910ca16 100644 --- a/workflowmonit/requirements.txt +++ b/workflowmonit/requirements.txt @@ -1,4 +1,4 @@ schedule -git+https://github.com/dmwm/WMCore.git +CMSMonitoring stomp.py pyyaml>=5.1 diff --git a/workflowmonit/stompAMQ.py b/workflowmonit/stompAMQ.py index 8277b31..fcb473d 100644 --- a/workflowmonit/stompAMQ.py +++ b/workflowmonit/stompAMQ.py @@ -1,12 +1,12 @@ #!/usr/bin/env python import json -from WMCore.Services.StompAMQ.StompAMQ import StompAMQ +from CMSMonitoring import StompAMQ class stompAMQ(StompAMQ): """ - Overriding :py:mod:`WMCore.Services.StompAMQ.StompAMQ.StompAMQ`'s + Overriding :py:mod:`CMSMonitoring.StompAMQ`'s :py:func:`_send_single` method. The default ``destination`` -- **queue** is not authorizing me to write. """ From a5d1d01c1cde6d8b1be43924142e786c3542bca7 Mon Sep 17 00:00:00 2001 From: Daniel Abercrombie Date: Thu, 5 Dec 2019 09:48:05 -0500 Subject: [PATCH 07/10] What's crashing --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 0c0a3ab..d408a3d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,4 +13,5 @@ env: TMPDIR=$PWD/tmp install: - python setup.py install script: + - pip list - package=workflowwebtools opsspace-test From c5cfb240edf03055bd2dd0e472583b2865e3f025 Mon Sep 17 00:00:00 2001 From: Daniel Abercrombie Date: Thu, 5 Dec 2019 09:57:06 -0500 Subject: [PATCH 08/10] pytest bug --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index 3f6d725..b038020 100644 --- a/setup.py +++ b/setup.py @@ -28,6 +28,7 @@ 'passlib>=1.6', 'bcrypt', 'pyOpenSSL', + 'pytest>=4.4.2,<5.0' 'pyyaml>=5.1', 'validators', 'tabulate', From 95da2d3014137fb652c3e98a084d04505481f405 Mon Sep 17 00:00:00 2001 From: Daniel Abercrombie Date: Thu, 2 Jan 2020 09:58:49 -0500 Subject: [PATCH 09/10] Fix user to show up. --- setup.py | 6 ++---- workflowwebtools/__init__.py | 2 +- workflowwebtools/manageactions.py | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 3f6d725..4f2067b 100644 --- a/setup.py +++ b/setup.py @@ -23,8 +23,7 @@ 'cherrypy<18.0.0', 'mako', 'numpy>=1.14.5,<1.17', - 'scipy==1.1.0', - 'scikit-learn==0.20.3', + 'scikit-learn', 'passlib>=1.6', 'bcrypt', 'pyOpenSSL', @@ -34,7 +33,6 @@ 'pymongo<3.5.0', 'cx_Oracle', 'pandas<0.25.0', - 'keras', - 'tensorflow<2.0' + 'keras' ] ) diff --git a/workflowwebtools/__init__.py b/workflowwebtools/__init__.py index 31e4b4f..0d71089 100644 --- a/workflowwebtools/__init__.py +++ b/workflowwebtools/__init__.py @@ -4,6 +4,6 @@ :author: Daniel Abercrombie """ -__version__ = '0.10.1' +__version__ = '0.10.2' __all__ = [] diff --git a/workflowwebtools/manageactions.py b/workflowwebtools/manageactions.py index 5bb678b..216530d 100644 --- a/workflowwebtools/manageactions.py +++ b/workflowwebtools/manageactions.py @@ -188,13 +188,13 @@ def submit2(user, documents): # pylint: disable=missing-docstring for document in documents: workflow = document['workflow'] params = document['parameters'] + params['user'] = user cherrypy.log('About to insert workflow: %s action: %s' % (workflow, params)) coll.update_one({'workflow': workflow}, {'$set': {'timestamp': int(time.time()), - 'user': user, 'parameters': params, 'acted': 0}}, upsert=True) From 290480b4a5296d81a36577620a11d8a3e165b29b Mon Sep 17 00:00:00 2001 From: Daniel Abercrombie Date: Thu, 2 Jan 2020 14:50:58 -0500 Subject: [PATCH 10/10] Should be tensorflow in here too for docs --- docs/requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 4f4c94e..2a597f3 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,6 @@ -sphinx +sphinx<2 sphinx_rtd_theme sphinxcontrib-programoutput sphinxcontrib-autoanysrc -r ../workflowmonit/requirements.txt +tensorflow # This should probably be installed separately for production