{"id":26204887,"url":"https://github.com/sdsc-ordes/catplus-converters","last_synced_at":"2025-03-12T04:33:42.682Z","repository":{"id":261273860,"uuid":"870648858","full_name":"sdsc-ordes/catplus-converters","owner":"sdsc-ordes","description":"This repository hosts the CAT+ Zarr converters for different data formats","archived":false,"fork":false,"pushed_at":"2025-03-11T16:15:20.000Z","size":190,"stargazers_count":0,"open_issues_count":4,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T17:29:18.730Z","etag":null,"topics":["rdf","rust","zarr"],"latest_commit_sha":null,"homepage":"https://swisscatplus.ch","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sdsc-ordes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-10T12:24:11.000Z","updated_at":"2025-02-19T12:07:01.000Z","dependencies_parsed_at":"2024-11-25T13:18:54.803Z","dependency_job_id":"ab7c7126-5292-403f-bd9e-3f337ce3499b","html_url":"https://github.com/sdsc-ordes/catplus-converters","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.4285714285714286,"last_synced_commit":"61cd4d4e81c243fac7a0848868a78f856f986775"},"previous_names":["sdsc-ordes/cat-plus-zarr-converters","sdsc-ordes/catplus-zarr-converters","sdsc-ordes/catplus-converters"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdsc-ordes%2Fcatplus-converters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdsc-ordes%2Fcatplus-converters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdsc-ordes%2Fcatplus-converters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sdsc-ordes%2Fcatplus-converters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sdsc-ordes","download_url":"https://codeload.github.com/sdsc-ordes/catplus-converters/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243158977,"owners_count":20245668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rdf","rust","zarr"],"created_at":"2025-03-12T04:31:25.155Z","updated_at":"2025-03-12T04:33:42.671Z","avatar_url":"https://github.com/sdsc-ordes.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cat+ Zarr Converters\n\n## About\n\nThis repository contains all the converters for the different data types in the Cat+ project (Agilent, UV, IR, etc.)\nThe data types are all in different formats, their data and metadata colluded together. The goal will be to convert the metadata to [an established ontology](https://github.com/sdsc-ordes/catplus-ontology/tree/main), and provide the data in their original files.\n\n## Tools\n\n### converter\nThe converter parses a json input into an rdf graph and serializes the graph to either turtle or jsonld.\nIt expects the input to conform to the cat+ ontology and the struct `src/catplus-common/src/models/types.rs`. Example input files are provided in `examples` directory.\n\n#### Usage\n\nThe `converter` has four arguments:\n\n- input_type: currently `synth` (see `examples/1-Synth.json`) or `hci` (see `examples/0-HCI.json`)\n- inputfile: path to input file (relative to top level of the repo or absolute)\n- outputfile: path to output file (relative to top level of the repo or absolute)\n- format: rdf output format, currently `turtle` or `jsonld`\n\nThe `converter` turns the inputfile into a rdf graph and serializes it to either turtle or jsonld. The serialization is written to the provided outputfile.\n\nExamples\n\n```\njust run synth examples/1-Synth.json examples/1-Synth.ttl turtle\njust run hci examples/0-HCI.json examples/0-HCI.ttl jsonld\n```\n\n### Architecture\n\nThe json input is read with `serde_json`: the transformation into rdf is done by the `src/catplus-common` library.\nIt uses `sophia_rs`. The mapping is triggered by `src/catplus-common/src/models/types.rs` and makes use of the namespaces defined at `src/catplus-common/src/graph/namespaces`.\n\n### Shacl Validation\n\nThe rdf graph confirms to the cat+ ontology: https://github.com/sdsc-ordes/catplus-ontology. Currently rust offeres no Shacl Validation Library, but once such a library exists, it would make sense to add a Shacl Validation.\n\nThe Shacl Validation can be done manually here: https://www.itb.ec.europa.eu/shacl/any/upload\n\n## Installation guidelines\n\nThe repo is setup with nix.\n\n```\ngit clone git@github.com:sdsc-ordes/catplus-converters.git\ncd catplus-converters\ncargo build\n```\n\nFrom here on you can work with a just file:\n\nThe rust commands can be started via a justfile:\n\n```\njust --list\nAvailable recipes:\n    build *args                                 # Build all crates\n    default                                     # Default recipe to list all recipes.\n    format *args                                # Format all crates\n    fmt *args                                   # alias for `format`\n    nix-develop *args                           # Enter a Nix development shell.\n    run input_type input_file output_file *args # Run the converter.\n    test *args                                  # Test all crates\n```\n\n### Tests\n\nRun the tests with `just test`: only integration tests have been integrated that ensure that the serialized graph in turtle is isomorphic to an expected turtle serialization of the input data.\n\n### Contribute\n\nThe repo is a Poc under heavy development and not yet ready to take contributions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdsc-ordes%2Fcatplus-converters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsdsc-ordes%2Fcatplus-converters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsdsc-ordes%2Fcatplus-converters/lists"}