{"id":22504965,"url":"https://github.com/bcbi/describables.jl","last_synced_at":"2026-03-19T23:02:05.899Z","repository":{"id":213174644,"uuid":"733225666","full_name":"bcbi/Describables.jl","owner":"bcbi","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-20T02:29:08.000Z","size":46,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-02T01:27:31.455Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","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/bcbi.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":"2023-12-18T21:07:29.000Z","updated_at":"2023-12-18T23:16:32.000Z","dependencies_parsed_at":"2023-12-19T04:41:50.790Z","dependency_job_id":"86761acb-bd96-481a-b1dd-8b70c38d57f2","html_url":"https://github.com/bcbi/Describables.jl","commit_stats":null,"previous_names":["bcbi/describables.jl"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcbi%2FDescribables.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcbi%2FDescribables.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcbi%2FDescribables.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcbi%2FDescribables.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcbi","download_url":"https://codeload.github.com/bcbi/Describables.jl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245938757,"owners_count":20697086,"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":[],"created_at":"2024-12-07T00:12:17.482Z","updated_at":"2026-01-06T21:55:27.023Z","avatar_url":"https://github.com/bcbi.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Describables.jl\n\n[![Continuous integration (CI)](https://github.com/bcbi/Describables.jl/actions/workflows/ci.yml/badge.svg)](https://github.com/bcbi/Describables.jl/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/bcbi/Describables.jl/graph/badge.svg?token=3GpnCnTyFz)](https://codecov.io/gh/bcbi/Describables.jl)\n\n## Installation\n\n```julia\njulia\u003e import Pkg\n\njulia\u003e Pkg.add(url = \"https://github.com/bcbi/Describables.jl\")\n```\n\n## Usage\n\n### Option 1: `@describable struct Foo ... end`\n\n```julia\njulia\u003e using Describables: Describables, @describable, set_description!\n\njulia\u003e @describable struct Foo\n           x::Int\n           y::Int\n       end\n\njulia\u003e Foo(1, 2)\nFoo(1, 2, #=  =#)\n\njulia\u003e set_description!(Foo(1, 2), \"my description\")\n\njulia\u003e Foo(1, 2)\nFoo(1, 2, #= my description =#)\n```\n\n### Option 2: `@describable Bar`\n\n```julia\njulia\u003e using Describables: Describables, @describable, set_description!\n\njulia\u003e struct Bar\n           x::Int\n           y::Int\n       end\n\njulia\u003e @describable Bar\n\njulia\u003e Bar(1, 2)\nBar(1, 2, #=  =#)\n\njulia\u003e set_description!(Bar(1, 2), \"my description\")\n\njulia\u003e Bar(1, 2)\nBar(1, 2, #= my description =#)\n```\n\nThis form can be useful if you already need to use another\nmacro in your struct definition, as seen in the following\nexample:\n\n```julia\njulia\u003e Base.@kwdef struct Baz\n           x::Int\n           y::Int\n       end\nBaz\n\njulia\u003e @describable Baz\n\njulia\u003e Baz(; x = 1, y = 2)\nBaz(1, 2, #=  =#)\n\njulia\u003e set_description!(Baz(; x = 1, y = 2), \"my description\")\n\njulia\u003e Baz(; x = 1, y = 2)\nBaz(1, 2, #= my description =#)\n```\n\n### Option 3: Macro-less workflow (manually define the `Base.show` method)\n\n```julia\njulia\u003e using Describables: Describables, show_describable, set_description!\n\njulia\u003e struct World\n           x::Int\n           y::Int\n       end\n\njulia\u003e Base.show(io::IO, mime::MIME\"text/plain\", obj::World) = show_describable(io, mime, obj)\n\njulia\u003e World(1, 2)\nWorld(1, 2, #=  =#)\n\njulia\u003e set_description!(World(1, 2), \"my description\")\n\njulia\u003e World(1, 2)\n\njulia\u003e World(1, 2)\nWorld(1, 2, #= my description =#)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcbi%2Fdescribables.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcbi%2Fdescribables.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcbi%2Fdescribables.jl/lists"}