commit 4e21c0efb0eda7864216ae36556ceb0e24423d32 Author: Phil Elson Date: Mon Oct 19 13:49:40 2020 +0200 Added an initial project structure. diff --git a/CARA/__init__.py b/CARA/__init__.py new file mode 100644 index 00000000..63a84eb4 --- /dev/null +++ b/CARA/__init__.py @@ -0,0 +1,6 @@ +""" +Documentation for the CARA package + +""" + +__version__ = "0.0.1.dev0" diff --git a/CARA/tests/__init__.py b/CARA/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/CARA/tests/test_CARA.py b/CARA/tests/test_CARA.py new file mode 100644 index 00000000..2ad7d92f --- /dev/null +++ b/CARA/tests/test_CARA.py @@ -0,0 +1,10 @@ +""" +High-level tests for the package. + +""" + +import CARA + + +def test_version(): + assert CARA.__version__ is not None diff --git a/README.md b/README.md new file mode 100644 index 00000000..0ba6d354 --- /dev/null +++ b/README.md @@ -0,0 +1,18 @@ +# CARA - COVID Airborne Risk Assessment + + + +## Credits + + +## Development guide + +### Setting up the application + +The https://cern.ch/cara application is running on CERN's OpenShift platform. In order to set it up for the first time, we followed the documentation at https://cern.service-now.com/service-portal?id=kb_article&n=KB0004498. In particular we: + + * Added the OpenShift application deploy key to the GitLab repository + * Created a Python 3.6 (the highest possible at the time of writing) application in OpenShift + * Configured a generic webhook on OpenShift, and call that from the CI of the GitLab repository + + diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..7d24c7fa --- /dev/null +++ b/setup.py @@ -0,0 +1,60 @@ +""" +setup.py for CARA. + +For reference see +https://packaging.python.org/guides/distributing-packages-using-setuptools/ + +""" +from pathlib import Path +from setuptools import setup, find_packages + + +HERE = Path(__file__).parent.absolute() +with (HERE / 'README.md').open('rt') as fh: + LONG_DESCRIPTION = fh.read().strip() + + +REQUIREMENTS: dict = { + 'core': [ + # 'mandatory-requirement1', + # 'mandatory-requirement2', + ], + 'test': [ + 'pytest', + ], + 'dev': [ + # 'requirement-for-development-purposes-only', + ], +} + + +setup( + name='CARA', + version="0.0.1.dev0", + + maintainer='Andre Henriques', + maintainer_email='andre.henriques@cern.ch', + description='COVID Airborne Risk Assessment', + long_description=LONG_DESCRIPTION, + long_description_content_type='text/markdown', + url='cern.ch/cara', + + packages=find_packages(), + python_requires='~=3.6', + classifiers=[ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", + ], + + install_requires=REQUIREMENTS['core'], + extras_require={ + **REQUIREMENTS, + # The 'dev' extra is the union of 'test' and 'doc', with an option + # to have explicit development dependencies listed. + 'dev': [req + for extra in ['dev', 'test', 'doc'] + for req in REQUIREMENTS.get(extra, [])], + # The 'all' extra is the union of all requirements. + 'all': [req for reqs in REQUIREMENTS.values() for req in reqs], + }, +)