cljdoc

https://cljdoc.org/ & https://github.com/cljdoc/cljdoc
devurandom 2018-11-28T09:10:21.207100Z

thx, sounds like a plan. Was also thinking about whether that is something that could be offered as a service. Tell the cljdoc GitHub bot (go cljdoc) in the PR comments and it will pull the branch, build it into a random version, and provide a link in the GitHub PR. After a week it would delete the stuff again, or when the PR is merged/rejected.

martinklepsch 2018-11-28T09:37:39.207300Z

@devurandom that would require knowing how to build every project. unfortunately that can vary greatly from project to project

devurandom 2018-11-28T09:42:04.207500Z

Maybe the two can work together hand in hand? The project's CI system builds an artifact and stores the link in the GitHub issue and the cljdoc bot picks that up on command and displays it? Or maybe the cljdoc bot can trigger the project's CI system and make it call ingest towards the cljdoc preview platform?

martinklepsch 2018-11-28T09:51:15.207700Z

yeah, there's lots of good stuff that could be done... all a question of the effort / impact ratio 🙂

devurandom 2018-11-28T09:53:22.208Z

Yeah, maybe it only makes sense for projects beyond a certain exposition and size.

martinklepsch 2018-11-28T09:55:29.208200Z

I think the offline bundle stuff would be a good first step, what do you think?

devurandom 2018-11-28T09:57:32.208400Z

Sure. At least if the amount of required effort is low.

devurandom 2018-11-28T09:58:00.208600Z

I'm wondering how to lower the entry bar to producing good documentation. The less services library authors have to setup themselves, the better.

devurandom 2018-11-28T10:01:00.208800Z

