FAI-CIVL / FAI-Airscore

AirScore - online paragliding / hanggliding GAP-based scoring software.
https://airscore.cc/
GNU General Public License v3.0
13 stars 17 forks source link

Formula refactor Branch #221

Open biuti opened 3 years ago

biuti commented 3 years ago

I just pushed a branch, https://github.com/FAI-CIVL/FAI-Airscore/tree/formula_refactor I tested it and it should be ok, but as it changes the database, I preferred not merging it immediately.

Attached the sql commands to launch to change database. When you are done we can merge. sql commands.txt

kuaka commented 3 years ago

What is it? What does it do?

biuti commented 3 years ago

It removes unused columns on database, forPk, formula_type, formula_version, external_name. They are removed from preset files as well. formula_type and formula_version are now Formula properties (unused at the moment). default value for validity_ref changed to 'max_score' as now both GAP and PWC are using it.

Added a check to external comps and converted comps if formula exists, sends an alert if a converted comp has invalid formula.

Formula.get_lib() optimised Formula.from_fsdb() now checks if formula exists in Airscore, and initialises using preset values before applying FSDB values.

kuaka commented 3 years ago

fine by me (as long as it has been properly tested) as I will just delete my db and recreate.