Metadata-Version: 2.1
Name: eark-validator
Version: 1.1.1
Summary: E-ARK Python Information Package Validation
Home-page: https://www.e-ark-foundation.eu/e-ark-software-py-e-ark-ip-validator/
Download-URL: https://github.com/E-ARK-Software/py-e-ark-ip-validator/archive/1.1.1.tar.gz
Author: E-ARK Foundation
Author-email: admin@e-ark-foundation.eu
Maintainer: E-ARK Foundation
Maintainer-email: admin@e-ark-foundation.eu
License: Apache License 2.0
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: System :: Archiving
Description-Content-Type: text/markdown
Requires-Dist: setuptools
Requires-Dist: lxml
Requires-Dist: importlib-resources
Provides-Extra: setup
Requires-Dist: pytest-runner ; extra == 'setup'
Provides-Extra: testing
Requires-Dist: pre-commit ; extra == 'testing'
Requires-Dist: pytest ; extra == 'testing'
Requires-Dist: pylint ; extra == 'testing'
Requires-Dist: pytest-cov ; extra == 'testing'

# E-ARK Python Information Package Validator

Core package and command line utility for E-ARK Information Package validation.

The validation core component implements validation rules defined by E-ARK specifications which can be found on the
website of the Digital Information LifeCycle Interoperability Standards Board (DILCIS Board):

<https://dilcis.eu/specifications/>

## Quick Start

### Pre-requisites

Python 3.7+ is required.

### Getting the code

Clone the project move into the directory:

```shell
git clone https://github.com/E-ARK-Software/py-e-ark-ip-validator.git
cd py-e-ark-ip-validator
```

### Installating the application

Set up a local virtual environment:

```shell
virtualenv -p python3 venv
source venv/bin/activate
```

Update pip and install the application:

```shell
pip install -U pip
pip install .
```

### Running the validator

From the command line and using the virtual environment, you can run the validator on an information package:

```shell
ip-check <path_to_directory_or_package>
```

If the path passed is a directory, it must contain a single folder which contains the information package (and no other files or folders):

```shell
user@machine:~$ tree input
<path to directory>
  ├── documentation
  ├── metadata
  ├── METS.xml
  ├── representations
  │   └── rep1
  │       ├── data
  │       ├── metadata
  │       └── METS.xml
  └── schemas
```

If the output paramter (`-o`) is specified, the validation result report (JSON format) is written to a file.

## For Developers

Developers should install the testing dependencies as well, e.g. [`pytest`](https://docs.pytest.org/en/7.2.x/) and using the [`--editable`](https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-e) flag:

```shell
pip install -U pip
pip install --editable ".[testing]"
```

### Running tests

You can run unit tests from the project root: `pytest ./tests/`, or generate test coverage figures by: `pytest --cov=ip_validation ./tests/`. If you want to see which parts of your code aren't tested then: `pytest --cov=ip_validation --cov-report=html ./tests/`. After this you can open the file [`<projectRoot>/htmlcov/index.html`](./htmlcov/index.html) in your browser and survey the gory details.
