Skip to content

Commit

Permalink
Merge pull request #29 from Ensembl/features/es-connexion
Browse files Browse the repository at this point in the history
Features/es connexion
  • Loading branch information
marcoooo authored May 4, 2023
2 parents ea80817 + 868139b commit 678a535
Show file tree
Hide file tree
Showing 16 changed files with 249 additions and 211 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ env:
ES_INDEX: "datacheck_results"
ES_PORT: "9200"
ES_HOST: "localhost"
ES_USER: ""
ES_PASSWORD: ""

before_install:
- sudo rm /usr/local/bin/docker-compose
Expand All @@ -23,8 +25,7 @@ before_install:

before_script:
- docker-compose -f src/tests/docker-compose.yml up -d
- pip install -r requirements.txt
- pip install coverage
- pip install -r requirements-test.txt
- pip install .

script:
Expand Down
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ COPY --chown=appuser:appuser . /home/appuser/datachecks
#Install dependencies
RUN python -m venv /home/appuser/datachecks/venv
ENV PATH="/home/appuser/datachecks/venv/bin:$PATH"
RUN pip install -r requirements.txt
RUN pip install wheel
RUN pip install --upgrade pip
RUN pip install .
# clone datacheck app
ENV DATACHECK_CONFIG_PATH="/home/appuser/datachecks/config.yaml"
RUN git clone https://github.com/Ensembl/ensembl-datacheck.git

