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

turn tests into web services #1

Open
menzowindhouwer opened this issue Jul 30, 2024 · 1 comment
Open

turn tests into web services #1

menzowindhouwer opened this issue Jul 30, 2024 · 1 comment
Assignees

Comments

@menzowindhouwer
Copy link
Collaborator

menzowindhouwer commented Jul 30, 2024

https://github.com/CLARIAH/pyFAT/blob/develop/src/pyfat/resources/metrics/clarin_fip_metrics_v0.3.yaml defines a number of tests each identified by a metric_test_identifier, all these tests should become little web services:

  1. make for each test a small yml file, e.g.CLFIP-F1-01M-1.yml
metric_test_identifier: CLFIP-F1-01M-1
metric_test_name: "Check to see if the selflink is a handle"
metric_test_score: 0.5
metric_test_requirements:
    - test: "xpath:starts-with(//cmd:MdSelfLink, 'hdl:')"
       modality: all
  1. a flask server that creates an endpoint for each yml file, e.g. http://localhost/test/CLFIP-F1-01M-1
    1. it takes a POST of a CMDI record
    2. runs the test (see how https://github.com/CLARIAH/pyFAT/blob/develop/src/pyfat/__main__.py#L97 runs the test)
    3. return the result as JSON

max: 32 hours
hours can be written on P:OSTrails
@kerim1 can help

@menzowindhouwer
Copy link
Collaborator Author

menzowindhouwer commented Jul 30, 2024

https://github.com/CLARIAH/pyFAT/blob/develop/src/pyfat/resources/metrics/clarin_fip_metrics_v0.3.yaml#L171 needs an FACETS environment variable that points to a JSON dump of the facets in the VLO. We need to solve this differently ... skip for now. Same is true for https://github.com/CLARIAH/pyFAT/blob/develop/src/pyfat/resources/metrics/clarin_fip_metrics_v0.3.yaml#L178

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

No branches or pull requests

2 participants