Move example code to dev/ and clean up config for library consumers - #3
Conversation
…sumers - Move src/example/ to dev/ so example code is not packaged in the published JAR (avoids namespace collisions for downstream users) - Replace hardcoded example.core-test inline runner with cognitect test-runner that discovers tests automatically - Remove --fail-threshold 0 from coverage aliases (consumers should set their own threshold) - Remove --test-ns-regex hardcoded example pattern from coverage aliases - Add dev/ to :test-paths (lein) and :extra-paths (clj aliases) so CI can still find the example namespaces for testing https://claude.ai/code/session_01WpM3eidMhXdmEvo9DRX1vH
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a6b7ce9b0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Moves the repository’s demo/example namespace out of src/ so it won’t be packaged into the published JAR, and updates test/coverage tooling so CI still discovers and runs the example code.
Changes:
- Relocate example code to
dev/example/and update Leiningen:test-pathsaccordingly - Switch
clj -M:testfrom an inline runner tocognitect-labs/test-runnertest discovery - Simplify coverage aliases by removing hardcoded
--test-ns-regexand--fail-threshold 0
Reviewed changes
Copilot reviewed 1 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| project.clj | Adds explicit :source-paths and updates :test-paths to include dev/ so Lein tests can still load the example namespace. |
| dev/example/core.clj | Reintroduces the example/demo functions under dev/ (no longer shipped in the JAR). |
| deps.edn | Updates :test to use cognitect test-runner and adjusts :coverage / :coverage-html aliases to include dev/ and remove hardcoded options. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Revert cognitect test-runner (git dep may cause resolution issues in
CI) back to inline clojure.test runner
- Move dev/ from top-level :test-paths to :profiles {:dev {:source-paths}}
in project.clj so cloverage can discover example namespaces as sources
- Add comments noting dev/ layout for downstream users
https://claude.ai/code/session_01WpM3eidMhXdmEvo9DRX1vH
Summary
src/example/→dev/example/so example code is not packaged in the published JAR, avoiding namespace collisions for downstream usersexample.core-testinline runner with cognitect test-runner that discovers tests automatically--fail-threshold 0from coverage aliases — consumers should set their own threshold--test-ns-regexhardcoded example pattern from coverage aliasesdev/to:test-paths(lein) and:extra-paths(clj aliases) so CI still finds the example namespacesTest plan
lein testfinds example tests via:test-paths ["dev" "test"]clj -M:testdiscovers tests automatically via cognitect test-runnerlein cloverageandclj -M:coveragegenerate valid cobertura.xmlexample.coreis NOT included in the published JAR (lein jarand check contents)https://claude.ai/code/session_01WpM3eidMhXdmEvo9DRX1vH