Closed karthikraman closed 1 year ago
Duplicate or related to https://github.com/jyotisham/jyotisha/issues/80 ?
Good point. I had forgotten #80. And #80 was somewhat simpler, as it may not permit things like point 2 above... I think this should supersede #80.
This would require changing the toml schema, right? Thoughts?
Could add a field under timing:
adhika_maasa_handling = "adhika_only"
adhika_maasa_handling = "adhika_if_exists"
adhika_maasa_handling = "adhika_and_nija"
adhika_maasa_handling = "nija_only"
Default if unspecified would be what?
nija_only
@vvasuki this has been truly challenging, partly because I haven't fully understood the festival calculation perfectly. Can you eyeball the last few commits, and suggest ways to improve? What would be the best place to implement the handling?
.toml
files, we could process and add additional festivals (I tried it and commented it out)get_possibly_relevant_fests()
as I have mostly done here_should_assign_festival()
as I have done here - I seem to not be able to get around this exception check and had to hack together more exception handling here. What do you think is the best way forward? I should have really started this in a separate branch -- totally underestimated the difficulty of the problem. All tests pass currently (but I think some adhika maasa festivals like ArambhaH and samApanam are not assigned)
The tests were failing on my computer. Fixed those, simplified the code, added comments. You should be set for further changes.
You were roughly on the right track - get_possibly_relevant_fests needed to be modified. Now, get_possibly_relevant_fests was not properly fixed/ tested; so you needed to add ~80 lines downstream in apply_month_anga_events to handle edge cases that slipped through (removed all that junk).
Things I noted:
Good luck forward!
Need to expand the toml description to include a tag for adhika masas
There are festivals that are celebrated
The above logic should be supported by the toml and encode in the decision making.