Repository: EBI-Metagenomics/emg-toolkit (language: python)

Issue:
Dev



Discussion / hints:

Fix patch:
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 116b88a..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-language: python
-
-python:
-  - '3.5'
-  - '3.6'
-  - '3.7'
-  - '3.8'
-
-before_install:
-  - python -V
-
-cache:
-  - pip
-
-install:
-  - pip install -r requirements-test.txt
-  - python setup.py sdist bdist_wheel
-  - TARGZ=$(ls dist/mg-toolkit*.tar.gz)
-  - pip install -U $TARGZ
-
-before_script:
-  - flake8 --version
-  - flake8 $TRAVIS_BUILD_DIR/mg_toolkit --config $TRAVIS_BUILD_DIR/tox.ini --show-source --statistics
-
-script:
-  - cd $TRAVIS_BUILD_DIR/tests
-  - bash run_tests.sh
-
-notifications:
-  slack:
-    secure: D1lBmpLSuEeXIk/LYekDz+tzH9jxIGw+ocCI44Pwzxq8hLzQ9vSR6m4djogWLjmgw6eqxd+RVj9i/9+eccuHJ9CNTl+8Hy8p2i6ou/OjAR2gRry/wFOuSBJyX2Lc8/tA8kuYstkXgCE7RpoI40gH/ksI2yr/rUKLLd9yUPpo3kdZ3ZZ2qpiaz38n8Hojp3BDjjzWc1cQfGat59uF5Pkf3PPjv2fHQglBSph1ei2ldY77ui71BBDTetXFOPchRo2Xl0mDCu3BVtro8xpXhAWgfFCtuwqSqXYrOhGXAI20Rkp+ZUrEGTIDmUNyMLVBO+V7S8o2D/K4XtMQbrAnpo2y4fQRiuFHtl+5wS6oj6S8ICl/CfKDyENzEGDZjB6jQ0ygix/z4rmdYjPcc9T+zBE8FJnC3SBzTEEFvMPZOm/nGYOOIFhr8jdvS78jXemTndhvWiDYtRY9guL4vseF8Cg/msOsaKbr9ZmPomk0mqZZ6eNv+4lUJvpczo7DiAQIoMEg0yLT/51raEzQd0JdrrTg8ePvH+vfYEgzxTv+TuCJ8S/kbxkh4zRDfqTUT3gIH5Y7+onpMiOHkZYufbso00JHyJM+LzocjxC5pzJ7TJteMt7RrLll4qf2+DQQ0p+kSnxf/LZklGFY4xVnI52fDPQHqWWwj1GfN/eojHoviuMCnqo=
diff --git a/README.md b/README.md
index b139fd7..be8f086 100644
--- a/README.md
+++ b/README.md
@@ -106,6 +106,24 @@ How to download specific result file groups (e.g. functional analysis only) for
     $ mg-toolkit -d bulk_download -a ERP009703 -g functional_analysis
 
 
+The bulk uploader will store a .tsv file with all the metadata for each downloaded file.
+
+
+Usage as a python package
+=========================
+
+⚠️ Liable to change ⚠️ 
+
+Whilst `mg_toolkit` is designed as a command-line tool, it is a set of python modules with helper classes that could be useful in your own python scripts. These internal APIs and call signatures may change over time. See [main()](mg_toolkit/__main__.py) for default arguments.
+
+#### Example
+
+```python
+from mg_toolkit.metadata import OriginalMetadata
+erp001736 = OriginalMetadata('ERP001736')
+erp001736.fetch_metadata()
+```
+
 Contributors
 ============
 


