Metadata-Version: 2.4
Name: eth-datacite-validator
Version: 0.1.4
Summary: Validator for ETH DataCite metadata standards
Author-email: Yasmin Waldeck <yasmin.waldeck@wsl.ch>
License-Expression: MIT
Project-URL: Repository, https://gitlabext.wsl.ch/EnviDat/eth-datacite-validator/
Project-URL: Changelog, https://gitlabext.wsl.ch/EnviDat/eth-datacite-validator/-/blob/main/CHANGELOG.md
Keywords: eth,datacite
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.2.1
Requires-Dist: xmlschema>=4.1.0
Requires-Dist: lxml>=6.0.1
Requires-Dist: langcodes>=3.5.0
Requires-Dist: requests>=2.32.5
Requires-Dist: colorama>=0.4.6
Dynamic: license-file

# DataCite XML Validator CLI

This is a simple Python CLI tool to validate DataCite files in XML format against the [ETH Zurich metadata standard](https://www.dora.lib4ri.ch/psi/islandora/object/psi%3A81336/datastream/PDF/Felder-2025-Recommendation_on_how_to_implement-%28published_version%29.pdf)s. 
This tool has been tested with Python version 3.8 to 3.13, it works for 3.10 to 3.13.
The standards were based on DataCite version 4.6, the validator officially supports DataCite version 4.6 and 4.7.

### Results
- If your XML file does not comply with the agreed upon standards, it will not continue to throw warnings.
- If your file complies with the standards, it will then get checked against our recommendations. These are called warnings.
- You can also opt to just get the result.

## Installation

Clone the repository and open the folder.

(Optional) Create a virtual environment:

```bash
python -m venv .venv
# On Unix/macOS:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate
```

Then simply install the project:
```bash
pip install .
```

## Usage

Within your python environment run the CLI tool with:

```bash
(python) eth-validate-datacite <file-path>
```

Note that this package has the functions validate_datacite_from_file and validate_datacite_from_doi which can be used in scripts.


### Flags
We are providing three flags:
- ``--skip-warnings`` will not check for any warnings (recommendations will not be checked)
- ``--hide-warnings`` will only give you the amount of warnings found, it will hide the actual warnings
- ``--result-only`` will only show you the result, not any info on the actual errors or warnings.

## License
MIT License

## Author

Developed by Yasmin Waldeck at WSL
