{"id":28712423,"url":"https://github.com/polusai/tools-templates","last_synced_at":"2025-08-12T13:08:27.740Z","repository":{"id":227322928,"uuid":"771073449","full_name":"PolusAI/tools-templates","owner":"PolusAI","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-11T15:38:15.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-11T17:29:00.766Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/PolusAI.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,"zenodo":null}},"created_at":"2024-03-12T16:33:36.000Z","updated_at":"2025-08-11T15:38:20.000Z","dependencies_parsed_at":"2024-08-15T17:55:01.251Z","dependency_job_id":null,"html_url":"https://github.com/PolusAI/tools-templates","commit_stats":null,"previous_names":["polusai/tools-templates"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PolusAI/tools-templates","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolusAI%2Ftools-templates","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolusAI%2Ftools-templates/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolusAI%2Ftools-templates/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolusAI%2Ftools-templates/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PolusAI","download_url":"https://codeload.github.com/PolusAI/tools-templates/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PolusAI%2Ftools-templates/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270065443,"owners_count":24520946,"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-08-12T02:00:09.011Z","response_time":80,"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":[],"created_at":"2025-06-14T23:05:48.908Z","updated_at":"2025-08-12T13:08:27.726Z","avatar_url":"https://github.com/PolusAI.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Template for image-tools\n\n## Usage\n\nFirst, create a Python virtual environment and activate it.\nThis templated was developed and tested with `Python3.9` but should work later versions as well.\n\n```bash\npython3 -m venv venv\nsource venv/bin/activate\n```\n\nThen, install the `PolusAI/tools` package from GitHub.\n\n```bash\npip install git+https://github.com/PolusAI/tools.git\n```\n\nThen, navigate to the template directory in this repo:\n\n```bash\ncd path/to/tools-templates/image-templates/tool-template\n```\n\nUse poetry to install the template.\nIf you don't already have poetry installed, you can follow the instructions [here](https://python-poetry.org/docs/#installing-with-the-official-installer).\n\nSince the template is a virtual package, you need to install it without the root.\n\n```bash\npoetry install --no-root\n```\n\nNow, navigate to the directory where you want to create the tool.\n\n```bash\ncd path/to/your/tools/parent/directory\n```\n\nCreate the tool using the template.\n\n```bash\ncookiecutter path/to/tools-templates/image-templates/tool-template\n```\n\nYou will be prompted to enter some information about the tool, including a path to a CWL file.\nThe important fields are:\n\n- `author`: The name of the author of the tool.\n- `author_email`: The email of the author of the tool.\n- `tool_name`: The name of the tool.\n- `tool_package`: The way the tool will be imported in python code.\n- `tool_description`: A short description of the tool.\n- `tool_version`: The version of the tool.\n- `cwl_path`: The path to the CWL file that will be used to generate the tool.\n  \nThe rest of the fields are automatically generated based on the information you provide.\nThey can still be modified if needed.\n\nAfter generating the tool, this CWL file will be automatically copied to the tool directory.\n\n## CWL File\n\nSee the [Common Workflow Language](https://www.commonwl.org/) website for more information on CWL.\nWe use these files to describe the inputs and outputs of the tool.\nFor the purpose of this template, the CWL file is then used to generate the boilerplate code for the tool.\nIn a larger context, the CWL files for multiple tools are used to define steps in a workflow.\n\nWe provide the contents of a simple example of a CWL file below.\n\n```yaml\nclass: CommandLineTool\ncwlVersion: v1.2\n\ninputs:\n  fileExtension:\n    inputBinding:\n      prefix: --fileExtension\n    type: string\n  filePattern:\n    inputBinding:\n      prefix: --filePattern\n    type: string?\n  inpDir:\n    inputBinding:\n      prefix: --inpDir\n    type: Directory\n  outDir:\n    inputBinding:\n      prefix: --outDir\n    type: Directory\n\noutputs:\n  outDir:\n    outputBinding:\n      glob: $(inputs.outDir.basename)\n    type: Directory\n\nrequirements:\n  DockerRequirement:\n    dockerPull: polusai/ome-converter-tool:0.1.0\n  InitialWorkDirRequirement:\n    listing:\n    - entry: $(inputs.outDir)\n      writable: true\n  InlineJavascriptRequirement: {}\n```\n\nThis CWL file describes the OME-converter tool, which converts images from various formats to OME-TIFF for use in our workflows.\n\nThe `inputs` section describes the input arguments to the tool.\nThese are:\n\n- `fileExtension`: The extension of the files to convert into. This is either `ome.tiff` or `ome.zarr`.\n- `filePattern`: A pattern to match the files to convert using the `filepattern` package in Python. This is optional, as denoted by the `?` at the end of the type.\n- `inpDir`: The directory containing the files to convert.\n- `outDir`: The directory where the converted files will be saved.\n\nThe `outputs` section describes the output of the tool.\nIn this case, it is the directory containing the converted files, and the binding is automatically generated based on the `outDir` input.\n\nThe `requirements` section describes the DockerHub repository corresponding to the docker image build for this tool.\nThe remainder of the `requirements` section can be ignored for this template.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolusai%2Ftools-templates","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpolusai%2Ftools-templates","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpolusai%2Ftools-templates/lists"}