diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..bf59355 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,56 @@ +name: Lint, test and publish + +on: ["push"] + +jobs: + + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install Flake8 + run: | + pip install flake8 + - name: Flake8 + run: flake8 --ignore=E501,W504 biomaj_download/*.py biomaj_download/download + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Install requirements + run: | + sudo apt update + sudo apt install libcurl4-openssl-dev libssl-dev + pip install pytest + python setup.py install + - name: Run tests + run: | + LOCAL_IRODS=0 NETWORK=0 pytest -v tests/biomaj_tests.py + + pypi: + runs-on: ubuntu-latest + needs: [lint, test] + name: Deploy release to Pypi + steps: + - name: Checkout + uses: actions/checkout@v4 + - uses: actions/setup-python@v1 + with: + python-version: 3.8 + - name: Python install + run: pip install -U pip setuptools build + - name: Build a binary wheel and a source tarball + run: python -m build --sdist --wheel --outdir dist/ . + - name: Publish distribution 📦 to PyPI + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.pypi_password }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 20faade..0000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -arch: -- amd64 -- ppc64le -language: python -sudo: false -python: -- '3.6' -- '3.7' -- '3.8' -services: -- redis -branches: - except: - - "/^feature.*$/" -addons: - apt: - packages: - - libgnutls-dev -install: -- pip install -r requirements.txt -- pip install coverage pytest -- pip install python-coveralls -- python setup.py -q install -script: -- LOCAL_IRODS=0 NETWORK=0 pytest -v tests/biomaj_tests.py -- 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 diff --git a/CHANGES.txt b/CHANGES.txt index 5fb6cda..adea372 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,6 @@ +3.2.12: + Sort downloads in proper alphabetical order + 3.2.11: fix direct handler in case of plugin usage diff --git a/biomaj_download/downloadclient.py b/biomaj_download/downloadclient.py index 3e1b9ed..0e2d6d9 100644 --- a/biomaj_download/downloadclient.py +++ b/biomaj_download/downloadclient.py @@ -209,7 +209,7 @@ def wait_for_download(self): for i in range(max_submit): if self.download_pool: logging.debug('Workflow:wf_download:RemoteDownload:RequestNewFile') - operation = self.download_pool.pop() + operation = self.download_pool.pop(0) self.ask_download(operation) nb_submitted += 1 diff --git a/requirements.txt b/requirements.txt index cd43f28..b90a344 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -pytest pycurl py-bcrypt pika==0.13.0 @@ -11,7 +10,6 @@ prometheus_client>=0.0.18 requests biomaj_core>=3.0.19 biomaj_zipkin -flake8 humanfriendly python-irodsclient simpleeval diff --git a/setup.cfg b/setup.cfg index 3c6e79c..003b83e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,8 @@ [bdist_wheel] universal=1 + +[metadata] +description-file = README.md + +[flake8] +ignore = E501,W504 diff --git a/setup.py b/setup.py index 4dea537..9db6dec 100644 --- a/setup.py +++ b/setup.py @@ -22,11 +22,11 @@ 'description': 'BioMAJ download service', 'long_description': README + '\n\n' + CHANGES, 'long_description_content_type': 'text/markdown', - 'author': 'Olivier Sallou', - 'url': 'http://biomaj.genouest.org', - 'download_url': 'http://biomaj.genouest.org', - 'author_email': 'olivier.sallou@irisa.fr', - 'version': '3.2.11', + 'author': 'GenOuest platform', + 'url': 'https://biomaj.genouest.org', + 'download_url': 'https://biomaj.genouest.org', + 'author_email': 'support@genouest.org', + 'version': '3.2.12', 'classifiers': [ # How mature is this project? Common values are # 3 - Alpha