-
Notifications
You must be signed in to change notification settings - Fork 10
validate dimensions and indicators by fetching them directly from EVERSE api #137
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
base: main
Are you sure you want to change the base?
Conversation
|
@shraddha-bajare do you think you can have a quick look here so we can validate the indicators that are being added pls? |
| list: Indicator URIs if successful. | ||
| Example: ["https://w3id.org/everse/i/no_leaked_credentials", ...] | ||
| """ | ||
| api_url = "https://everse.software/indicators/api/indicators.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the API URL is not version-specific, it might be a good idea to check the API’s version first and ensure it matches the schema version that TechRadar supports before fetching the indicators.
This would help avoid unexpected breakages,
Something like....
```
API_URL = "https://everse.software/indicators/api/indicators.json"
SUPPORTED_VERSION = "1.0"
api_version = data.get("version")
if api_version is None:
print(f"ERROR: API JSON does not contain a 'version' field. TechRadar requires version {SUPPORTED_VERSION}.")
return None
if not api_version.startswith(SUPPORTED_VERSION):
print(
f"ERROR: API version mismatch. Found version {api_version}, "
f"but TechRadar only supports version {SUPPORTED_VERSION}. "
f"Please update TechRadar or verify API compatibility."
)
return None
This PR modernises the tools validation system by fetching quality indicators and dimensions from the EVERSE API instead of using hardcoded lists. (see https://github.com/EVERSE-ResearchSoftware/indicators/tree/main?tab=readme-ov-file#api-endpoints).
What Changed
Core Validation
helpers.pyfetch_quality_indicators()- pulls current indicators from APIfetch_quality_dimensions()- pulls dimensions with fallback if offlineload_local_schema()- dynamically injects API data into schema validationSchema
tools_validation_schema.jsonFixed
resqui.jsonindicators