{"id":32178229,"url":"https://github.com/rabix/cwl-format","last_synced_at":"2025-10-21T20:51:56.651Z","repository":{"id":55328963,"uuid":"249998848","full_name":"rabix/cwl-format","owner":"rabix","description":"A very opinionated code formatter for CWL","archived":false,"fork":false,"pushed_at":"2025-09-04T19:07:44.000Z","size":146,"stargazers_count":10,"open_issues_count":8,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-21T20:51:40.226Z","etag":null,"topics":["code-formatter","common-workflow-language","cwl"],"latest_commit_sha":null,"homepage":null,"language":"Common Workflow Language","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/rabix.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":"2020-03-25T14:20:31.000Z","updated_at":"2025-07-09T18:05:46.000Z","dependencies_parsed_at":"2024-06-20T21:56:59.980Z","dependency_job_id":"ffc2d318-68f0-4a78-8496-15ec92619a6f","html_url":"https://github.com/rabix/cwl-format","commit_stats":{"total_commits":50,"total_committers":7,"mean_commits":7.142857142857143,"dds":"0.19999999999999996","last_synced_commit":"373ed089c05a14d0a7bce5cbc1afb8209cc226f5"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/rabix/cwl-format","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabix%2Fcwl-format","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabix%2Fcwl-format/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabix%2Fcwl-format/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabix%2Fcwl-format/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rabix","download_url":"https://codeload.github.com/rabix/cwl-format/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rabix%2Fcwl-format/sbom","scorecard":{"id":757349,"data":{"date":"2025-08-11","repo":{"name":"github.com/rabix/cwl-format","commit":"01f999317cd40f402807c68aa00a99f151f3b350"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":1,"reason":"Found 4/21 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/rabix/cwl-format/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/rabix/cwl-format/tests.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:29","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:30","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:33","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:40","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T22:06:28.972Z","repository_id":55328963,"created_at":"2025-08-22T22:06:28.973Z","updated_at":"2025-08-22T22:06:28.973Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280333493,"owners_count":26312845,"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","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["code-formatter","common-workflow-language","cwl"],"created_at":"2025-10-21T20:51:55.473Z","updated_at":"2025-10-21T20:51:56.638Z","avatar_url":"https://github.com/rabix.png","language":"Common Workflow Language","readme":"# CWL Format\n\n[![Tests](https://github.com/rabix/cwl-format/workflows/Tests/badge.svg)](https://github.com/rabix/cwl-format/actions?query=workflow%3ATests)\n[![PyPI version](https://badge.fury.io/py/cwlformat.svg)](https://pypi.org/project/cwlformat/)\n\nCWL Format is a specification and a reference implementation for\na very opinionated CWL code formatter.\n\nIt outputs CWL in a standardized YAML format. It has no settings or\noptions because you have better things to do with your time. And because\nCWL Format is always correct.\n\nThis repository lists the formatting rules and also contains a Python\nimplementation of the formatter.\n\n```\npip install cwlformat\ncwl-format unformatted.cwl \u003e formatted.cwl\n```\n\nIf you don't have a \u003e py3.6 environment, you can use `pipx`:\n```\npip install pipx  # from your \u003c py3.6 environment\npipx ensurepath # ensures CLI application directory is on your $PATH\npipx install cwlformat --python python3.7 #tells pipx to set up a Py3.7 env for this app\n```\n\nUse programmatically in Python by doing\n\n```python\nfrom cwlformat.formatter import cwl_format\n\nformatted_text = cwl_format(unformatted_text)\n```\n\nor\n\n```python\nfrom cwlformat.formatter import stringify_dict\n\nas_dict = load_yaml(unformatted_text)\nformatted_str = stringify_dict(as_dict)\n```\n\n## Rules\n\n- Only comment lines at the top of the file, including blank lines,\n  before the actual CWL code are preserved. All other comments are lost.\n  **Do not use this if all comments in the YAML are important to you**. \n\n- If the first line does not start with `#!/usr/bin/env ` the line\n  `#!/usr/bin/env cwl-runner` is added to the top of the file.\n\n- All CWL fields are ordered systematically. The field order for specific \n  fields have a defined precedence (\"pinned fields\"). Any fields not \n  present in this file (\"free fields\") are printed after the pinned fields \n  and ordered alphabetically.\n\n- A single blank line is added before the following fields if the parent \n  structure is a process.\n  - inputs\n  - outputs\n  - steps\n  - requirements\n  - hints\n  - baseCommand\n\n- The pinned fields are defined in [this YAML file][spec]. \n\n- Specific pinned field orderings are available for CommandLineTool, \n  ExpressionTool and Workflow processes. All other types follow a generic\n  pinned field list.\n \n- All strings that fit within 80 columns are expressed in flow style.\n  Longer strings or strings with new lines are expressed in block style.\n\n- All lists and maps are expressed in block style\n\n- The ordering of all lists are preserved\n\n- Indentation is 2 spaces, including for lists\n\n[spec]: https://raw.githubusercontent.com/rabix/cwl-format/master/cwlformat/keyorder.yml\n\n## Conformance tests\n\nA series of documents are found in the [`tests`][tests] directory that can be used\nto check correctness of a formatter. The files named `original-*` are the input files\nand the files named `formatted-*` are the corresponding formatted documents. There\nare a mixture of YAML and JSON input files. Formatted files are always YAML.\n\n[tests]: https://github.com/rabix/cwl-format/tree/master/tests/cwl\n\n\n# CWL Exploder\n\nThis takes as input a packed workflow (workflow with all steps in lined) and splits it\nrecursively into parts.\n\n```\ncwl-explode formatted-atac-seq-pipeline.cwl expected-exploded-atac-seq.cwl\n```\n\nResults in the [exploded parent workflow](https://github.com/rabix/cwl-format/blob/master/tests/cwl/expected-exploded-atac-seq.cwl)\nand [52 sub-components](https://github.com/rabix/cwl-format/tree/master/tests/cwl/expected-exploded-atac-seq.cwl.steps)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frabix%2Fcwl-format","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frabix%2Fcwl-format","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frabix%2Fcwl-format/lists"}