Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
DilumAluthge opened this issue Feb 9, 2020 · 2 comments
Open

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

DilumAluthge opened this issue Feb 9, 2020 · 2 comments
Labels
rewrite Will be done in the Julia rewrite of TagBot (see #55), but not before.

Comments

@DilumAluthge
Copy link
Member

Currently, TagBot is written in Python.

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

  • We might as well "eat our own dog food" when developing our own tools.
  • It is always great to showcase the use of Julia as a general purpose programming language (as opposed to just a scientific computing language).

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
Copy link
Member

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… 🙃

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
Copy link
Member

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.

@DilumAluthge DilumAluthge added the rewrite Will be done in the Julia rewrite of TagBot (see #55), but not before. label Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rewrite Will be done in the Julia rewrite of TagBot (see #55), but not before.
Projects
None yet
Development

No branches or pull requests

2 participants