1
0
mirror of https://github.com/ilri/csv-metadata-quality.git synced 2024-11-28 08:38:18 +01:00

Compare commits

..

No commits in common. "20a2cce34baa218250fbef1f8a085d8e498fa549" and "47b03c49ba3c09f5342be02ce136da982eb1d799" have entirely different histories.

2 changed files with 2 additions and 9 deletions

View File

@ -4,13 +4,6 @@ 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
### Fixed
- Fixed regex so we don't run the invalid multi-value separator fix on
`dcterms.bibliographicCitation` fields
- Fixed regex so we run the comma space fix on `dcterms.bibliographicCitation`
fields
## [0.6.1] - 2023-02-23 ## [0.6.1] - 2023-02-23
### Fixed ### Fixed
- Missing region check should ignore subregion field, if it exists - Missing region check should ignore subregion field, if it exists

View File

@ -102,7 +102,7 @@ def run(argv):
# Fix: missing space after comma. Only run on author and citation # Fix: missing space after comma. Only run on author and citation
# fields for now, as this problem is mostly an issue in names. # fields for now, as this problem is mostly an issue in names.
if args.unsafe_fixes: if args.unsafe_fixes:
match = re.match(r"^.*?(author|[Cc]itation).*$", column) match = re.match(r"^.*?(author|citation).*$", column)
if match is not None: if match is not None:
df[column] = df[column].apply(fix.comma_space, field_name=column) df[column] = df[column].apply(fix.comma_space, field_name=column)
@ -126,7 +126,7 @@ def run(argv):
# Fix: invalid and unnecessary multi-value separators. Skip the title # Fix: invalid and unnecessary multi-value separators. Skip the title
# and abstract fields because "|" is used to indicate something like # and abstract fields because "|" is used to indicate something like
# a subtitle. # a subtitle.
match = re.match(r"^.*?(abstract|[Cc]itation|title).*$", column) match = re.match(r"^.*?(abstract|title).*$", column)
if match is None: if match is None:
df[column] = df[column].apply(fix.separators, field_name=column) df[column] = df[column].apply(fix.separators, field_name=column)
# Run whitespace fix again after fixing invalid separators # Run whitespace fix again after fixing invalid separators