Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
db65c94
Release 1.2.7
slesaad Jul 18, 2024
6a9324b
v1.2.8
slesaad Jul 31, 2024
85ccd62
Update version.txt
slesaad Jul 31, 2024
eadee42
Add feature for new checks-LA
lavanya3k Jan 17, 2025
b620575
Check #549 'ProcessingLevel/ProcessingLevelDescription'
lavanya3k Jan 29, 2025
68d709a
Issue #549 Processing Level Description
lavanya3k Jan 29, 2025
9e10a90
umm-c Schema update
lavanya3k Feb 7, 2025
6735688
'ProcessingLevel/ProcessingLevelDescription' rule (Check #549)
lavanya3k Feb 11, 2025
0ec8708
Use Constraints info does not display for a sample record #264
lavanya3k Feb 11, 2025
094a139
url_description_uniqueness_check #286'
lavanya3k Feb 11, 2025
27c8233
Additional OnlineAccess and OnlineResource Recs #298
lavanya3k Feb 21, 2025
c63698a
EntryTitle and ContactInformation #312
lavanya3k Feb 27, 2025
cbb6090
EntryTitle and ContactInformation #312 - before changing branch
lavanya3k Feb 27, 2025
e77af95
Horizontal Datum Bug #297
lavanya3k Mar 6, 2025
ce4d198
Additional OnlineAccess and OnlineResource Recs #298
lavanya3k Mar 20, 2025
b2f7ee9
Additional OnlineAccess and OnlineResource Recs #298-v1
lavanya3k Mar 20, 2025
99b07e1
EntryTitle and ContactInformation #312- v1
lavanya3k Apr 22, 2025
b7899e3
Delete command_output_20250210_121343.txt
lavanya3k Apr 29, 2025
4e3d87f
Delete 01_file_edit_CMR.py
lavanya3k Apr 29, 2025
9c7ef2e
Stop tracking env/ files
slesaad Apr 29, 2025
0fcde90
Delete C1000000046-CDDIS.native
lavanya3k Apr 30, 2025
e69dc9d
Delete command_output.csv
lavanya3k Apr 30, 2025
b79b5e5
Delete command_output_20250210_122958.csv
lavanya3k Apr 30, 2025
cf9ffe8
Delete export_result.py
lavanya3k Apr 30, 2025
7f28f09
Delete pyQuARC/schemas/MimeType.csv
lavanya3k Apr 30, 2025
5c7293a
Delete pyQuARC/schemas/chronounits.csv
lavanya3k Apr 30, 2025
6733e7d
Delete pyQuARC/schemas/granuledataformat.csv
lavanya3k Apr 30, 2025
1066782
Delete pyQuARC/schemas/horizontalresolutionrange.csv
lavanya3k Apr 30, 2025
6800e40
Delete pyQuARC/schemas/idnnode.csv
lavanya3k Apr 30, 2025
4372eb2
Entrytitle and contact info - revised #318
lavanya3k Apr 30, 2025
19491bd
Merge branch 'feature-add_new_checks-la' of https://github.com/NASA-I…
lavanya3k Apr 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
Binary file added pyQuARC/.DS_Store
Binary file not shown.
Binary file added pyQuARC/code/.DS_Store
Binary file not shown.
11 changes: 8 additions & 3 deletions pyQuARC/code/string_validator.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from .base_validator import BaseValidator
from .gcmd_validator import GcmdValidator
from .utils import cmr_request, collection_in_cmr, if_arg, set_cmr_prms

import re

class StringValidator(BaseValidator):
"""
Expand Down Expand Up @@ -37,13 +37,18 @@ def length_check(string, extent, relation):
@if_arg
def compare(first, second, relation):
"""
Compares two strings based on the relationship
Compares two strings based on the relationship, ignoring case and special characters.

Returns:
(dict) An object with the validity of the check and the instance
"""
# Remove special characters and convert to uppercase for case-insensitive comparison
first_clean = re.sub(r'[^a-zA-Z0-9]', '', first).upper()
second_clean = re.sub(r'[^a-zA-Z0-9]', '', second).upper()

# Perform the comparison
return {
"valid": BaseValidator.compare(first.upper(), second.upper(), relation),
"valid": BaseValidator.compare(first_clean, second_clean, relation),
"value": (first, second),
}

Expand Down
12 changes: 12 additions & 0 deletions pyQuARC/code/url_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,15 @@ def doi_link_update(value, bad_urls):
validity = False

return {"valid": validity, "value": value}

@staticmethod
@if_arg
def url_update_email_check(url, bad_urls):
validity = True
# Check if the URL matches 'support-cddis@earthdata.nasa.gov'
if url in bad_urls or url == "support-cddis@earthdata.nasa.gov":
# Update the URL
url = "support-cddis@nasa.gov"
validity = False # Mark as invalid if the URL was updated
return {"valid": validity, "value": url}

Binary file added pyQuARC/schemas/.DS_Store
Binary file not shown.
38 changes: 0 additions & 38 deletions pyQuARC/schemas/MimeType.csv

This file was deleted.

19 changes: 18 additions & 1 deletion pyQuARC/schemas/check_messages_override.json
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@
{}
{
"url_update_email_check": {
"failure": "The following email address has to be updated as: `{}`.",
"help": {
"message": "Recommend providing the updated contact information as per the data product.",
"url": "https://wiki.earthdata.nasa.gov/display/CMR/Data+Center"
},
"remediation": "Recommend changing the contact information to 'support-cddis@nasa.gov'. "
},
"shortname_uniqueness": {
"failure": "The EntryTitle/DataSetId `{}` is identical to the ShortName `{}`.",
"help": {
"message": "",
"url": "https://wiki.earthdata.nasa.gov/display/CMR/Entry+Title"
},
"remediation": "Recommend providing a more descriptive title for the collection."
}
}
13 changes: 12 additions & 1 deletion pyQuARC/schemas/checks_override.json
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
{}
{
"url_description_uniqueness_check": {
"data_type": "string",
"check_function": "uniqueness_check",
"available": true
},
"url_update_email_check": {
"data_type": "url",
"check_function": "url_update_email_check",
"available": true
}
}
Loading
Loading