diff --git a/Condaless.dockerfile b/Condaless.dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..8c4c6de27fe7d4a5ca17a2032a2aee95648734c5 --- /dev/null +++ b/Condaless.dockerfile @@ -0,0 +1,28 @@ +FROM python:3.8-slim + +# We happen to expose this port +EXPOSE 3456:tcp + +# Environment variables +ENV PIP_NO_CACHE_DIR false +ENV CAPO_PROFILE docker + +# Set up Capo +WORKDIR /root/.capo +COPY docker.properties docker.properties + +# Get postgres/mysql development stuff in the image +RUN apt-get update \ + && apt-get install -y libmariadb-dev-compat gcc libpq-dev \ + && rm -rf /var/lib/apt/lists + +# Get the code into the image +WORKDIR /code +COPY . . +WORKDIR /code/services/workflow + +# Python library installation +RUN pip install -r requirements.txt \ + && python setup.py develop + +ENTRYPOINT pserve --reload development.ini diff --git a/services/workflow/requirements.txt b/services/workflow/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..423da295f99c1252686c147b0e22330854201bcf --- /dev/null +++ b/services/workflow/requirements.txt @@ -0,0 +1,18 @@ +# This file is intended to support the Condaless.dockerfile, not for actual development +# DO NOT MODIFY THIS FILE, THIS IS FOR DOCKER ONLY! + +-e ../../shared/schema +-e ../../shared/channels +-e ../../shared/workspaces +-e ../../apps/cli/utilities/wf_monitor + +pycapo == 0.3.0 +pyramid == 1.10 +pyramid_beaker == 0.8 +pyramid_debugtoolbar == 4.5 +pyramid_retry == 2.1.1 +pyramid_tm == 2.2.1 +requests == 2.23 +sqlalchemy == 1.3 +waitress == 1.4 +zope.sqlalchemy == 1.1 diff --git a/services/workflow/setup.py b/services/workflow/setup.py index 90e6c715e908309fb9c5eb4593bba69684d44621..48a98bb472d71a3287f48be5d9ed99a366302922 100644 --- a/services/workflow/setup.py +++ b/services/workflow/setup.py @@ -14,91 +14,82 @@ from setuptools import setup, find_packages # For matching the version string. import re -this_module = 'workflow' +this_module = "workflow" here = path.abspath(path.dirname(__file__)) # Get the long description from the README file -with open(path.join(here, 'README.md'), encoding='utf-8') as f: +with open(path.join(here, "README.md"), encoding="utf-8") as f: long_description = f.read() def read(*parts): - with open(path.join(here, *parts), 'r') as fp: + with open(path.join(here, *parts), "r") as fp: return fp.read() def find_version(*file_paths): version_file = read(*file_paths) - version_match = re.search(r"^___version___ = ['\"]([^'\"]*)['\"]", - version_file, re.M) + version_match = re.search( + r"^___version___ = ['\"]([^'\"]*)['\"]", version_file, re.M + ) if version_match: return version_match.group(1) raise RuntimeError("Unable to find version string.") requires = [ - 'pycapo', - 'pyramid', - 'pyramid_beaker', - 'pyramid_debugtoolbar', - 'pyramid_tm', - 'requests', - 'ssa-schema', - 'sqlalchemy', - 'waitress', - 'ssa-workspaces', - 'zope.sqlalchemy' + "pycapo", + "pyramid", + "pyramid_beaker", + "pyramid_debugtoolbar", + "pyramid_tm", + "pyramid_retry", + "requests", + "ssa-schema", + "sqlalchemy", + "waitress", + "ssa-workspaces", + "zope.sqlalchemy", ] setup( - name='ssa-' + this_module, - + name="ssa-" + this_module, # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html - version=find_version('src/' + this_module, '_version.py'), - - description='Workflow: the Workspaces Workflow Service', + version=find_version("src/" + this_module, "_version.py"), + description="Workflow: the Workspaces Workflow Service", long_description=long_description, - # Author details - author='Science Support and Archive', - author_email='ssa-announcements@nrao.edu', - + author="Science Support and Archive", + author_email="ssa-announcements@nrao.edu", # Choose your license - license='GPL', - + license="GPL", # See https://pypi.python.org/pypi?%3Aaction=list_classifiers classifiers=[ # How mature is this project? Common values are # 3 - Alpha # 4 - Beta # 5 - Production/Stable - 'Development Status :: 4 - Beta', - + "Development Status :: 4 - Beta", # Indicate who your project is intended for - 'Intended Audience :: Developers', - 'Topic :: Software Development :: Build Tools', - + "Intended Audience :: Developers", + "Topic :: Software Development :: Build Tools", # Pick your license as you wish (should match "license" above) - 'License :: OSI Approved :: GPL License', - + "License :: OSI Approved :: GPL License", # Specify the Python versions you support here. In particular, ensure # that you indicate whether you support Python 2, Python 3 or both. - 'Programming Language :: Python :: 3.6', + "Programming Language :: Python :: 3.6", ], - install_requires=requires, extras_require={ - 'dev': [ - 'pyramid_debugtoolbar', + "dev": [ + "pyramid_debugtoolbar", ], }, - package_dir={'': 'src'}, + package_dir={"": "src"}, packages=find_packages(), entry_points={ - 'paste.app_factory': [ - 'main = workflow.server:main' - ], + "paste.app_factory": ["main = workflow.server:main"], }, ) diff --git a/shared/schema/setup.py b/shared/schema/setup.py index ffd4a09d8e3a66d36de6edac8e51a9000c2c973c..5297f1dd2116bff21de94fa0917c5af27b3ec819 100644 --- a/shared/schema/setup.py +++ b/shared/schema/setup.py @@ -4,23 +4,21 @@ from pathlib import Path from setuptools import setup, find_packages -VERSION = open('src/schema/_version.py').readlines()[-1].split()[-1].strip("\"'") -README = Path('README.md').read_text() +VERSION = open("src/schema/_version.py").readlines()[-1].split()[-1].strip("\"'") +README = Path("README.md").read_text() setup( - name='ssa-' + Path().absolute().name, + name="ssa-" + Path().absolute().name, version=VERSION, - description='NRAO Archive Schema Library', + description="NRAO Archive Schema Library", long_description=README, - author='NRAO SSA Team', - author_email='dms-ssa@nrao.edu', - url='TBD', + author="NRAO SSA Team", + author_email="dms-ssa@nrao.edu", + url="TBD", license="GPL", - install_requires=['sqlalchemy', 'pycapo', 'psycopg2', 'mysqlclient', 'cx_Oracle'], + install_requires=["sqlalchemy", "pycapo", "psycopg2", "mysqlclient", "cx_Oracle"], keywords=[], - packages=['schema'], - package_dir={'':'src'}, - classifiers=[ - 'Programming Language :: Python :: 3.8' - ] + packages=["schema"], + package_dir={"": "src"}, + classifiers=["Programming Language :: Python :: 3.8"], )