1
0
mirror of https://github.com/ilri/csv-metadata-quality.git synced 2025-07-01 04:01:53 +02:00

5 Commits

Author SHA1 Message Date
1554cfd5c9 Version 0.4.6 2021-03-11 12:14:54 +02:00
00b8faad6d CHANGELOG.md: Fix headers 2021-03-11 12:13:22 +02:00
b19d81abdd .drone.yml: We need some stuff to build pyicu now
All checks were successful
continuous-integration/drone/push Build is passing
2021-03-11 12:07:28 +02:00
a0ea829f5c csv_metadata_quality/fix.py: Fixes should be green 2021-03-11 11:47:24 +02:00
0089efa914 tests/test_check.py: Use dcterms.subject instead of dc.subject
Trying to move some old DC fields to DCTERMS.
2021-03-11 11:45:25 +02:00
7 changed files with 15 additions and 9 deletions

View File

@ -9,6 +9,7 @@ steps:
commands: commands:
- id - id
- python -V - python -V
- apt update && apt install -y gcc g++ libicu-dev pkg-config
- pip install -r requirements-dev.txt - pip install -r requirements-dev.txt
- pytest - pytest
- python setup.py install - python setup.py install
@ -25,6 +26,7 @@ steps:
commands: commands:
- id - id
- python -V - python -V
- apt update && apt install -y gcc g++ libicu-dev pkg-config
- pip install -r requirements-dev.txt - pip install -r requirements-dev.txt
- pytest - pytest
- python setup.py install - python setup.py install
@ -41,6 +43,7 @@ steps:
commands: commands:
- id - id
- python -V - python -V
- apt update && apt install -y gcc g++ libicu-dev pkg-config
- pip install -r requirements-dev.txt - pip install -r requirements-dev.txt
- pytest - pytest
- python setup.py install - python setup.py install

View File

@ -4,16 +4,19 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased ## [0.4.6] - 2021-03-11
## Added ### Added
- Validation of dcterms.license field against SPDX license identifiers - Validation of dcterms.license field against SPDX license identifiers
## Changed ### Changed
- Use DCTERMS fields where possible in `data/test.csv` - Use DCTERMS fields where possible in `data/test.csv`
### Updated ### Updated
- Run `poetry update` to update project dependencies - Run `poetry update` to update project dependencies
### Fixed
- Output for all fixes should be green, because it is good
## [0.4.5] - 2021-03-04 ## [0.4.5] - 2021-03-04
### Added ### Added
- Check dates in dcterms.issued field as well, not just fields that have the - Check dates in dcterms.issued field as well, not just fields that have the

View File

@ -77,7 +77,7 @@ def separators(field, field_name):
if match: if match:
print( print(
f"{Fore.RED}Fixing invalid multi-value separator ({field_name}): {Fore.RESET}{value}" f"{Fore.GREEN}Fixing invalid multi-value separator ({field_name}): {Fore.RESET}{value}"
) )
value = re.sub(pattern, "||", value) value = re.sub(pattern, "||", value)

View File

@ -1 +1 @@
VERSION = "0.4.5" VERSION = "0.4.6"

View File

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "csv-metadata-quality" name = "csv-metadata-quality"
version = "0.4.5" version = "0.4.6"
description="A simple, but opinionated CSV quality checking and fixing pipeline for CSVs in the DSpace ecosystem." description="A simple, but opinionated CSV quality checking and fixing pipeline for CSVs in the DSpace ecosystem."
authors = ["Alan Orth <alan.orth@gmail.com>"] authors = ["Alan Orth <alan.orth@gmail.com>"]
license="GPL-3.0-only" license="GPL-3.0-only"

View File

@ -14,7 +14,7 @@ install_requires = [
setuptools.setup( setuptools.setup(
name="csv-metadata-quality", name="csv-metadata-quality",
version="0.4.5", version="0.4.6",
author="Alan Orth", author="Alan Orth",
author_email="aorth@mjanja.ch", author_email="aorth@mjanja.ch",
description="A simple, but opinionated CSV quality checking and fixing pipeline for CSVs in the DSpace ecosystem.", description="A simple, but opinionated CSV quality checking and fixing pipeline for CSVs in the DSpace ecosystem.",

View File

@ -224,7 +224,7 @@ def test_check_invalid_agrovoc(capsys):
"""Test invalid AGROVOC subject.""" """Test invalid AGROVOC subject."""
value = "FOREST" value = "FOREST"
field_name = "dc.subject" field_name = "dcterms.subject"
check.agrovoc(value, field_name) check.agrovoc(value, field_name)
@ -239,7 +239,7 @@ def test_check_valid_agrovoc():
"""Test valid AGROVOC subject.""" """Test valid AGROVOC subject."""
value = "FORESTS" value = "FORESTS"
field_name = "dc.subject" field_name = "dcterms.subject"
result = check.agrovoc(value, field_name) result = check.agrovoc(value, field_name)