scicloj / noj

A clojure framework for data science
https://scicloj.github.io/noj/
Eclipse Public License 1.0
58 stars 8 forks source link

move docs generation to ci build #33

Closed behrica closed 1 month ago

behrica commented 1 month ago

@daslu I can do that if you tell me what you do manly.

It needs a bit of GitHub action runner magic, as the runner need to commit the changes into "docs". But I did that already ones, so can just copy it.

daslu commented 1 month ago

Thanks for looking into that. What I do at the moment to render the docs is evaluate notebooks/dev.clj.

Let us think.

As far as I understand, there are a few kinds of typical changes to this repo:

The docs generation is now slow, and it will become smaller. Do you think we should invoke it automatically in all cases?

behrica commented 1 month ago

I am absolutely convinced on automation via GitHub actions and therefore from scratch This being slow isn't a problem for me.

behrica commented 1 month ago

GitHub offers caching to address if needed. But first automate, then think about caching. My opinion, at least.

behrica commented 1 month ago

It takes 7 minutes know and it does things double for sure. Ones automated 'you' don't need to worry about any manual task anymore. And we optimize the build in case we see it important.

daslu commented 1 month ago

Thanks for checking.

This being slow isn't a problem for me.

I think this is important. It will make it difficult to debug when things are broken, when different people collaborate, when a few branches are merged, etc.

it does things double for sure.

If I understand correctly, we run the every namespace at least three times:

  1. generating tests
  2. testing
  3. rendering tests Probably, at least 1 and 3 can be the same run.

Also, we could probably make the automatic tutorial smaller and faster. But there will be more tutorials that will make things difficult. Maybe this means that slow tutorials should have their own space (or move to cloure-data-tutorials).

daslu commented 1 month ago

Anyway, as you said, I think it makes sense to make it work (if that it not a big task for you) and then optimize later.

daslu commented 1 month ago

Interesting, I see the clojure-data-tutorials builds are very fast, even though they have a few projects to render. https://github.com/scicloj/clojure-data-tutorials/actions image

behrica commented 1 month ago

But code debugging happens locally anyway. Once the build works, PRs should only merged when they don't break the build.

Daniel Slutsky @.***> schrieb am Sa., 28. Sept. 2024, 18:01:

Thanks for checking.

This being slow isn't a problem for me.

I think this is important. It will make it difficult to debug when things are broken, when different people collaborate, when a few branches are merged, etc.

it does things double for sure.

If I understand correctly, we run the every namespace at least three times:

  1. generating tests
  2. testing
  3. rendering tests Probably, at least 1 and 3 can be the same run.

Also, we could probably make the automatic tutorial smaller and faster. But there will be more tutorials that will make things difficult. Maybe this means that slow tutorials should have their own space (or move to cloure-data-tutorials).

— Reply to this email directly, view it on GitHub https://github.com/scicloj/noj/issues/33#issuecomment-2380719731, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA7DAOJ7BIZHGGKCNMHG7DZY3HHHAVCNFSM6AAAAABPAO34BOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBQG4YTSNZTGE . You are receiving this because you authored the thread.Message ID: @.***>

behrica commented 1 month ago

Interesting, I see the clojure-data-tutorials builds are very fast, even though they have a few projects to render.

These have know a condition, which only re-renders changed projects.

behrica commented 1 month ago

But the tutorials are slow because each creates its own docker container, this is way slower then the "make!" of the project. This is not happening here. The container creation happens only ones

behrica commented 1 month ago

Interesting, I see the clojure-data-tutorials builds are very fast, even though they have a few projects to render.

These have know a condition, which only re-renders changed projects.

Interesting, I see the clojure-data-tutorials builds are very fast, even though they have a few projects to render.

These have know a condition, which only re-renders changed projects.

Which has a problem, when some "globals" get changed, ev. nothing is re-build. -> From scratch is usually simpler, if not we needed to find a way to express dependencies...

Computing time on GitHub is free, configuring dependencies takes time.

behrica commented 1 month ago

I fixed the build of noj: https://github.com/scicloj/noj/actions

behrica commented 1 month ago

The build of my PR #34 is working as well : https://github.com/behrica/noj/actions

If you want, you can merge it, it should keep working. It is by far not optimized, we can do this lter, in my view

daslu commented 1 month ago

Nice, thanks, I'll comment on the PR.

daslu commented 1 month ago

fixed by #34