[med-svn] [Git][med-team/biomaj3-core][upstream] New upstream version 3.0.14

Olivier Sallou gitlab at salsa.debian.org
Thu Oct 25 10:15:13 BST 2018


Olivier Sallou pushed to branch upstream at Debian Med / biomaj3-core


Commits:
86e7d0c0 by Olivier Sallou at 2018-10-25T09:12:59Z
New upstream version 3.0.14
- - - - -


5 changed files:

- .travis.yml
- CHANGES.txt
- biomaj_core/config.py
- biomaj_core/utils.py
- setup.py


Changes:

=====================================
.travis.yml
=====================================
@@ -1,31 +1,27 @@
 language: python
 sudo: false
 python:
-  - "2.7"
-  - "3.4"
-  - "3.5"
-# Apply only on main branches
+- '2.7'
+- '3.4'
+- '3.5'
 branches:
   except:
-    - /^feature.*$/
-# command to install dependencies
-#before_install:
-#  - "sudo apt-get update -qq"
-#  - "sudo apt-get install -qq libldap2-dev libsasl2-dev"
+  - "/^feature.*$/"
 install:
-  - "pip install flake8"
-  - "pip install -r requirements.txt"
-  - "pip install coverage"
-  - "pip install python-coveralls"
-  - "python setup.py -q install"
-#  - "echo data_file=$TRAVIS_BUILD_DIR/.coverage >> .coveragerc"
-# command to run tests
-#before_script:
-#  - sleep 10
-#script: nosetests --with-coverage --cover-package=biomaj -a '!network'
-#script: nosetests --with-coverage --cover-package=biomaj
+- pip install flake8
+- pip install -r requirements.txt
+- pip install coverage
+- pip install python-coveralls
+- python setup.py -q install
 script:
-   - python setup.py test
-   - flake8 --ignore E501,E123 biomaj_core/*.py
-#  - coveralls
-
+- python setup.py test
+- flake8 --ignore E501,E123 biomaj_core/*.py
+deploy:
+  provider: pypi
+  skip_existing: true
+  user: osallou
+  password:
+    secure: OA4CxuI5Mcnk+hB9XoJK0W3i5EFv0cuZINr0TLDIiwxpt2446hHnJdxjVDnnZGanQnztgeFwOlIWZWbsytKsTWjd0rv6WtWXWxbJ8qgp+wE0IGaDV4Iceks9wogEiCjAs2URS8Kc2OdokhjWVcOZN8z9bABNPwSBaf5QBc++v96DGCTFF2JaOZlE6DL+AAKPldyXPYfRDcaTMw8CFnQ+TeJYJMX5Jm/U2RKLU37iZaDd2PV6IA1kHf5ZDaRkvsqR1Ycu67GjaUWYxLO3/GJsK9vMJLZeOi1/bBp2rwW8TYlbdFkGII0g+hGLCTwySrVPpWsv+zLaA9GgTIt8w2N6aOALob+Kgk64TRM/C0m01ABqnOyc6wfC+EbaaFMZYMjcJxexOlpM9HY3BPUPBUzdxP2M/g9hIBcLfYQeScM4a42wRFmCAN3CUUvhXvDXFrUQFrfrM/1jjMv/EnBIy1TEmDNa6aGfMh4/bEWW7Vyg+n72Zs1RrgFofE4MhVSWRq640e4DtFBtbJOp0f44AfSdMtUmOz3MulUTgE79XOvPZS0KIvQfVBv9G0XV3+iO4NXwGaxvbazuUicEdEit2EU26EypTMQI9NijIMeEzFzYAtwafL06oyTtL9D7ygu2VQHhbh7mz9ncZcx/hgl3MAvbQ/AEs08b060Jc15vDw8dko0=
+  distributions: sdist bdist_wheel
+  on:
+    tags: true


=====================================
CHANGES.txt
=====================================
@@ -1,3 +1,10 @@
+3.0.14:
+  Fix checks on local_endpoint_XXX in config.yml
+  In rabbitmq not defined on config.yml add an empty dict
+3.0.13:
+  Add archive integrity checks
+3.0.12:
+  Add irods support
 3.0.11:
   Add get_module_version static method, checks module version and latest version on pypi
   Allow .args fo process to be empty


=====================================
biomaj_core/config.py
=====================================
@@ -403,7 +403,7 @@ class BiomajConfig(object):
         else:
             protocol = self.get('protocol')
             allowed_protocols = ['none', 'multi', 'local', 'ftp', 'sftp', 'http',
-                                 'https', 'directftp', 'directhttp', 'directhttps', 'rsync']
+                                 'https', 'directftp', 'directhttp', 'directhttps', 'rsync', 'irods']
             if protocol not in allowed_protocols:
                 logging.error('Protocol not supported: ' + protocol)
                 status = False
@@ -422,6 +422,19 @@ class BiomajConfig(object):
                         not self.get('remote.list'):
                     logging.error('remote.files not set')
                     status = False
+            if 'irods' in protocol:
+                if not self.get('irods.user'):
+                    logging.error('irods user is not set')
+                    status = False
+                if not self.get('irods.password'):
+                    logging.error('irods password is not set')
+                    status = False
+                if not self.get('irods.port'):
+                    logging.error('irods port is not set')
+                    status = False
+                if not self.get('irods.protocol'):
+                    logging.error('irods protocol is not set')
+                    status = False
         if not self.get('local.files'):
             logging.error('local.files is not set')
             status = False


=====================================
biomaj_core/utils.py
=====================================
@@ -46,8 +46,9 @@ class Utils(object):
             if 'web' not in config or 'local_endpoint' not in config['web']:
                 return None
             return config['web']['local_endpoint']
-        if 'local_endpoint_' + service.lower() in config['web']:
-            return config['web']['local_endpoint_' + service.lower()]
+        service_endpoint_name = 'local_endpoint_' + service.lower()
+        if service_endpoint_name in config['web'] and config['web'][service_endpoint_name]:
+            return config['web'][service_endpoint_name]
         else:
             if 'web' not in config or 'local_endpoint' not in config['web']:
                 return None
@@ -55,6 +56,8 @@ class Utils(object):
 
     @staticmethod
     def service_config_override(config):
+        if 'rabbitmq' not in config:
+            config['rabbitmq'] = {}
         if 'RABBITMQ_HOST' in os.environ and os.environ['RABBITMQ_HOST']:
             config['rabbitmq']['host'] = os.environ['RABBITMQ_HOST']
         if 'RABBITMQ_PORT' in os.environ and os.environ['RABBITMQ_PORT']:
@@ -310,6 +313,33 @@ class Utils(object):
             file_to_copy['format'] = file_format
         return files_to_copy
 
+    @staticmethod
+    def archive_check(archivefile):
+        """
+        Test file archive integrity
+
+        :param file: full path to file to check and uncompress
+        :type file: str
+        :return: True if ok, False if an error occured
+        """
+        logger = logging.getLogger('biomaj')
+        try:
+            if archivefile.endswith('.tar.gz'):
+                subprocess.check_call("tar tfz " + archivefile, shell=True)
+            elif archivefile.endswith('.tar'):
+                subprocess.check_call("tar tf " + archivefile, shell=True)
+            elif archivefile.endswith('.bz2'):
+                subprocess.check_call("tar tjf " + archivefile, shell=True)
+            elif archivefile.endswith('.gz'):
+                subprocess.check_call("gunzip -t " + archivefile, shell=True)
+            elif archivefile.endswith('.zip'):
+                subprocess.check_call("unzip -t " + archivefile, shell=True)
+        except CalledProcessError as uncompresserror:
+            logger.error("Archive integrity error of %s: %s" % (archivefile, str(uncompresserror)))
+            return False
+
+        return True
+
     @staticmethod
     def uncompress(archivefile, remove=True):
         """


=====================================
setup.py
=====================================
@@ -21,7 +21,7 @@ config = {
     'url': 'http://biomaj.genouest.org',
     'download_url': 'http://biomaj.genouest.org',
     'author_email': 'olivier.sallou at irisa.fr',
-    'version': '3.0.11',
+    'version': '3.0.14',
      'classifiers': [
         'Development Status :: 5 - Production/Stable',
         'Environment :: Console',



View it on GitLab: https://salsa.debian.org/med-team/biomaj3-core/commit/86e7d0c0e35233a41cfdec81978006c45b72f58e

-- 
View it on GitLab: https://salsa.debian.org/med-team/biomaj3-core/commit/86e7d0c0e35233a41cfdec81978006c45b72f58e
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20181025/5dc293c5/attachment-0001.html>


More information about the debian-med-commit mailing list