{"id":23642504,"url":"https://github.com/sogaiu/judge-gen","last_synced_at":"2026-02-14T08:01:01.689Z","repository":{"id":118761823,"uuid":"274617715","full_name":"sogaiu/judge-gen","owner":"sogaiu","description":null,"archived":false,"fork":false,"pushed_at":"2021-12-31T23:28:47.000Z","size":497,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-06T03:57:22.794Z","etag":null,"topics":["examples","janet","testing"],"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":"2020-06-24T08:35:05.000Z","updated_at":"2023-02-07T09:34:05.000Z","dependencies_parsed_at":null,"dependency_job_id":"ce9c7d10-fbce-4d83-9eff-e53794244bc3","html_url":"https://github.com/sogaiu/judge-gen","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/sogaiu/judge-gen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjudge-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjudge-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjudge-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjudge-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sogaiu","download_url":"https://codeload.github.com/sogaiu/judge-gen/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjudge-gen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29439820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T07:24:13.446Z","status":"ssl_error","status_checked_at":"2026-02-14T07:23:58.969Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["examples","janet","testing"],"created_at":"2024-12-28T10:51:15.054Z","updated_at":"2026-02-14T08:01:01.661Z","avatar_url":"https://github.com/sogaiu.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"= judge-gen - Generate and Run Tests from Usage Examples\n:toc:\n\n== Aims\n\n* Make simple testing low-cost and automatable especially during\n  exploratory coding when using Janet.\n\n* Encourage the creation of illustrative examples to help potential users\n  form appropriate mental models.\n\n== Status and Warnings\n\nThis is an early stage project.  The author uses it in a number of\nprojects though.  Be sure to examine the link:doc/warning.adoc[fine print].\n\n== How\n\n* Within `comment` blocks, put expressions / forms to be tested 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 form + expected value comment a \"comment block\ntest\".\n+\nSee link:doc/tips.adoc[Usage / Test Writing Tips] for more details.\n\n* Once some setup steps are followed, tests can be run by: `jpm test`\n\n== Example Setup\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\n0. Decide on a name for the directory to hold comment block tests,\n   e.g. `examples`.\n1. Copy the file `test/judge-gen.janet` from this repository to the\n   target project's `test` subdirectory and rename it to\n   `examples.janet`.\n3. Create a direct subdirectory of the project root directory named\n   `examples` to house comment block tests.\n4. Within the `examples` directory, create at least one file with a\n   comment block test in it.\n\nNow it should look something like:\n\n----\n.\n├── examples\n│   └── nice-samples.janet\n├── my-src-dir\n│   └── fun.janet\n├── project.janet\n└── test\n    ├── examples.janet\n    └── test.janet\n----\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 tests / examples by creating more comment block tests in\nfiles that live in an appropriate directory.\n\n== Sample Repositories\n\nThis repository can serve as an example, but here are some others:\n\n* https://github.com/sogaiu/clojure-peg[clojure-peg]\n* https://github.com/sogaiu/detect-clj-ns[detect-clj-ns]\n* https://github.com/sogaiu/janet-zip[janet-zip]\n* https://github.com/sogaiu/mal-peg[mal-peg]\n* https://gitlab.com/sogaiu/margaret[margaret]\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* rduplain - bringing to light customization of `jpm test`\n* Saikyun - discussion and testing\n* srnb@gitlab - suggestion\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsogaiu%2Fjudge-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsogaiu%2Fjudge-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsogaiu%2Fjudge-gen/lists"}