TORTILLA-HUB
A fork of the UVLHub project by DiversoLab: tortilla-hub is a repository of feature models in UVL format integrated with Zenodo and flamapy following Open Science principles.
Table of Contents
Overview
Tortilla-hub is a fork of the UVLHub project by DiversoLab, created for the Evolution and Configuration Management (Evolución y Gestión de la configuración - EGC) course in the Software Engineering degree at the University of Seville.
This project serves as a repository for feature models in UVL format, integrated with Zenodo and Flamapy. It includes various modifications made by students of the course, providing hands-on experience in a continuous integration and deployment environment. Students have practiced automating tests and checks using GitHub Actions and collaborating effectively within multiple teams.
Project Documentation
Tortilla-hub is a proyect made by two teams: tortilla-hub-1 and tortilla-hub-2. You can find all our documentation on the /docs
folder in our common proyect.
There you may find our commmon working policy checking /docs/Acta fundacional.md
and our specific group documentation in our respective group folder.
Project Structure
└── tortilla-hub.git/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ └── workflows/
├── CHANGELOG.md
├── README.md
├── app/
│ ├── modules/
│ ├── static/
│ └── templates/
├── core/
│ ├── ...
├── docker/
│ ├── ...
├── docs/
│ ├── Acta fundacional.md
│ ├── tortilla-hub-1/
│ └── tortilla-hub-2/
├── migrations/
│ ├── ...
├── requirements.txt
├── rosemary/
│ ├── commands/
│ └── templates/
├── scripts/
│ ├── ...
└── vagrant/
├── ...
Project Index
TORTILLA-HUB.GIT/
__root__
requirements.txt |
- Requirements.txt specifies the project's dependencies - It lists numerous Python packages, including Flask for web framework, SQLAlchemy for database interaction, pytest for testing, and several libraries related to feature modeling (flamapy-*) - These packages provide the necessary tools and components for building and running the application. |
setup.py |
- `setup.py` configures the Rosemary project for installation - It defines the project's metadata, lists dependencies (Click and python-dotenv), and specifies the command-line interface (`rosemary`) entry point, enabling users to easily interact with the UVLHub development environment via the command line. |
migrations
script.py.mako |
- The script generates Alembic migration scripts for database schema changes. |
env.py |
- `env.py` configures Alembic, a database migration tool, within a Flask application |
alembic.ini |
- The `alembic.ini` file configures Alembic, a database migration tool, for the project
|
versions
This folder will contain the successive versions of the migrations made for the Flask project's database. The most recent one will have the highest version number.
rosemary
cli.py |
- Rosemary/cli.py provides a command-line interface (CLI) for streamlining project development - It integrates various commands, including database management, testing, environment setup, code quality checks, and deployment aids - The CLI acts as a central access point, simplifying common development tasks and improving workflow efficiency within the larger Rosemary project. |
__main__.py |
- Rosemary's `__main__.py` serves as the application's entry point. |
templates
...
commands
...
docker
docker-compose.prod.ssl.yml |
- The docker-compose.prod.ssl.yml file configures a production environment using Docker Compose - It orchestrates the deployment of a web application, a MariaDB database, an Nginx reverse proxy, and Watchtower for automated container updates - The configuration specifies container images, environment variables, port mappings, and volume mounts for persistent data and application resources. |
docker-compose.dev.yml |
- The `docker-compose.dev.yml` file configures a multi-container development environment - It defines services for a web application, a MariaDB database, and an Nginx reverse proxy - The configuration facilitates local development by linking these services, managing environment variables, and setting up necessary volumes and networks for seamless interaction - The setup enables developers to run and test the application locally. |
docker-compose.prod.webhook.yml |
- The `docker-compose.prod.webhook.yml` file configures a production environment for a web application using Docker Compose - It defines services for the application itself, a MariaDB database, and an Nginx web server, orchestrating their interactions and resource allocation - The configuration includes environment variables, port mappings, volume mounts for persistent data and scripts, and ensures automatic restarts - The setup facilitates deployment and management of the application within a containerized infrastructure. |
docker-compose.prod.yml |
- Docker Compose orchestrates a production environment - It defines and manages four containers: a web application, a MariaDB database, an Nginx reverse proxy, and a Watchtower for automated container updates - The configuration maps local directories to containers, enabling persistent storage and deployment of application code, scripts, and configurations - The setup ensures high availability and simplified deployment. |
images
This folder will contain the latest Docker images of the webhoock, database, prodcution and development application, and necessary test environments.
nginx
This folder will contain the latest Docker images of the Nginx reverse proxy, and a Watchtower for automated container updates.
...
html
...
entrypoints
...
vagrant
04_install_dependencies.yml |
- The Ansible playbook configures the system to support the project's Python 3.12 environment. |
02_install_mariadb.yml |
- The Ansible playbook `02_install_mariadb.yml` sets up a MariaDB database server - It installs MariaDB and the necessary Python library, starts and enables the service, configures the root password, and creates specified databases and a user with appropriate privileges . |
01_setup.yml |
- `vagrant/01_setup.yml` prepares the system for provisioning by updating the apt package cache. |
03_mariadb_scripts.yml |
- The `vagrant/03_mariadb_scripts.yml` Ansible playbook configures and initializes the MariaDB database. |
06_utilities.yml |
- Ansible's `06_utilities.yml` configures the Vagrant user environment. |
00_main.yml |
❯ ... |
Vagrantfile |
- The Vagrantfile configures a virtual machine using Ubuntu, setting up network ports, syncing folders, and provisioning via Ansible - It loads environment variables from a `.env` file, making them accessible to the Ansible playbook and the virtual machine's shell environment - This ensures consistent configuration and deployment across different environments. |
05_run_app.yml |
❯ ... |
scripts
core
The core folder contains the core logic of the application: application setup, configurations, selenium configuration, serialicers and decorators, base templates, etc.
bootstraps
...
selenium
...
configuration
...
blueprints
...
serialisers
...
decorators
...
locust
...
resources
...
managers
...
repositories
...
seeders
...
environment
...
services
...
app
The app folder cotains all the application logic: all the data models, the repositories and servers of the differrent modules, and the html files for the applications views.
templates
Base templates for the html files and common error pages.
modules
webhook
This folder contains the logic related to handling webhooks (HTTP callbacks triggered by external services to notify your of certain events).
templates
webhook
flamapy
templates
flamapy
auth
The auth folder is dedicated to handling authentication and authorization functionalities. It contains code that manages user login, registration, password management, and permissions.
templates
auth
hubfile
templates
hubfile
dataset
This folder contains all the object modelling and business logic related to the datasets, which are one of the core elements of the uvl repository.
uvl_examples
templates
dataset
featuremodel
This folder contains all the data modelling and business logic behind the FeatureModel objects.
templates
featuremodel
explore
templates
explore
public
templates
public
profile
The profile folder handles user-related functionalities that allow users to view, update, and manage their personal data.
templates
profile
team
templates
team
community
The comunnity folder contains all the data modelling, route, business logic and views of the communities.
templates
community
fakenodo
The fakenodo folder contains all the services and models necessary to works with a mocked version of Zenodo. this will help to simulate as many calls to the Zenodyo API as they are necessary to test the application.
templates
.github
It contains configuration files and scripts related to continuous integration (CI) and continuous deployment (CD). It includes YAML files that define workflows for GitHub Actions.
workflows
ISSUE_TEMPLATE
Getting Started
Prerequisites
Before getting started with tortilla-hub.git, ensure your runtime environment meets the following requirements:
- Programming Language: Python
- Package Manager: Pip / Pip3
Installation
Install tortilla-hub.git using one of the following methods:
Deploy on Docker:
-
Clone the tortilla-hub.git repository:
❯ git clone https://github.com/EGC-G2-tortilla/tortilla-hub.git
-
Navigate to the project directory:
❯ cd tortilla-hub
-
Create a local environment:
❯ python -m venv .evn
❯ cp .env.docker.example .env
❯ source .env/bin/activate
-
Install the project dependencies:
Using pip
❯ pip install -r requirements.txt
❯ deactivate
- Deploy in develop:
❯ docker compose -f docker/docker-compose.dev.yml up -d
Deploy locally:
For more detailed information check https://docs.uvlhub.io/installation/manual_installation.
Usage
Run tortilla-hub.git using the following command:
Using pip
❯ python {entrypoint}
Testing
Unit tests
Run the unit test suite using the following command:
❯ rosemary test
If you want to run specific test modules:
❯ rosemary test <module name>
Frontend tests using Selenium
Run the unit test suite using the following command:
❯ rosemary selenium
If you want to run specific test modules:
❯ rosemary selenium <module name>
Load tests using Locust
Run the unit test suite using the following command:
❯ rosemary locust
If you want to run specific test modules:
❯ rosemary locust <module name>
Acknowledgments
In this section you can find all the contributors of each team:
Tortilla Hub 1:
Tortilla Hub 2: