12

Continuous integration (in the software engineering sense) is a common method to ensure that the code in your repository works as it should after each commit. For example, you can run a set of predefined unit tests and if any of them fails, you are immediately notified that the corresponding commit is faulty and needs to be improved.

Many code hosting services such as GitHub, Bitbucket or GitLab allow you to integrate CI services into your project in a very simple way. Moreover, if your project is open source, very often you can use such CI services for free. Personally, I'm observing that nowadays even scientific projects tend to make use of CI, e.g. here (to give an example from Quantum Field Theory), since this way of developing code obviously has a lot benefits.

Unfortunately, it seems that none of the popular CI services supports Wolfram Language. This might be related to the relative size of the Mathematica community or perhaps complicated licensing conditions from WRI.

Setting up a private CI server would be one possible solution, but the maintenance overhead can be quite significant and not every Mathematica programmer might have enough experience and free time to set up such an infrastructure for a few hobby projects. That is certainly way more work than to connect your GitHub repository to a popular CI service, for which you can find tons of tutorials on the internet.

Still, I wonder if someone has already thought in this direction and perhaps got some some interesting ideas or found some good workarounds?

Wolfram Cloud actually sounds like a perfect way to implement something in that direction, but I have no idea if WRI has any plans to offer such a service for Mathematica developers. Moreover, even if that happens at some point in the future, I doubt that such a service would be free of charge for FOSS projects.

vsht
  • 3,517
  • 13
  • 23
  • 3
    Here is a client side example, see 'integration with git' section: 176573 – Kuba Oct 28 '19 at 12:21
  • 4
    Looks interesting, thanks. I tend to do something similar for my projects (essentially running the unit tests on my laptop), but the main advantage of using a CI service is that tests are run automatically and the results are visible to people creating pull requests. Which is useful once your project stops being a "one man show". – vsht Oct 28 '19 at 12:26
  • 1
    @vsht The issue is that currently the only "more-than-one-person-show" in town is WRI, basically, and so the market isn't there for any proper CI service and to set up CI on the Wolfram Cloud would be expensive and super tedious. WRI doesn't care about developers, so it's never gonna do anything like CI either. – b3m2a1 Oct 28 '19 at 16:42
  • I wonder if there is a way to do this with the Testing Framework (plus a cron job or some other type of trigger) https://reference.wolfram.com/language/tutorial/UsingTheTestingFramework.html – Joshua Schrier Oct 28 '19 at 16:50
  • ...maybe using the MonitorFolder function to look for changes and then running all the tests .... https://resources.wolframcloud.com/FunctionRepository/resources/MonitorFolder – Joshua Schrier Oct 28 '19 at 17:14
  • @JoshuaSchrier look at Kuba's link... – b3m2a1 Oct 28 '19 at 17:16
  • @vsht I would be happy to work with you to set up CI (for FeynCalc?) for you. I recently did an experiment with someone to setup CI on Travis for this repo: https://github.com/JuliaInterop/MathLink.jl . I think this is the sort of thing the Wolfram Engine would be great for. I see that you are already in our prerelease program? Maybe you can raise this issue in the redmine system we recently set up for that? – Arnoud Buzing Nov 04 '19 at 17:57
  • @ArnoudBuzing Sorry for the late reply, my workload was a bit too high in the last days. This sounds quite interesting and is worth trying. If you like, you can also contact Rolf Mertig and myself via email. My address is on my GitHub profile page, Rolf's address is probably anyhow known to you ;). I remember that I tried to register in the redmine system once, but never received an activation e-mail. Perhaps I should try again. BTW, it would be really awesome if WRI could offer CI for Mathematica developers! – vsht Nov 11 '19 at 19:57
  • ok, I've sent you an email (somehow sending email to Rolf bounced for me). – Arnoud Buzing Nov 13 '19 at 19:12
  • 1
    @Arnoud : Try rolf@mertig.com. I am setting up my gluonvision mail server these days again. – Rolf Mertig Nov 14 '19 at 16:44
  • Apart from Wolfram Engine a Wolfram Enterprise Private Cloud could be a CI / documentation setup... ( also for collaboration). – Rolf Mertig Nov 14 '19 at 16:46

0 Answers0