.. _basic_cookiecutters: Basic templates *************** Python template ---------------- In order to generate a Python application based on a Cookiecutter project template, follow the procedure described below. * Log on your Ellip Workflows VM (see :ref:`sandbox`), and type: .. code-block:: bash sudo yum install miniconda -y sudo conda install cookiecutter -y * Type: .. code-block:: bash export PATH=/opt/anaconda/bin/:$PATH cookiecutter https://gitlab.com/ellip/cookiecutter/workflows/cookiecutter-ewf-python.git .. tip:: See :ref:`cookiecutters` for the available templates URLs * Set the 'artifactId', 'summary', 'description', 'version', 'community' and 'groupId' values for your project, then select the Python version and finally set the name of the environment to use for running the application. For example: .. code-block:: bash artifactId [ewf-some-app]: summary [This is a summary]: description [This is a short description]: version [0.1]: 0.1-SNAPSHOT community [community]: groupId [com.terradue]: Select python: 1 - 2.7 2 - 3.6 3 - 3.7 Choose from 1, 2, 3 [1]: environment [env_ewf_some_app]: * After that, you will see a folder with the name of the artifactId (here *ewf-some-app*), where you can start writing your application. .. code-block:: bash ewf-some-app/ ├── Jenkinsfile ├── pom.xml ├── README.md └── src ├── main │   └── app-resources │   ├── application.xml │   ├── dependencies │   │   └── python │   ├── node_A │   │   └── run │   ├── node_B │   │   └── run │   └── util │   └── util.py └── test └── test_util.py Moreover, the cookiecutter project generation also includes the creation of a Jupyter kernel for new the Python environnment. If you have Jupyter installed on your Ellip Workflows VM, the new Python kernel will be available to use for a notebook. To install new Python packages in your conda environment use the following command: .. code-block:: bash sudo conda install -y -n env_ewf_some_app To install your application on the Ellip Workflows VM, navigate to the root folder of your project, activate the conda environment and run the maven install command: .. code-block:: bash cd ewf-some-app conda activate env_ewf_some_app mvn clean install Bash template -------------- In order to generate a Bash application based on a Cookiecutter project template, follow the procedure described below. * Log on your Ellip Workflows VM (see :ref:`sandbox`), and type: .. code-block:: bash sudo yum install miniconda -y sudo conda install cookiecutter -y * Type: .. code-block:: bash export PATH=/opt/anaconda/bin/:$PATH cookiecutter https://gitlab.com/ellip/cookiecutter/workflows/cookiecutter-ewf-bash.git .. tip:: See :ref:`cookiecutters` for the available templates URLs * Set the 'artifactId', 'summary', 'description', 'version', 'community' and 'groupId' values for your project. For example: .. code-block:: bash artifactId [ewf-some-app]: summary [This is a summary]: description [This is a short description]: version [0.1]: 0.1-SNAPSHOT community [community]: groupId [com.terradue]: After that, you will see a folder with the name of the artifactId (here *ewf-some-app*), where you can start writing your application. .. code-block:: bash ewf-some-app ├── Jenkinsfile ├── pom.xml ├── README.md └── src ├── main │   └── app-resources │   ├── application.xml │   ├── node_A │   │   ├── lib │   │   │   └── functions.sh │   │   └── run.sh │   └── node_B │   ├── lib │   │   └── functions.sh │   └── run.sh └── test ├── run_tests.sh ├── test_common.sh └── tests.d └── test_node_A.sh R template ---------- In order to generate a R application based on a Cookiecutter project template, follow the procedure described below. * Log on your Ellip Workflows VM (see :ref:`sandbox`), and type: .. code-block:: bash sudo yum install miniconda -y sudo conda install cookiecutter -y * Type: .. code-block:: bash export PATH=/opt/anaconda/bin/:$PATH cookiecutter https://gitlab.com/ellip/cookiecutter/workflows/cookiecutter-ewf-r.git .. tip:: See :ref:`cookiecutters` for the available templates URLs * Set the 'artifactId', 'summary', 'description', 'version', 'community' and 'groupId' values for your project and finally set the name of the environment to use for running the application. For example: .. code-block:: bash artifactId [test-r-app]: summary [This is a summary]: description [This is a short description]: version [0.1]: 0.1-SNAPSHOT community [community]: groupId [com.terradue]: environment [env_test_r_app]: After that, you will see a folder with the name of the artifactId (here *test-r-app*), where you can start writing your application. .. code-block:: bash test-r-app/ ├── Jenkinsfile ├── pom.xml ├── README.md └── src ├── main │   └── app-resources │   ├── application.xml │   ├── dependencies │   │   └── R │   │   └── environment.yml │   ├── node_A │   │   └── run │   ├── node_B │   │   └── run │   └── util │   └── util.R └── test └── test_util.py