can someone think of a project that makes exemplary use of codox (i.e. usage of doc/
) and also tags releases on github?
why tags are needed?
@tsulej I’m working on a tool that may utilise tags — unfortunately tagging releases doesn’t seem to be a very common thing 😕
true
(which I believe is unfortunate on it’s own, not just because I need it 🙂)
I don't tag releases too... still working on snapshots. However I started to enhance my documentation with examples in metatags. Examples can be run during doc generation. I can also generate images from examples. Since in codox I can't run my code snippets all process looks like: metadata -> alter :doc tag from info (examples) in tags -> image generation -> codox
https://clojure2d.github.io/clojure2d/docs/codox/clojure2d.core.html#var-point
whole examples part is generated from metadata
(defn point
"Draw point at `x`,`y` or `^Vec2` position.
It's implemented as very short line. Consider using `(rect x y 1 1)` for speed when `x` and `y` are integers."
{:examples [(ex/example-gen-image "Sequence of points."
(doseq [x (range 10 159 10)] (point canvas x x)))
(ex/example-gen-image "Magnified point can look differently when different stroke settings are used."
(-> canvas
(scale 80.0)
(set-stroke 0.5)
(point 0.5 0.5)
(set-stroke 0.5 BasicStroke/CAP_SQUARE BasicStroke/JOIN_MITER)
(point 1.5 1.5)))]}
([canvas ^double x ^double y]
(line canvas x y (+ x 10.0e-6) (+ y 10.0e-6))
canvas)
([canvas ^Vec2 vec]
(point canvas (.x vec) (.y vec))))
it's just poc
quick and dirty code https://github.com/Clojure2D/clojure2d/blob/master/src/meta_doc/core.clj
@tsulej that’s interesting to see, thanks for sharing!