reilleya / RMTS-Software

Application for interfacing with RMTS
5 stars 2 forks source link

RASP Eng export doesn't have validation. #54

Open SparkRocketLab opened 1 month ago

SparkRocketLab commented 1 month ago

When I went to export a RASP Engine file, I ran into a validation issue with 2 of the fields.

No Spaces

It turns out the RASP Eng file format does not allow spaces to be in either the motor designation or name. However, RMTS will let you input spaces without issues. I see 2 ways to solve this problem:

  1. Update PyFormGen to allow an optional validation function. This would enable custom validations for future issues and allow the user to fix the error how they see fit by displaying a validation message and canceling the save.
  2. Escape spaces with a character like an underline in the engExportWidget okPressed function. This is easier but not as transparent to the user.

Let me know what way which way you to go and I'll post a PR.

reilleya commented 1 month ago

I like 1 better, but understand it is more to ask. Maybe we do 2 as a stopgap for now, and do 1 later? Unless you want to do 1 right away. Will get to your other PRs soon, just been a hectic couple of weeks for me!

SparkRocketLab commented 1 month ago

I like 1 better as well. I also think that fleshing out PyFormGen into a more functional form input library with unit conversion would unlock some functionality in more than just the RMTS software. I looked at the PyFormGen Repo and think I got a handle on how to do it. A few notes:

Shouldn't take me too long.

reilleya commented 1 month ago

Sounds great to me!