JuliaRegistries / TagBot

Creates tags, releases, and changelogs for your Julia packages when they're registered
https://github.com/marketplace/actions/julia-tagbot
MIT License
90 stars 18 forks source link

Rewrite TagBot in Julia (long-term goal) #55

Open DilumAluthge opened 4 years ago

DilumAluthge commented 4 years ago

Currently, TagBot is written in Python.

It would be great to eventually rewrite TagBot in pure Julia, for the following reasons:

I don't have the time right to do this, and I'm guessing that @christopher-dG doesn't either. But I figure we leave this issue open (maybe label it as Help Wanted), and eventually maybe someone will do it.

christopher-dG commented 4 years ago

I'll paste what I put in Discourse just now:

I would have liked to have written it in Julia,.

But I’ll be totally honest: Python is objectively better for this stuff right now. I’m not saying Julia won’t be a better general purpose language one day in the future (I really want it to be!) but changelog template support would be far worse without Jinja, and GPG password support would not exist without python-gnupg. In its current state, TagBot finishes its run before a Julia-implemented TagBot would finish compiling stuff. Obviously performance is less important when it’s running in the background without your knowledge, but hey, with potentially 2000 jobs every hour I think that the energy savings are substantial. I’ve gotta make up for the huge number of CI jobs I triggered yesterday… :upside_down_face:

Also, my dev experience has been far better. Because the code is basically one giant ball of side effects, testing it is really hard without a good, convenient mocking library and unittest.mock is far ahead of Julia alternatives (I say this as someone who maintains a mocking library!). The test suite with ~100% coverage, static analysis, lint checking, and format checking takes less than 3 seconds. I’d imagine the Julia equivalent to take minutes.

In the future, you probably could rewrite it in Julia and be successful; it’s only ~600 LOC.


So yeah, this can indeed be a long term goal but some library and tooling support is needed.

christopher-dG commented 3 years ago

I think I'm ready to give this a shot. With #173 and #157 having basically no way forward that doesn't involve huge refactoring or technical debt (I chose the latter for #192), it seems like a good time to try to rebuild from scratch and I think we can do a pretty good job with Julia now.

There are still some Python libraries that, AFAIK, we don't yet have good Julia alternatives for (Jinja is the obvious example, and perhaps pexpect and gnupg), but I'm fine with using PyCall for those when necessary.