瀏覽代碼

added github actions conf

Avik Datta 2 年之前
父節點
當前提交
794ffc606b
共有 3 個文件被更改,包括 220 次插入1 次删除
  1. 46 0
      .github/workflows/python-app.yml
  2. 158 1
      requirements.txt
  3. 16 0
      tox.ini

+ 46 - 0
.github/workflows/python-app.yml

@@ -0,0 +1,46 @@
+# This workflow will install Python dependencies, run tests and lint with a single version of Python
+# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
+
+name: Python application
+
+on:
+  push:
+    branches: [ main ]
+  pull_request:
+    branches: [ main ]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v2
+    - name: Set up Python 3.7
+      uses: actions/setup-python@v2
+      with:
+        python-version: 3.7
+    - name: Install dependencies
+      run: |
+        python -m pip install --upgrade pip
+        pip install flake8 pytest
+        if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
+    - name: Lint with flake8
+      run: |
+        # stop the build if there are Python syntax errors or undefined names
+        flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
+        # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
+        flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
+    - name: Checkout other repo
+      uses: actions/checkout@cellranger_v6
+      with:
+        repository: imperial-genomics-facility/data-management-python
+    - name: Test with pytest
+      run: |
+        pytest
+      env:
+        PYTHONPATH: $GITHUB_WORKSPACE/data-management-python:$PYTHONPATH
+        AIRFLOW__CORE__DAGBAG_IMPORT_TIMEOUT: 20
+        AIRFLOW__SECRETS__BACKEND: airflow.secrets.local_filesystem.LocalFilesystemBackend
+        AIRFLOW__SECRETS__BACKEND_KWARGS: '{"variables_file_path":"airflow_var/var.json","connections_file_path":"airflow_var/conn.json"}'
+

+ 158 - 1
requirements.txt

@@ -1,2 +1,159 @@
+alabaster==0.7.12
+alembic==1.4.2
+amqp==2.6.1
+apache-airflow==1.10.12
+apispec==1.3.3
+argcomplete==1.12.0
+asana==0.10.3
+attrs==19.3.0
+Babel==2.8.0
+bcrypt==3.2.0
+beautifulsoup4==4.9.3
+billiard==3.6.3.0
+bs4==0.0.1
+cached-property==1.5.1
+cachetools==4.1.1
+cattrs==1.0.0
+celery==4.4.7
+certifi==2020.6.20
+cffi==1.14.2
+chardet==3.0.4
+click==6.7
+colorama==0.4.3
+colorlog==4.0.2
+configparser==3.5.3
+coverage==5.3
+coveralls==1.3.0
+croniter==0.3.34
+cryptography==3.0
+defusedxml==0.6.0
+dill==0.3.2
+dnspython==1.16.0
+docopt==0.6.2
+docutils==0.16
+email-validator==1.1.1
+Flask==1.1.2
+Flask-Admin==1.5.4
+Flask-AppBuilder==2.3.4
+Flask-Babel==1.0.0
+Flask-Caching==1.3.3
+Flask-JWT-Extended==3.24.1
+Flask-Login==0.4.1
+Flask-SQLAlchemy==2.4.4
+flask-swagger==0.2.14
+Flask-WTF==0.14.3
+flower==0.9.5
+funcsigs==1.0.2
+future==0.18.2
+graphviz==0.14.1
+grpc-google-iam-v1==0.12.3
+grpcio==1.31.0
+grpcio-gcp==0.2.2
+gunicorn==20.0.4
+gviz-api==1.9.0
+html5lib==1.0.1
+httplib2==0.18.1
+humanize==2.6.0
+idna==2.10
+imagesize==1.2.0
+importlib-metadata==1.7.0
+install==1.3.4
+iso8601==0.1.12
+itsdangerous==1.1.0
+Jinja2==2.11.2
+json-merge-patch==0.2
+jsonschema==3.2.0
+kombu==4.6.11
+lazy-object-proxy==1.5.1
+linecache2==1.0.0
+lockfile==0.12.2
+lxml==4.2.4
+Mako==1.1.3
+Markdown==2.6.11
+MarkupSafe==1.1.1
+marshmallow==2.21.0
+marshmallow-enum==1.5.1
+marshmallow-sqlalchemy==0.23.1
+natsort==7.0.1
+numpy==1.19.1
+oauthlib==3.1.0
+packaging==20.4
+pandas==1.1.0
+pandas-gbq==0.13.2
+paramiko==2.7.1
+pendulum==1.4.4
+prison==0.1.3
+prometheus-client==0.8.0
+protobuf==3.13.0
+psutil==5.7.2
+psycopg2-binary==2.8.5
+pyasn1==0.4.8
+pyasn1-modules==0.2.8
+pycparser==2.20
+pydata-google-auth==1.1.0
+Pygments==2.6.1
+PyJWT==1.7.1
+PyMySQL==0.9.2
+PyNaCl==1.4.0
+pyOpenSSL==19.1.0
+pyparsing==2.4.7
+pyrsistent==0.16.0
+python-daemon==2.2.4
+python-dateutil==2.8.1
+python-editor==1.0.4
+python-nvd3==0.15.0
+python-slugify==4.0.1
+python3-openid==3.2.0
+pytz==2020.1
+pytzdata==2020.1
+PyYAML==5.3.1
 redis==3.5.3
