{"id":32192031,"url":"https://github.com/pmapcat/akronim","last_synced_at":"2026-07-12T22:31:14.921Z","repository":{"id":57714057,"uuid":"153650605","full_name":"pmapcat/akronim","owner":"pmapcat","description":"Doctest like functionality for Clojure programming language. ","archived":false,"fork":false,"pushed_at":"2018-10-22T17:25:50.000Z","size":42,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-05T00:08:04.586Z","etag":null,"topics":["clojure","doctest","example","inline","testing"],"latest_commit_sha":null,"homepage":"","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pmapcat.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}},"created_at":"2018-10-18T15:58:23.000Z","updated_at":"2024-08-10T17:35:28.000Z","dependencies_parsed_at":"2022-09-26T21:31:11.942Z","dependency_job_id":null,"html_url":"https://github.com/pmapcat/akronim","commit_stats":null,"previous_names":["michaelleachim/akronim"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/pmapcat/akronim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmapcat%2Fakronim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmapcat%2Fakronim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmapcat%2Fakronim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmapcat%2Fakronim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmapcat","download_url":"https://codeload.github.com/pmapcat/akronim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmapcat%2Fakronim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35404819,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-12T02:00:06.386Z","response_time":87,"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":["clojure","doctest","example","inline","testing"],"created_at":"2025-10-22T01:56:34.041Z","updated_at":"2026-07-12T22:31:14.916Z","avatar_url":"https://github.com/pmapcat.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# akronim\n\nLibrary for doctest like functionality for Clojure programming language\n\n[![CircleCI](https://circleci.com/gh/MichaelLeachim/akronim.svg?style=svg\u0026circle-token=24d07c948681a700a9b64b6341de07357d0658b4)](https://circleci.com/gh/MichaelLeachim/akronim)\n\n\n## Installation\n\n[![Clojars Project](https://clojars.org/thereisnodot/akronim/latest-version.svg)](https://clojars.org/thereisnodot/akronim) \n\n\n## Usage\n\nThe akronim package provides `defns` macro \nto make testing and inplace documentation easier. \n\n### Getting started\n\n```clojure\n(require '[thereisnodot.akronim.core :refer [defns]))\n\n;; Tests\n\n(defns simple-sum\n  \"Will execute function over value of the map\"\n  [(simple-sum 3 4) =\u003e 7\n   (simple-sum 4 5) =\u003e 9]\n  [a b]\n  (+ a b))\n  \n(test #'simple-sum) =\u003e :ok\n\n;; On the other hand, erroneous tests will give AssertionError\n\n(defns simple-sum-will-fail\n  \"Will execute function over value of the map\"\n  [(simple-sum 3 4) =\u003e 222]\n  [a b]\n  (+ a b))\n  \n(test #'simple-sum-will-fail) =\u003e \nAssertionError Assert failed: (clojure.core/= (test-defns-simple-sum-will-fail 3 4) 222) \n\n;; Examples. Providing examples in this form is useful for external documentation tools\n\n(:akronim/example (meta #'simple-sum)) =\u003e \n  [\"(simple-sum 3 4)\" \"=\u003e\" \"7\"] \n  [\"(simple-sum 4 5)\" \"=\u003e\" \"9\"]\n  \n```\n\n\n### Using with core.test\n\nHere is how to use it in conjunction with testing pipeline. \n\n```clojure\n\n(ns thereisnodot.utils.html-test\n  (:require [clojure.test :refer :all]\n            [thereisnodot.utils.html :as html]))\n            \n(deftest test-inlines-within-namespace\n  (doseq [[symbol access] (ns-publics 'thereisnodot.utils.html)]\n    (when (:test (meta access))\n      (testing (str \"Testing inlines of: \" symbol)\n        (is (=  (test access) :ok))))))\n```\n\n### Altering docstring\n\nThe `:akronim/example` metadata field is formatted with the help of  [zprint](https://github.com/kkinnear/zprint) library. \nBy default, it is set to be **80** characters long. \n\nTo alter docstring of a function at the time of declaration \nset the following config option either as: `.lein-env` or `.boot-env` or environment\nvariables or Java system properties. \n\n\n\nSet `akronim_docstring` parameter as:\n* **nothing** will not alter docstring on declaration\n* **text**    will append examples at the end of the docstring\n* **markdown** will wrap the declaration into markdown Clojure code block and append examples  at the end of the docstring\n* **hljs** will wrap the declaration into HTML code for https://highlightjs.org and append examples at the end of the docstring\n\nDefault is **nothing**\n\n\n```clojure\n\n(defns simple-sum\n  \"Will execute function over value of the map\"\n  [(simple-sum 3 4) =\u003e 7\n   (simple-sum 4 5) =\u003e 9]\n  [a b]\n  (+ a b))\n  \n;; with nothing set\n(:doc (meta #'simple-sum)) =\u003e \"Will execute function over value of the map\"\n\n;; with text set\n(:doc (meta #'simple-sum)) =\u003e \n\"Will execute function over value of the map\n\n(simple-sum 3 4) =\u003e 7\n(simple-sum 4 5) =\u003e 9\"\n\n;; with markdown set\n(:doc (meta #'simple-sum)) =\u003e \n\"Will execute function over value of the map\n\n```clojure\n(simple-sum 3 4) =\u003e 7\n(simple-sum 4 5) =\u003e 9\n```\"\n\n;; with hljs set\n(:doc (meta #'simple-sum)) =\u003e \n\"Will execute function over value of the map\u003c/br\u003e\n\u003cpre\u003e\n  \u003ccode class='cljs clojure'\u003e\n    (simple-sum 3 4) =\u003e 7\n    (simple-sum 4 5) =\u003e 9\n  \u003c/code\u003e\n\u003c/pre\u003e\n```\n\n### :no-test?  metadata declaration\n\nSometimes we have to demonstrate function usage, but, for some\nreason, we don't want the function to generate `:test` \n\nUsually, it happens when we are dealing with mutability. \n\nIn this case, pass `:no-test?` as a metadata field to the \nfunction declaration. For example:\n\n```clojure\n\n(defns temp-file\n  \"Will return temp file handler without actually making it\"\n  {:no-test? true}\n  [(str (temp-file)) =\u003e \"/tmp/cljtmpfile1555885885588503551\"]\n  ([]\n   (temp-file \"cljtmpfile\" \"\"))\n  ([prefix extension]\n   (java.io.File/createTempFile prefix extension)))\n\n(test #'temp-file)\n;; =\u003e :no-test\n(:akronim/example (meta #'temp-file))\n;; =\u003e (list [(str (temp-file)) =\u003e \"/tmp/cljtmpfile1555885885588503551\"])\n```\n\n## Development\n\nThis will clone the repo and start a local repl and run tests\n\n```shell\ngit clone github.com/MichaelLeachim/akronim;\ncd akronim;\ntmuxinator . ;\n```\n\n## Change Log\n\n### [Unreleased]\n\n### [0.1.2]   2018-10-21\n#### Added\n- formatting for :akronim/example metadata field\n\n#### Changed\n- ~~There are tools that assume function declaration form to be `defn` not `defns`~~ \n  Now the same declaration as per `defn` should work. See tests\n  \n\n### [0.1.0] - 2018-10-20\n#### Added\n- configuration through environ library\n\n#### Added\n- basic functionality\n- readme\n- core tests\n- template tests\n- external configuration\n\n#### Changed \n- Moved from another project into separate repository\n- Moved templates\n\n#### Removed \n- User defined :example and docstring generation funtionality\n\n[0.1.2]: https://github.com/michaelleachim/akronim/compare/0.1.0...0.1.2\n[Unreleased]: https://github.com/michaelleachim/akronim/compare/0.1.2..HEAD\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmapcat%2Fakronim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmapcat%2Fakronim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmapcat%2Fakronim/lists"}