Test patch:
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
new file mode 100644
index 0000000..9da6cc8
--- /dev/null
+++ b/.github/workflows/test.yaml
@@ -0,0 +1,49 @@
+name: Testing
+
+on: [push, pull_request]
+
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        python-version: [3.6, 3.7, 3.8, 3.9]
+
+    steps:
+    - uses: actions/checkout@v2
+    - name: 🐍 - Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v2
+      with:
+        python-version: ${{ matrix.python-version }}
+
+    - name: 🔧 - Install Dependencies
+      run: |
+        pip install -r requirements-test.txt
+        python setup.py sdist bdist_wheel
+        TARGZ=$(ls dist/mg-toolkit*.tar.gz)
+        pip install -U $TARGZ
+
+    - name: 🍦 - Flake
+      continue-on-error: true
+      run: |
+        flake8 --version
+        flake8 -v . --config $TRAVIS_BUILD_DIR/tox.ini --show-source --statistics
+
+    - name: 🧪 - Testing
+      working-directory: tests
+      run: |
+        bash run_tests.sh
+
+    - name: 📮 - Slack Notification
+      uses: rtCamp/action-slack-notify@v2
+      continue-on-error: true
+      if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop'
+      env:
+        SLACK_COLOR: "${{ job.status == 'success' && 'good' || 'danger' }}"
+        SLACK_USERNAME: "Github Actions API"
+        SLACK_ICON_EMOJI: ":octocat:"
+        SLACK_TITLE: "CI emg-toolkit results in GitHub Actions"
+        SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
+        SLACK_CHANNEL: "#metagenomics-notify"
+        MSG_MINIMAL: Actions URL
diff --git a/requirements-test.txt b/requirements-test.txt
index ed8cc9d..d9ea735 100644
--- a/requirements-test.txt
+++ b/requirements-test.txt
@@ -3,3 +3,4 @@
 # run pip install -r requirements-test
 
 flake8~=3.8.3
+wheel~=0.36.2
\ No newline at end of file
diff --git a/tests/integration/bulk_download/ERR169332.5_8S_rRNA.RF00002.fa.md5 b/tests/integration/bulk_download/ERR169332.5_8S_rRNA.RF00002.fa.md5
index e10ebdb..b991d1b 100644
--- a/tests/integration/bulk_download/ERR169332.5_8S_rRNA.RF00002.fa.md5
+++ b/tests/integration/bulk_download/ERR169332.5_8S_rRNA.RF00002.fa.md5
@@ -1,1 +1,1 @@
-65f1737f707dc53d168819750ad605a0  MGYS00002478/4.1/non-coding_rnas/ERR169332.5_8S_rRNA.RF00002.fa
\ No newline at end of file
+65f1737f707dc53d168819750ad605a0  MGYS00002478/4.1/non-coding_rnas/ERR169332.5_8S_rRNA.RF00002.fa
diff --git a/tests/integration/bulk_download/MGYS00002478_metadata.tsv.md5 b/tests/integration/bulk_download/MGYS00002478_metadata.tsv.md5
new file mode 100644
index 0000000..0d80044
--- /dev/null
+++ b/tests/integration/bulk_download/MGYS00002478_metadata.tsv.md5
@@ -0,0 +1,1 @@
+7c8b39409b05915616277defa459811e  MGYS00002478/MGYS00002478_metadata.tsv
diff --git a/tests/integration/sequence_search/sequence_search.csv.md5 b/tests/integration/sequence_search/sequence_search.csv.md5
index 064333f..94cedab 100644
--- a/tests/integration/sequence_search/sequence_search.csv.md5
+++ b/tests/integration/sequence_search/sequence_search.csv.md5
@@ -1,1 +1,1 @@
-881bcbe7f2c0529f9cbef1fb46ce77e1  sequence_search.csv
\ No newline at end of file
+881bcbe7f2c0529f9cbef1fb46ce77e1  sequence_search.csv
diff --git a/tests/run_tests.sh b/tests/run_tests.sh
index 724f284..d0ba442 100755
--- a/tests/run_tests.sh
+++ b/tests/run_tests.sh
@@ -28,11 +28,12 @@ mg-toolkit -d bulk_download -a MGYS00002478
 set +x
 
 md5sum -c bulk_download/ERR169332.5_8S_rRNA.RF00002.fa.md5
+md5sum -c bulk_download/MGYS00002478_metadata.tsv.md5
 rm -r MGYS00002478
 
 echo "Testing sequence_search"
 
-set -x  
+set -x
 mg-toolkit -d sequence_search --sequence sequence_search/test.fasta -db full evalue -E 1.1e-240 -domE 0.01 -incE 1.1e-240 -incdomE 0.01
 set +x