So maybe just offering an installable cljdoc CLI utility (like the [`circleci` tool](https://circleci.com/docs/2.0/local-cli/)) would already be sufficient for most cases, and be less effort for you: Make the current tooling able to respond to cljdoc run with opening a page in the browser, and you'd be done.

martinklepsch 2018-11-28T10:03:08.209100Z

Right but that would require cloning the PR, which you wanted to avoid as far as I understood the workflow you imagined

devurandom 2018-11-28T10:04:42.209300Z

> Both I and the contributor should be able to look at it (i.e. the result should be available on some web space), to discuss further improvements or catch formatting mistakes. This part?

martinklepsch 2018-11-28T10:04:47.209500Z

yes

devurandom 2018-11-28T10:06:50.209700Z

Probably did not ask the 5 whys when I wrote that... 😞 What I actually meant was more like this: "They should both see the same pages. It would be convenient for them, if those pages were already available on some web space so they would not need to take any other action than looking at it."

devurandom 2018-11-28T10:09:27.209900Z

In the end the main goal of this process is to "preview this documentation to make sure it contains no formatting issues and renders as intended" (since how it renders influences how it is perceived by readers, which in turn can guide or mislead their understanding of the text).

devurandom 2018-11-28T10:10:36.210100Z

In the beginning I thought that uploading it to a web space would be convenient enough, but now I think that not many people operate web servers or want to pay for one, so that might not actually be as convenient as I thought initially.

devurandom 2018-11-28T10:20:54.210300Z

I am exploring multiple routes to tackle the underlying problem, in order to figure out what works best. What would definitely be inconvenient would be if one had to git clone cljdoc, start the server, cd to the PR checkout, ingest the docs, open the web browser, navigate to the right spot. Too many steps, too many locations to do something. Hence the idea of shoving this off to a CI, which many projects are probably already using.

martinklepsch 2018-11-28T10:23:53.210600Z

yes, I'm in favor of utilizing CI for this

martinklepsch 2018-11-28T10:24:15.210800Z

I also think the /download + artifact route might be most feasible/easy for a first version

devurandom 2018-11-28T10:25:25.211Z

Can cljdoc push the offline docs directly to S3 or similar? That might be convenient enough for many people to integrate it into their CI process. Though you probably would not want every PR to be made public like that, so you'd still need a gatekeeping process, like the (go cljdoc) bot... I think the best first step is to just make the local preview process more convenient using a wrapper shell script like the circleci script, which would just wrap java -jar cljdoc.jar or clj -m cljdoc.main or similar, just to allow people to easily use cljdoc locally as a tool.

martinklepsch 2018-11-28T10:29:32.211300Z

You don't need S3 on CircleCI: https://www.circleci.com/docs/2.0/artifacts

martinklepsch 2018-11-28T10:37:59.211600Z

I think we could probably make a script that - downloads cljdoc - runs ingest - builds offline bundle

devurandom 2018-11-28T10:39:23.211800Z

Re: S3/CircleCI: I'm thinking about how to make it easy to view the result. Having the artifact available for download is nice, but you also need to deploy it somewhere. Maybe it's necessary to tinker with different approaches for a while to figure out what works in practice for most projects and what does not.

martinklepsch 2018-11-28T10:57:49.212100Z

> need to deploy it somewhere why if reviewers can just download the artifact and view index.html — shouldn't that work? Did you take a look at an offline bundle? they work without servers

urzds 2018-11-28T12:15:08.212300Z

Plain convenience. Having the CI attach a link to a PR that people just have to click to preview the change is more convenient that having to download a tarball, extract it, open a browser.

martinklepsch 2018-11-28T12:26:05.212500Z

I think of this as an 80/20 kind of thing. Making the docs available at a remote location without any extra step is 100% UX. Downloading a tarball and opening a file inside it is 80%. The 20% to get to 100% require more effort than to get to 80%

urzds 2018-11-28T12:26:40.212700Z

good point

martinklepsch 2018-11-28T14:11:50.213Z

@urzds maybe you wanna take this on? https://github.com/cljdoc/cljdoc/issues/244

urzds 2018-11-28T14:21:26.213300Z

"take on" as in be assigned? If so, please assign @devurandom instead.

martinklepsch 2018-11-28T14:22:23.213600Z

take on as in "work on" 😄

martinklepsch 2018-11-28T14:22:33.213800Z

just wondering since it sounded like you wanted to help with this

martinklepsch 2018-11-28T14:22:54.214Z

I can't assign you so you'll have to do that yourself I guess 🙂

urzds 2018-11-28T14:23:07.214200Z

yes, very much. But I don't think I'll be paid to do this, so I'll do it in my free time instead.

martinklepsch 2018-11-28T14:23:31.214400Z

I also created a milestone (experimenting with that really) for previews related stuff: https://github.com/cljdoc/cljdoc/milestone/2

urzds 2018-11-28T14:23:48.214600Z

Anyway, I've highlighted myself here, so I'll pick this up when I'm at home.

urzds 2018-11-28T14:25:54.214800Z

I'd suggest also add a "create easy cljdoc run command" task, for the other approach -- what do you think about that? Basically have ./script/cljdoc downloadable and able to pull a released cljdoc JAR, so it can work standalone?

martinklepsch 2018-11-28T14:36:51.215800Z

There’s no cljdoc jar yet but we can write scripts that download and run cljdoc

martinklepsch 2018-11-28T14:38:34.217Z

Or package a jar properly. But that’s a little tricky as well since there are multiple isolated environments

2018-11-28T16:16:35.217200Z

I’m working on the [PR}(https://github.com/cljdoc/cljdoc/pull/227). What do you think about the name “MAIN” on top of “ARTICLES” section?

martinklepsch 2018-11-28T19:43:03.218100Z

Anyone around who's fluent in Go? I've done a ton of work on deployment/ops tooling but am now blocked by https://github.com/containous/traefik/issues/4247

mkvlr 2018-11-28T19:54:48.219300Z

https://github.com/fabiolb/fabio/ also supports blue/green deployments and is written by a guy from hashicorp

mkvlr 2018-11-28T19:55:00.219700Z

so integrates nicely with nomad

mkvlr 2018-11-28T19:56:44.220400Z

oh but can’t you remove the slash on the pedestal side?

martinklepsch 2018-11-28T20:02:28.221100Z

@mkvlr I've seen fabio mentioned in a few places but what I liked about Traefik is the automatic SSL cert generation

martinklepsch 2018-11-28T20:02:35.221300Z

AFAIK fabio doesn't have that

martinklepsch 2018-11-28T20:09:25.221900Z

Removing trailing slash in Pedestal would be workaround, right. Let me look into that...

mkvlr 2018-11-28T20:55:56.223100Z

right, I think we have a nomad job for letsencrypt, happy to share it

mkvlr 2018-11-28T20:56:26.224100Z

or should we host cljdoc on our cluster? Happy to do that as well!

martinklepsch 2018-11-28T20:56:56.224400Z

> right, I think we have a nomad job for letsencrypt, happy to share it that would be very interesting indeed

martinklepsch 2018-11-28T20:57:36.225Z

thanks for the kind offer, but I think it's best of operational stuff is defined as part of the project

mkvlr 2018-11-28T21:12:53.225700Z

I’ll look it up tomorrow, congrats on the repl podcast!

martinklepsch 2018-11-29T12:22:29.226Z

ping 🙂 (no rush, just a reminder)

mkvlr 2018-11-29T15:36:35.229200Z

so we do use letsencrypt with a nomad job

mkvlr 2018-11-29T15:36:44.229400Z

we also use vault which I think stores our certs

mkvlr 2018-11-29T15:38:03.229600Z

oh, we just use nomad to schedule a periodic job that then runs https://certbot.eff.org

mkvlr 2018-11-29T15:38:32.229900Z

happy to give you access to our repo to give you more context there

martinklepsch 2018-11-29T15:38:32.230100Z

do you use dns verification?

mkvlr 2018-11-29T15:39:03.230700Z

let me ask

mkvlr 2018-11-29T15:40:40.232100Z

https://github.com/Neilpang/acme.sh

martinklepsch 2018-11-29T15:49:38.232400Z

do you use acme.sh or certbot? I'm confused now 🙂

martinklepsch 2018-11-29T15:49:47.232600Z

Would be happy to take a look at the repo, sure

mkvlr 2018-11-29T16:06:11.232800Z

sorry, so am I

mkvlr 2018-11-29T16:07:38.233Z

added you