This project presents a Flask-based API for validating RO-Crates.
app/
βββ ro_crates/
β βββ routes/
β β βββ __init__.py # Registers blueprints
β β βββ post_routes.py # POST API routes
β βββ __init__.py
βββ services/
β βββ logging_service.py # Centralised logging
β βββ validation_service.py # Queue RO-Crates for validation
βββ tasks/
β βββ validation_tasks.py # Validate RO-Crates
βββ utils/
β βββ config.py # Configuration
β βββ minio_utils.py # Methods for interacting with MinIO
β βββ webhook_utils.py # Methods for sending webhooks
- Docker with Docker Compose
-
Clone the repository:
git clone https://github.com/eScienceLab/Cratey-Validator.git cd crate-validation-service
-
Build and start the services using Docker Compose:
docker compose build docker compose up
-
Set up the MinIO bucket
-
Open the MinIO web interface at
http://localhost:9000
. -
Log in with your MinIO credentials.
-
Create a new bucket named
ro-crates
. -
Enable versioning for the
ro-crates
bucket β this is important for tracking unique object versions. -
Upload your RO-Crate files to the
ro-crates
bucket. -
To verify that versioning is enabled:
- Select the uploaded RO-Crate object in the
ro-crates
bucket. - Navigate to the Actions panel on the right.
- The Display Object Versions option should be clickable.
- Select the uploaded RO-Crate object in the
-
curl -X POST http://localhost:5001/ro_crates/post/validate_by_id_no_webhook -d "id=1"