[med-svn] [Git][med-team/biomaj3-download][upstream] New upstream version 3.0.21

Olivier Sallou gitlab at salsa.debian.org
Sat Mar 9 10:11:37 GMT 2019


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


Commits:
5de3aa6a by Olivier Sallou at 2019-03-09T09:47:57Z
New upstream version 3.0.21
- - - - -


6 changed files:

- .travis.yml
- CHANGES.txt
- biomaj_download/biomaj_download_web.py
- requirements.txt
- setup.py
- tests/biomaj_tests.py


Changes:

=====================================
.travis.yml
=====================================
@@ -1,29 +1,29 @@
 language: python
 sudo: false
 python:
-  - "2.7"
-  - "3.4"
-  - "3.5"
+- '2.7'
+- '3.4'
+- '3.5'
+- '3.6'
 services:
-  - redis
-# Apply only on main branches
+- redis
 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 -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
+- pip install -r requirements.txt
+- pip install coverage nose
+- pip install python-coveralls
+- python setup.py -q install
 script:
-   - python setup.py test
-   - flake8 --ignore E501 biomaj_download/*.py biomaj_download/download
-#after_success:
-#  - coveralls
-
+- nosetests -a '!network'
+- flake8 --ignore E501 biomaj_download/*.py biomaj_download/download
+deploy:
+  provider: pypi
+  skip_existing: true
+  user: osallou
+  password:
+    secure: fMEDYld7N2uRbICa++b7dTUXxt6VxSD1ZE+ZaTHQWxHHSK5fxbdwvsVHicdgKH3erMOXb7foumQ6uxBAtQTVmY+ZJbidydT/BEeoLjIH0NxVoTLCOllWKHOKm8LzgigVjbSVqXi7ZZ6rzigpQbg7NCdiD4wQr6xLO+gB3LrWovIgcPIlWDLWiMIp0P3b9nmoOdiSBBpLXI7i9W7ksL25Mopx/p4OoeWFEbg7aSkRVKufWLCoyLnYnWCnmC0MK7PF7V7mgiw+Gutv3XcOgfaZ/MU088+OrpvnLxfKplkwukcMBc4cuMV8mtWmDaQ9u2X9MLoeyRoQ6jHyIvftW+fn4Ck3wzyKZA3Pbz5+UVUG6GVpnwm3NIYvPl0m62brVVqs/wVaI8HB/7u5qn60ER9u9l9/YGIG5rsPrb2w12QFmcjwrge2T9h+aDW3+fQuzbjVGJMBCLqu9hUoiz9WHWqa74Ka8OfP+fTA3vpASGfuYhzdlJ5tDO6M1kjIe23ga5DhUMKHyl4j7uA/YVxc5numYU9naD/PyZw1qqms8zhJdVmIsBMtBP/MeH0YVrhmQS7p4ni7BB545JBYv8UyUfVXt2DcQHG9EAkMT69QfJhSl9KICe4SmlHVYy2Uldw/LE/FwYmngfDzZUYtndsn2xS+NVi3FwMNa1+6q0Sqqmzfmqc=
+  distributions: sdist bdist_wheel
+  on:
+    tags: true


=====================================
CHANGES.txt
=====================================
@@ -1,3 +1,8 @@
+3.0.21:
+  Fix traefik labels
+3.0.20:
+  Update pika dependency release
+  Add tags for traefik support
 3.0.19:
   Check archives after download
   Fix python regexps syntax (deprecation)


=====================================
biomaj_download/biomaj_download_web.py
=====================================
@@ -30,7 +30,7 @@ download_time_metric = Counter("biomaj_download_file_time", "Bank download file
 
 config_file = 'config.yml'
 if 'BIOMAJ_CONFIG' in os.environ:
-        config_file = os.environ['BIOMAJ_CONFIG']
+    config_file = os.environ['BIOMAJ_CONFIG']
 
 config = None
 with open(config_file, 'r') as ymlfile:
@@ -41,7 +41,19 @@ with open(config_file, 'r') as ymlfile:
 def consul_declare(config):
     if config['consul']['host']:
         consul_agent = consul.Consul(host=config['consul']['host'])
-        consul_agent.agent.service.register('biomaj-download', service_id=config['consul']['id'], address=config['web']['hostname'], port=config['web']['port'], tags=['biomaj'])
+        consul_agent.agent.service.register(
+            'biomaj-download',
+            service_id=config['consul']['id'],
+            address=config['web']['hostname'],
+            port=config['web']['port'],
+            tags=[
+                'biomaj',
+                'api',
+                'traefik-int.backend=biomaj-download',
+                'traefik-int.frontend.rule=PathPrefix:/api/download',
+                'traefik-int.enable=true'
+            ]
+        )
         check = consul.Check.http(url='http://' + config['web']['hostname'] + ':' + str(config['web']['port']) + '/api/download', interval=20)
         consul_agent.agent.check.register(config['consul']['id'] + '_check', check=check, service_id=config['consul']['id'])
 


=====================================
requirements.txt
=====================================
@@ -2,7 +2,7 @@ mock
 nose
 pycurl
 py-bcrypt
-pika==0.11.2
+pika==0.13.0
 redis
 PyYAML
 protobuf
@@ -10,7 +10,7 @@ flask
 python-consul
 prometheus_client>=0.0.18
 requests
-biomaj_core>=3.0.12
+biomaj_core>=3.0.16
 biomaj_zipkin
 flake8
 humanfriendly


=====================================
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.19',
+    'version': '3.0.21',
      'classifiers': [
         # How mature is this project? Common values are
         #   3 - Alpha
@@ -46,7 +46,7 @@ config = {
                          'biomaj_zipkin',
                          'pycurl',
                          'py-bcrypt',
-                         'pika==0.11.2',
+                         'pika==0.13.0',
                          'redis',
                          'PyYAML',
                          'flask',


=====================================
tests/biomaj_tests.py
=====================================
@@ -320,21 +320,21 @@ class TestBiomajDirectFTPDownload(unittest.TestCase):
     self.utils.clean()
 
   def test_ftp_list(self):
-    file_list = ['/blast/db/FASTA/alu.n.gz.md5']
-    ftpd = DirectFTPDownload('ftp', 'ftp.ncbi.nih.gov', '')
+    file_list = ['/debian/doc/mailing-lists.txt']
+    ftpd = DirectFTPDownload('ftp', 'ftp.fr.debian.org', '')
     ftpd.set_files_to_download(file_list)
     (file_list, dir_list) = ftpd.list()
     ftpd.close()
     self.assertTrue(len(file_list) == 1)
 
   def test_download(self):
-    file_list = ['/blast/db/FASTA/alu.n.gz.md5']
-    ftpd = DirectFTPDownload('ftp', 'ftp.ncbi.nih.gov', '')
+    file_list = ['/debian/doc/mailing-lists.txt']
+    ftpd = DirectFTPDownload('ftp', 'ftp.fr.debian.org', '')
     ftpd.set_files_to_download(file_list)
     (file_list, dir_list) = ftpd.list()
     ftpd.download(self.utils.data_dir, False)
     ftpd.close()
-    self.assertTrue(os.path.exists(os.path.join(self.utils.data_dir,'alu.n.gz.md5')))
+    self.assertTrue(os.path.exists(os.path.join(self.utils.data_dir,'mailing-lists.txt')))
 
 
 @attr('directhttp')
@@ -431,17 +431,14 @@ class TestBiomajFTPDownload(unittest.TestCase):
 
   def test_ftp_list(self):
     ftpd = FTPDownload('ftp', 'speedtest.tele2.net', '/')
-    # ftpd = FTPDownload('ftp', 'ftp.ncbi.nih.gov', '/blast/db/FASTA/')
     (file_list, dir_list) = ftpd.list()
     ftpd.close()
     self.assertTrue(len(file_list) > 1)
 
   @attr('test')
   def test_download(self):
-    # ftpd = FTPDownload('ftp', 'ftp.ncbi.nih.gov', '/blast/db/FASTA/')
     ftpd = FTPDownload('ftp', 'speedtest.tele2.net', '/')
     (file_list, dir_list) = ftpd.list()
-    # ftpd.match([r'^alu.*\.gz$'], file_list, dir_list)
     ftpd.match([r'^1.*KB\.zip$'], file_list, dir_list)
     try:
         ftpd.download(self.utils.data_dir)
@@ -453,11 +450,9 @@ class TestBiomajFTPDownload(unittest.TestCase):
     # self.assertTrue(len(ftpd.files_to_download) == 2)
 
   def test_download_skip_uncompress_checks(self):
-    # ftpd = FTPDownload('ftp', 'ftp.ncbi.nih.gov', '/blast/db/FASTA/')
     os.environ['UNCOMPRESS_SKIP_CHECK'] = "1"
     ftpd = FTPDownload('ftp', 'speedtest.tele2.net', '/')
     (file_list, dir_list) = ftpd.list()
-    # ftpd.match([r'^alu.*\.gz$'], file_list, dir_list)
     ftpd.match([r'^1.*KB\.zip$'], file_list, dir_list)
     ftpd.download(self.utils.data_dir)
     ftpd.close()
@@ -465,19 +460,19 @@ class TestBiomajFTPDownload(unittest.TestCase):
     del os.environ['UNCOMPRESS_SKIP_CHECK']
 
   def test_download_in_subdir(self):
-    ftpd = FTPDownload('ftp', 'ftp.ncbi.nih.gov', '/blast/')
+    ftpd = FTPDownload('ftp', 'ftp.fr.debian.org', '/debian/')
     (file_list, dir_list) = ftpd.list()
     try:
-        ftpd.match([r'^db/FASTA/alu.*\.gz$'], file_list, dir_list)
+        ftpd.match([r'^doc/mailing-lists.txt$'], file_list, dir_list)
     except Exception as e:
         print("Error: " + str(e))
         self.skipTest("Skipping test due to remote server error")
     ftpd.download(self.utils.data_dir)
     ftpd.close()
-    self.assertTrue(len(ftpd.files_to_download) == 2)
+    self.assertTrue(len(ftpd.files_to_download) == 1)
 
   def test_download_or_copy(self):
-    ftpd = FTPDownload('ftp', 'ftp.ncbi.nih.gov', '/blast/')
+    ftpd = FTPDownload('ftp', 'ftp.fr.debian.org', '/debian/')
     ftpd.files_to_download = [
           {'name':'/test1', 'year': '2013', 'month': '11', 'day': '10', 'size': 10},
           {'name':'/test2', 'year': '2013', 'month': '11', 'day': '10', 'size': 10},



View it on GitLab: https://salsa.debian.org/med-team/biomaj3-download/commit/5de3aa6af2d0f6468e5d5c6be0b8262675f2ad7c

-- 
View it on GitLab: https://salsa.debian.org/med-team/biomaj3-download/commit/5de3aa6af2d0f6468e5d5c6be0b8262675f2ad7c
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/20190309/2e6e9680/attachment-0001.html>


More information about the debian-med-commit mailing list