-apache-airflow[postgres,redis,slack,celery]==1.10.12
+requests==2.24.0
+requests-oauthlib==1.3.0
+rsa==4.6
+semver==2.10.2
+setproctitle==1.1.10
+six==1.15.0
+slackclient==1.3.2
+snowballstemmer==2.0.0
+soupsieve==2.0.1
+Sphinx==3.2.1
+sphinx-rtd-theme==0.4.3
+sphinxcontrib-applehelp==1.0.2
+sphinxcontrib-devhelp==1.0.2
+sphinxcontrib-htmlhelp==1.0.3
+sphinxcontrib-jsmath==1.0.1
+sphinxcontrib-qthelp==1.0.3
+sphinxcontrib-serializinghtml==1.1.4
+sphinx_rtd_theme==0.4.3
+spython==0.0.85
+SQLAlchemy==1.3.18
+SQLAlchemy-JSONField==0.9.0
+SQLAlchemy-Utils==0.36.8
+sshtunnel==0.2.2
+tabulate==0.8.7
+tenacity==4.12.0
+text-unidecode==1.3
+thrift==0.13.0
+tornado==5.1.1
+traceback2==1.4.0
+typing==3.7.4.3
+typing-extensions==3.7.4.2
+tzlocal==1.5.1
+unicodecsv==0.14.1
+unittest2==1.1.0
+uritemplate==3.0.1
+urllib3==1.25.10
+vine==1.3.0
+webencodings==0.5.1
+websocket-client==0.54.0
+Werkzeug==0.16.1
+WTForms==2.3.3
+xlrd==1.1.0
+zipp==3.1.0
+zope.deprecation==4.4.0
+matplotlib==3.3.2
+atlassian-python-api==3.14.0
+pytest==6.2.4
+flake8==3.9.2
+tox==3.24.3

+ 16 - 0
tox.ini

@@ -0,0 +1,16 @@
+[tox]
+envlist = 
+    py37
+
+[base]
+setenv =
+    AIRFLOW__CORE__DAGBAG_IMPORT_TIMEOUT = 20
+    AIRFLOW__SECRETS__BACKEND = airflow.secrets.local_filesystem.LocalFilesystemBackend
+    AIRFLOW__SECRETS__BACKEND_KWARGS = '{"variables_file_path":"airflow_var/var.json","connections_file_path":"airflow_var/conn.json"}'
+
+[testenv]
+deps = -rrequirements.txt
+commands =
+    pytest
+setenv =
+    {[base]setenv}