{"id":23642507,"url":"https://github.com/sogaiu/janet-usages","last_synced_at":"2026-01-30T09:49:00.834Z","repository":{"id":118761822,"uuid":"416184778","full_name":"sogaiu/janet-usages","owner":"sogaiu","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-09T06:00:53.000Z","size":61,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-28T10:52:20.608Z","etag":null,"topics":["examples","janet","testing","usages"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sogaiu.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"support/build.janet","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-12T04:36:34.000Z","updated_at":"2023-02-07T09:38:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"d7de9506-7d17-47ee-b4dd-82db4438e6f7","html_url":"https://github.com/sogaiu/janet-usages","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjanet-usages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjanet-usages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjanet-usages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjanet-usages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sogaiu","download_url":"https://codeload.github.com/sogaiu/janet-usages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239581760,"owners_count":19662960,"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":["examples","janet","testing","usages"],"created_at":"2024-12-28T10:51:15.474Z","updated_at":"2026-01-30T09:49:00.802Z","avatar_url":"https://github.com/sogaiu.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"= janet-usages - Verifiable Usage Examples\n:toc:\n\n== Aim\n\nEncourage the creation of verifiable usage examples to help potential\nusers form appropriate mental models.\n\n== Status and Warnings\n\nThis is an early stage project.  Be sure to examine the\nlink:doc/warning.adoc[fine print].\n\n== How\n\n* Within `comment` blocks, put expressions / forms to be verified along\n  with brief records of expected values:\n+\n[source,janet]\n----\n(comment\n\n  (- 1 1)\n  # =\u003e 0\n\n)\n----\n+\nNote the use of a single line comment and `=\u003e` to express an\nexpected return value.\n+\nOne might call the combination of the form and the comment with the expected\nvalue a \"comment block test\".\n+\nSee link:doc/tips.adoc[Usage Writing Tips] for more details.\n\n* Once some setup steps are followed, usage examples can be run by:\n  `jpm test`\n\n== Setup\n\nSetting things up is mostly a matter of copying a single file.\n\nSuppose there's a project directory like:\n\n----\n.\n├── my-src-dir\n│   └── fun.janet\n├── project.janet\n└── test\n    └── test.janet\n----\n\nCopy the file\nhttps://gitlab.com/sogaiu/janet-usages/-/raw/master/test/usages.janet[test/usages.janet]\nfrom this repository to the target project's `test` subdirectory.\n\nAlternatively, from the target project's `test` subdirectory this might work:\n\n----\ncurl -O https://gitlab.com/sogaiu/janet-usages/-/raw/master/test/usages.janet\n----\n\nNow it should look something like:\n\n----\n.\n├── my-src-dir\n│   └── fun.janet\n├── project.janet\n└── test\n    ├── test.janet\n    └── usages.janet   \u003c-- copied this file into place\n----\n\nIf `jpm test` is executed and there isn't already a `usages` directory,\nit will be created along with a `sample.janet` file:\n\n----\n.\n├── my-src-dir\n│   └── fun.janet\n├── project.janet\n├── test\n│   ├── test.janet\n│   └── usages.janet\n└── usages            \u003c-- created this directory\n    └── sample.janet  \u003c-- created this file\n----\n\n`sample.janet` is just an example.  Please feel free to modify it or\nerase it after examining it.\n\nSee link:doc/details.adoc[Details] for additional information regarding the\nvarious files and directories.\n\n== Usage\n\nTo run the tests and get a report: `jpm test`\n\nAdd more usage examples by creating more comment block tests in files\nthat live in the `usages` directory.\n\n== Samples\n\nThis repository also has a `usages` directory with some examples.\n\n== Acknowledgments\n\n* andrewchambers - suggestion and explanation\n* bakpakin - janet, jpm, helper.janet, path.janet, peg for janet, etc.\n* pepe - discussion, One-Shot Power Util Solver ™ motivation, and naming\n* pyrmont - discussion and exploration\n* Saikyun - discussion and testing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsogaiu%2Fjanet-usages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsogaiu%2Fjanet-usages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsogaiu%2Fjanet-usages/lists"}