{"id":40523060,"url":"https://github.com/dockstore/cwlavro","last_synced_at":"2026-01-20T21:12:46.512Z","repository":{"id":38821967,"uuid":"50053028","full_name":"dockstore/cwlavro","owner":"dockstore","description":"Auto-generated Avro classes for manipulating CWL (starting with Java). Works with v1.0","archived":false,"fork":false,"pushed_at":"2025-08-22T15:20:00.000Z","size":1893,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":13,"default_branch":"develop","last_synced_at":"2025-08-22T17:49:51.200Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dockstore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2016-01-20T19:03:23.000Z","updated_at":"2025-08-22T15:20:00.000Z","dependencies_parsed_at":"2023-01-21T08:17:37.029Z","dependency_job_id":"1a95f1cb-6528-4abe-ac27-9b22bd2ceb18","html_url":"https://github.com/dockstore/cwlavro","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/dockstore/cwlavro","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockstore%2Fcwlavro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockstore%2Fcwlavro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockstore%2Fcwlavro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockstore%2Fcwlavro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dockstore","download_url":"https://codeload.github.com/dockstore/cwlavro/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dockstore%2Fcwlavro/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28613887,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T18:56:40.769Z","status":"ssl_error","status_checked_at":"2026-01-20T18:54:26.653Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-20T21:12:45.644Z","updated_at":"2026-01-20T21:12:46.504Z","avatar_url":"https://github.com/dockstore.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"CWL Avro Project \n================\n\nThis project demonstrates how to take advantage of the Avro schema for CWL in order to\nauto-generate classes to work in other languages. Due to familiarity, we're starting with\nJava here, but other languages are encouraged.  \n\nFor CWL v1.2 support, new users are suggested to use https://github.com/common-workflow-lab/cwljava\n\nAll comments and recommendations are welcome.\n\nReleases starting with v1.0 support CWL v1.0 and require CWLtool as a dependency\nReleases starting with v2.0.5 supported CWL v1.0 and required [Rabix bunny](https://github.com/rabix/bunny) or [Heterodon](https://github.com/broadinstitute/heterodon)\nHowever, with their legacy status Dockstore mostly relied on v2.0.4.x releases. \nTo simplify the branch structure, releases starting with v2.1 (based on 2.0.4.X) will be considered maintenance mode for Dockstore support with new users suggested to use cwljava as noted above. \nThe repo will also use a standard hubflow branch structure. \n\nDuring the build process, cwlavro depends on cwltool to parse CWL documents into avro (before this takes avro documents and transforms them \ninto Java objects). \n\nInstall it with the following commands (may differ depending on your distribution of Linux). \n\n    pip install --user setuptools==28.8.0\n    pip install --user cwl-runner cwltool==1.0.20170217172322 schema-salad==2.2.20170222151604 avro==1.8.1\n\n# CWL Java SDK\n\nThis demonstrates how to auto-generate Java classes from the CWL specification.\nDependencies are the schema-salad project (used to convert the CWL specification into a standard Avro schema)\nand the cwltool project (used to convert yml-based CWL documents into json). \n\n## Instantiate CWL documents as Java objects\n\nRun the following command in an environment with Maven 3 and Java 8 to demonstrate how to instantiate and work with CWL documents as Java objects. This includes tests that have a dependency on cwltool.\n\n    mvn clean install\n\nTo generate Javadoc \n\n    mvn javadoc:javadoc\n    \nThe javadoc is pre-generated and currently lives at https://common-workflow-language.github.io/cwlavro/\n\n## Generate Avro Schema\n\nThe process for generating the Java classes in the first place from the CWL specification involves the following considerations. \n\n### Background:\n\nThe CWL specification is defined in something similar to but not entirely like Avro\nUse the schema salad project to convert to an avro-ish schema document\nGenerate the Java classes for the schema\nWe cannot use these classes directly since CWL documents are not json or avro binaries, use cwl-tool to convert to json and then gson to convert from json due to some incompatibilities between CWL avro and normal avro.\n\n### To regenerate:\n\n1. Get schema salad from the common-workflow-language organization and run `python -mschema_salad --print-avro ~/common-workflow-language/v1.0/CommonWorkflowLanguage.yml \u003e cwl.avsc`\n2. Edit the allowed symbols for CWL versions. The draft3 specification generates symbols like \"draft-3.dev1\" which the avro parser will reject with the error \"Exception in thread \\\"main\\\" org.apache.avro.SchemaParseException: Illegal character in: draft-3.dev1\". You can safety delete all the symbols which are designated \"draft\" versions. \n3. Get the avro tools jar and CWL avsc and call `java -jar avro-tools-1.8.1.jar compile schema cwl.avsc cwl`\n4. Change the `Any` `enum` type Object and delete the class. The odd creation of Any as an enum otherwise block attempts to instantiate these values.\n5. Copy them to the appropriate directory in dockstore-client (you will need to refactor to insert package names)\n\nSince this is kinda involved, a travis-CI build is provided which demos the process at https://travis-ci.org/common-workflow-language/cwlavro\n\n## Individual Contributors\n\n* Denis Yuen \u003cdenis.yuen@oicr.on.ca\u003e\n* Peter Amstutz \u003cpeter.amstutz@curoverse.com\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdockstore%2Fcwlavro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdockstore%2Fcwlavro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdockstore%2Fcwlavro/lists"}