Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADCID validation #29

Merged
merged 6 commits into from
Dec 10, 2024
Merged

ADCID validation #29

merged 6 commits into from
Dec 10, 2024

Conversation

hewanadun
Copy link
Collaborator

  • Add support for dynamic ADCID validation
  • Uses function rule => check _validate_function method in NACCvalidator

Example schema

schema = {
        "adcid": {
            "type": "integer",
            "function": {
                "name": "check_adcid"
            }
        },
        "oldadcid": {
            "type": "integer",
            "function": {
                "name": "check_adcid",
                "args": {"own": False}
            }
        }
    }
  • _check_adcid function uses Datastore class to do the actual validation.
  • Add abstract method is_valid_adcid to Datastore class (needs to be implemented in form-qc-checker gear)
  • Update tests

@hewanadun hewanadun requested a review from echeng06 December 10, 2024 16:34
echeng06
echeng06 previously approved these changes Dec 10, 2024
@hewanadun hewanadun merged commit f384c5c into main Dec 10, 2024
1 check passed
@hewanadun hewanadun deleted the adcid_validation branch December 10, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants