Skip to content

Conversation

@vuillaut
Copy link
Contributor

@vuillaut vuillaut commented Oct 29, 2025

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.py

    • Added fetch_quality_indicators() - pulls current indicators from API
    • Added fetch_quality_dimensions() - pulls dimensions with fallback if offline
    • Updated load_local_schema() - dynamically injects API data into schema validation
  • Schema tools_validation_schema.json

    • Removed hardcoded dimension/indicator enums
    • Now populated dynamically at test runtime
  • Fixed resqui.json indicators

@vuillaut vuillaut marked this pull request as ready for review November 17, 2025 12:17
@vuillaut
Copy link
Contributor Author

@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"
Copy link
Collaborator

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

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.

3 participants