IAGA-VMOD / IGRF14eval

https://iaga-vmod.github.io/IGRF14eval/
MIT License
1 stars 2 forks source link

Misc improvements #2

Open smithara opened 7 months ago

smithara commented 7 months ago

I'm writing a few notes here that I intend to address ASAP

  1. Synchronising .ipynb and .py paired files I assume the reason for having both formats is to allow people to easily use the .py version instead and not have the bother of notebooks. These should be made identical and synchronised automatically. It's possible to do this using jupytext and pre-commit, and can be done during a Pull Request (PR) without adding anything to your local development environment. This means that you can just edit the .ipynb file and push that change, and I'll add a CI service that updates the .py version automatically (or the other way round). I've added this in https://github.com/IAGA-VMOD/IGRF14eval/pull/3, with some explanation
  2. Protect the main branch and enforce changes to come through PR That's the "right" way to collaborate on a git repo, firstly to allow a review before merging, and secondly to add things like the above automation.
  3. Building a site that displays the executed notebooks (like this) - uses jupyterbook The problem this solves is that when someone supplies their .cof files the notebooks are not updated with the new figures. The site is built automatically to provide those (and test that the code actually works if we change it). See https://github.com/IAGA-VMOD/IGRF14eval/pull/4
  4. Improve the code/notebooks Of course a lot can be done here, but better to stick with what works already (though it depends what more we want to do for the candidates evaluations). I'll anyway make some tweaks to the notebooks to fix how they appear in the jupyterbook site.
  5. Contribution guide - see https://github.com/IAGA-VMOD/IGRF14eval/issues/1
ciaranbe commented 7 months ago
  1. Excellent - I figured there must be some easy way to keep them in sync. One thing that I wanted to add was a couple of lines of code to truncate any g/h values that were more than 2 decimal places in the load-in-file stage.
  2. Of course - let's protect the main branch now (the sacred timeline!)
  3. OK - how do you build the website like that. I see the advantage of doing that and then produces the images automatically.
  4. Yes - first improvement can be checking 2dp truncation. Other changes are welcome
  5. As noted in #1 Clemens is going to start that.
smithara commented 7 months ago
  1. jupytext - Ok and done. It's my first time using it properly - hopefully there'll be no bad surprises! (you should make sure to pull these changes now to avoid confusion later when jupytext syncs changes)
  2. main branch now protected (the rules are configured here)
  3. The way I'm building the website is less standard and a bit complex to understand. I'll try document it some more but the plan is that it should just happen in the background and not get in the way. We can also expand it a bit as a nice way to display the process of IGRF candidates evaluation and supplementary material for the publication.