Its been a long time since I blogged about GSoC. I have been busy with my work at Hackerrank and frankly I haven't done much work for TARDIS and of course my mentor is quite pissed off. So I decided to take some time out for TARDIS.
First I got one of my previous PRs merged - Removing usage of yield in test_utils.py.
I have submitted this one during the pre-GSoC period. The problem with the previous instance of the file is that the yield function wasn't really working and hence the tests passed anyways. It looked something like this :
What has been done
First we had several introductory meetings with all the team members on Google+. I would be working alone for a while on the montecarlo and might have to work with aoife on TARDISatomic later, something related to Helium module(The plasma project probably). It went good and everyone was an astronomer(holds a PhD) except me. After a few days I started to read code and browse through what I had done before(pre-GSoC) since I lost my flow and hardly remember anything I did(has been like a month since I touched TARDIS code).
I have submitted this one during the pre-GSoC period. The problem with the previous instance of the file is that the yield function wasn't really working and hence the tests passed anyways. It looked something like this :
The problem here was that even if I change it to :
It still works. The reason is that we were using the yield function the wrong way, though I don't know what the right way is. I reported the issue and looked for alternatives until Vytautas figured out that yield was outdated and has been replaced with parametrize. I looked up its documentation and made a quick fix :
All those PRs have been closed and stacked up since long, I was reviewing a few and found out this one, so got it merged by Wolfgang(Don't be afraid, thats my mentor :P)
Then I went about trying to restructure the code, the first thing to figure out is 'HOW' to restructure the C-part. Now this was my idea of making the code more modular and readable, but I had no idea how. What I knew was just that putting all your eggs in one basket is never good - because it looked something like this :
- montecarlo
- src
|
cmontecarlo.c
cmontecarlo.h
So basically all the methods for Montecarlo(about 20-25 functions) reside in the same file, each bunch of them serving a different purpose. The first naive approach to making it modular was something like this :
- montecarlo
- src
|
cmontecarlo.c
cmontecarlo.h
rpacket.c
rpacket.h
status.h
storage.h
For more detail, check out my PR on github.
What needs to be done
While this passes all the tests(which means we are not messing up with the imports and compilations) this might not be the best or most optimised one. I would have to talk to my mentors yet and get done with the exact thing. The tentative time to get this merged(in its right state) is by 25th of May. Thats before the coding period.
What I think
While I have not been able to invest much time to this(as much as I did in the pre-GSoC) it still is relatively going good since we are well ahead of the proposed timeline. I am supposed to be understanding radiative processes of black-holes by now, but fuck that lets code !
So probably this pace is acceptable for now but have to get more serious in the coding phase(at-least I hope so ).
Will keep posting....
No comments:
Post a Comment