GithubHelp home page GithubHelp logo

sipin-sip-validator's Introduction

SIPin SIP Validator

Synopsis

A service that parses and validates the unzipped SIP:

  • Parse the bag folder and validate it.
  • Parse the SIP:
    • Validate the metadata files with the corresponding XSDs.
    • Transform the SIP to a graph using SPARQL-anything.
    • Validate it with the respective SHACL file.

Prerequisites

  • Git
  • Docker (optional)
  • Python 3.10+
  • Access to the meemoo PyPi

Usage

  1. Clone this repository with:

    $ git clone https://github.com/viaacode/sipin-sip-validator.git

  2. Change into the new directory:

    $ cd sipin-sip-validator

  3. Set the needed config:

Included in this repository is a config.yml file detailing the required configuration. There is also an .env.example file containing all the needed env variables used in the config.yml file. All values in the config have to be set in order for the application to function correctly. You can use !ENV ${EXAMPLE} as a config value to make the application get the EXAMPLE environment variable.

Running locally

  1. Start by creating a virtual environment:

    $ python -m venv venv

  2. Activate the virtual environment:

    $ source venv/bin/activate

  3. Install the external modules:

    $ pip install -r requirements.txt \
        --extra-index-url http://do-prd-mvn-01.do.viaa.be:8081/repository/pypi-all/simple \
        --trusted-host do-prd-mvn-01.do.viaa.be && \
      pip install -r requirements-dev.txt
    
  4. Make sure to load in the ENV vars.

  5. Set Java path. On linux, for example:

    export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/

  6. Run the tests with:

    $ python -m pytest -v --cov=./app

  7. Run the application:

    $ python -m main

Running using Docker

  1. Build the container:

    $ docker build -t sipin-sip-validator .

  2. Run the tests in a container:

    $ docker run --env-file .env.example --rm --entrypoint python sipin-sip-validator:latest -m pytest -v --cov=./app

  3. Run the container (with specified .env file):

    $ docker run --env-file .env --rm sipin-sip-validator:latest

sipin-sip-validator's People

Contributors

spacid avatar lennertvandevelde avatar mielvds avatar rudolfdg avatar

Watchers

Maarten avatar  avatar Tina avatar Herwig Bogaert avatar Bart Debunne avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.