From 5d8ca4ba629b8050d7e336e1f7e041df069bd827 Mon Sep 17 00:00:00 2001 From: Anthony Bretaudeau Date: Tue, 20 Aug 2024 14:45:17 +0200 Subject: [PATCH 1/4] Sort downloads in proper alphabetical order --- biomaj_download/downloadclient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 061e5623931dd9cf6b684321b96de780abe52c3b Mon Sep 17 00:00:00 2001 From: Anthony Bretaudeau Date: Tue, 20 Aug 2024 15:05:56 +0200 Subject: [PATCH 2/4] ci/build upgrade --- .github/workflows/ci.yml | 54 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 35 -------------------------- requirements.txt | 2 -- setup.cfg | 6 +++++ setup.py | 8 +++--- 5 files changed, 64 insertions(+), 41 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9a28924 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,54 @@ +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 flake8-import-order + - 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: | + 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/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..20213c7 100644 --- a/setup.py +++ b/setup.py @@ -22,10 +22,10 @@ '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', + 'author': 'GenOuest platform', + 'url': 'https://biomaj.genouest.org', + 'download_url': 'https://biomaj.genouest.org', + 'author_email': 'support@genouest.org', 'version': '3.2.11', 'classifiers': [ # How mature is this project? Common values are From 28a2bb37f112556cdcc335cfcc665a5b3cf22abe Mon Sep 17 00:00:00 2001 From: Anthony Bretaudeau Date: Tue, 20 Aug 2024 15:09:22 +0200 Subject: [PATCH 3/4] fix --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9a28924..bf59355 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: python-version: 3.8 - name: Install Flake8 run: | - pip install flake8 flake8-import-order + pip install flake8 - name: Flake8 run: flake8 --ignore=E501,W504 biomaj_download/*.py biomaj_download/download @@ -27,6 +27,8 @@ jobs: 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 From 062b14681d732f7c666ab8c776b5e827f6373f7c Mon Sep 17 00:00:00 2001 From: Anthony Bretaudeau Date: Tue, 20 Aug 2024 15:18:28 +0200 Subject: [PATCH 4/4] prepare release --- CHANGES.txt | 3 +++ setup.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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/setup.py b/setup.py index 20213c7..9db6dec 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ 'url': 'https://biomaj.genouest.org', 'download_url': 'https://biomaj.genouest.org', 'author_email': 'support@genouest.org', - 'version': '3.2.11', + 'version': '3.2.12', 'classifiers': [ # How mature is this project? Common values are # 3 - Alpha