EXPOSE 5001
CMD ["gunicorn", "--config", "/home/appuser/datachecks/gunicorn_config.py", "-b", "0.0.0.0:5001", "ensembl.production.datacheck.app.main:app"]
CMD ["gunicorn", "--config", "/home/appuser/datachecks/gunicorn_config.py", "ensembl.production.datacheck.app.main:app"]
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
include LICENSE
include NOTICE
include VERSION
include requirements.txt
include src/ensembl/production/datacheck/templates/*
include src/ensembl/production/datacheck/static/js/*
include src/ensembl/production/datacheck/static/css/*
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.2
2.0.0
5 changes: 3 additions & 2 deletions gunicorn_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@
# range.
#

# bind = '0.0.0.0:5006'
backlog = 2048
import os
bind = os.getenv("GUNICORN_BIND", "0.0.0.0:5001")
backlog = int(os.getenv("GUNICORN_BACKLOG", "2048"))

#
# Worker processes
Expand Down
3 changes: 3 additions & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-r requirements.txt
pytest
coverage
5 changes: 2 additions & 3 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ensembl-prodinf-core~=2.0.0
ensembl-prodinf-core==2.0.5
Bootstrap-Flask
Click
elasticsearch>=6.8.1,<7.0.0
Expand All @@ -12,6 +12,5 @@ mysqlclient
pytest
requests
SQLAlchemy
sqlalchemy_utils==0.37.0
wtforms
ensembl-py@git+https://github.com/Ensembl/ensembl-py.git#egg=ensembl-py
ensembl-py@git+https://github.com/Ensembl/ensembl-py.git@1.0.0dev2#egg=ensembl-py
91 changes: 34 additions & 57 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
#
# This file is autogenerated by pip-compile with python 3.7
# To update, run:
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile requirements.in
#
amqp==5.1.0
amqp==5.1.1
# via kombu
attrs==21.4.0
# via
# jsonschema
# pytest
bootstrap-flask==2.0.2
attrs==23.1.0
# via jsonschema
bootstrap-flask==2.2.0
# via -r requirements.in
certifi==2020.12.5
# via
# ensembl-prodinf-core
# requests
charset-normalizer==2.0.12
charset-normalizer==3.1.0
# via requests
click==8.0.4
click==8.1.3
# via
# -r requirements.in
# flask
deprecation==2.1.0
# via ensembl-prodinf-core
dnspython==2.2.1
dnspython==2.3.0
# via email-validator
elasticsearch==6.8.2
# via -r requirements.in
email-validator==1.1.3
email-validator==2.0.0.post1
# via -r requirements.in
ensembl-hive @ git+https://github.com/Ensembl/ensembl-hive.git@main
# via ensembl-py
ensembl-prodinf-core==2.0.3
ensembl-prodinf-core==2.0.5
# via -r requirements.in
ensembl-py @ git+https://github.com/Ensembl/ensembl-py.git
ensembl-py @ git+https://github.com/Ensembl/ensembl-py.git@1.0.0dev2
# via -r requirements.in
exceptiongroup==1.1.1
# via pytest
flasgger==0.9.5
# via -r requirements.in
flask==2.0.3
flask==2.2.3
# via
# -r requirements.in
# bootstrap-flask
Expand All @@ -47,61 +47,48 @@ flask==2.0.3
# flask-wtf
flask-cors==3.0.10
# via -r requirements.in
flask-wtf==1.0.0
flask-wtf==1.1.1
# via -r requirements.in
greenlet==1.1.2
greenlet==2.0.2
# via sqlalchemy
gunicorn==20.1.0
# via -r requirements.in
idna==3.3
idna==3.4
# via
# email-validator
# requests
importlib-metadata==4.11.3
# via
# click
# jsonschema
# kombu
# pluggy
# pytest
# sqlalchemy
importlib-resources==5.4.0
# via jsonschema
iniconfig==1.1.1
iniconfig==2.0.0
# via pytest
itsdangerous==2.1.1
itsdangerous==2.1.2
# via
# flask
# flask-wtf
jinja2==3.0.3
jinja2==3.1.2
# via flask
jsonschema==4.4.0
jsonschema==4.17.3
# via flasgger
kombu==5.0.2
# via ensembl-prodinf-core
markupsafe==2.1.1
markupsafe==2.1.2
# via
# jinja2
# werkzeug
# wtforms
mistune==2.0.2
mistune==2.0.5
# via flasgger
mysqlclient==2.1.0
mysqlclient==2.1.1
# via
# -r requirements.in
# ensembl-py
packaging==21.3
packaging==23.1
# via
# deprecation
# pytest
pluggy==1.0.0
# via pytest
py==1.11.0
# via pytest
pyparsing==3.0.7
# via packaging
pyrsistent==0.18.1
pyrsistent==0.19.3
# via jsonschema
pytest==7.1.1
pytest==7.3.1
# via
# -r requirements.in
# ensembl-py
Expand All @@ -115,7 +102,7 @@ pyyaml==6.0
# ensembl-prodinf-core
# ensembl-py
# flasgger
requests==2.27.1
requests==2.28.2
# via
# -r requirements.in
# ensembl-prodinf-core
Expand All @@ -125,41 +112,31 @@ six==1.15.0
# ensembl-prodinf-core
# flasgger
# flask-cors
# sqlalchemy-utils
sqlalchemy==1.4.32
sqlalchemy==1.4.47
# via
# -r requirements.in
# ensembl-prodinf-core
# ensembl-py
# sqlalchemy-utils
sqlalchemy-utils==0.37.0
sqlalchemy-utils==0.38.3
# via
# -r requirements.in
# ensembl-prodinf-core
# ensembl-py
tomli==2.0.1
# via pytest
typing-extensions==4.1.1
# via
# importlib-metadata
# jsonschema
urllib3==1.26.9
urllib3==1.26.15
# via
# elasticsearch
# requests
vine==5.0.0
# via amqp
werkzeug==2.0.3
werkzeug==2.2.3
# via flask
wtforms==3.0.1
# via
# -r requirements.in
# bootstrap-flask
# flask-wtf
zipp==3.7.0
# via
# importlib-metadata
# importlib-resources

# The following packages are considered to be unsafe in a requirements file:
# setuptools
15 changes: 8 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
from pathlib import Path

from setuptools import setup, find_namespace_packages, find_packages
from setuptools import setup, find_namespace_packages

with open(Path(__file__).parent / 'README.md') as f:
readme = f.read()
with open(Path(__file__).parent / 'VERSION') as f:
Expand All @@ -25,14 +26,13 @@ def import_requirements():
return [line.rstrip() for line in file.readlines()]



setup(
name='datacheck',
version=version,
version=os.getenv('CI_COMMIT_TAG', version),
namespace_packages=['ensembl'],
packages=find_namespace_packages(where='src', include=['ensembl.*']),
package_dir={'': 'src'},
include_package_data=True,
package_dir={'': 'src'},
include_package_data=True,
url='https://github.com/Ensembl/ensembl-prodinf-datacheck',
license='APACHE 2.0',
author='vinay kaikala',
Expand All @@ -41,6 +41,7 @@ def import_requirements():
maintainer_email='ensembl-production@ebi.ac.uk',
description='Ensembl datacheck service',
python_requires='>=3.7',
install_requires=import_requirements(),
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
Expand All @@ -60,4 +61,4 @@ def import_requirements():
'datacheck_api = ensembl.production.datacheck.runserver:main'
]
}
)
)
Loading

0 comments on commit 678a535

Please sign in to comment.