RocketPy icon indicating copy to clipboard operation
RocketPy copied to clipboard

ENH: automate dispersion

Open FranzYuri opened this issue 3 years ago • 3 comments

Pull request type

Please check the type of change your PR introduces:

  • [X] Code base additions (bugfix, features)
  • [ ] Code maintenance (refactoring, formatting, renaming, tests)
  • [ ] ReadMe, Docs and GitHub maintenance
  • [ ] Other (please describe):

Pull request checklist

Please check if your PR fulfills the following requirements, depending on the type of PR:

  • ReadMe, Docs and GitHub maintenance:

    • [X] Spelling has been verified
    • [X] Code docs are working correctly
  • Code base maintenance (refactoring, formatting, renaming):

    • [ ] Docs have been reviewed and added / updated if needed
    • [ ] Lint (black rocketpy) has passed locally and any fixes were made
    • [ ] All tests (pytest --runslow) have passed locally
  • Code base additions (for bug fixes / features):

    • [ ] Tests for the changes have been added
    • [ ] Docs have been reviewed and added / updated if needed
    • [X] Lint (black rocketpy) has passed locally and any fixes were made
    • [X] All tests (pytest --runslow) have passed locally

What is the current behavior?

Currently we need to write a dictionary for the dispersion

What is the new behavior?

now it is possible to get a dictionary for the dispersion through an .csv file from excel

Does this introduce a breaking change?

  • [ ] Yes
  • [X] No

Other information

I also added a .csv file as an example at /data/dispersion csv files/juninho.

FranzYuri avatar Sep 13 '22 23:09 FranzYuri

Good one @FranzYuri !!

Quick questions before reviewing:

  • [x] The csv file seems to be not posslished, with some empty columns at the begining, I'd suggest cleaning it before merging. Also, I don't think it's safe idea using sep=";" in the code, as the .csv file could also have "," (comma) as separator.
  • [x] Could we use Calisto's parameters on the example .csv file so we keep in the same page as the current documentation? I believe the rocket you described on your file belongs to a specific rocket design team...
  • [x] Is it possible to you adding a simulation example using this method? This could be in an jupyter notebook if you prefer

Gui-FernandesBR avatar Sep 14 '22 10:09 Gui-FernandesBR

Hey, two commentes here:

  • Could we make it work with other file types besides .csv? Like using the native excel file formats such as .xlsx

  • I think another important part of the automation is maybe saving some relevant results back in the original file. This would make the results easy to analyze and compare if the simulations are done on a large scale

MateusStano avatar Sep 16 '22 04:09 MateusStano

Hey, two commentes here:

  • Could we make it work with other file types besides .csv? Like using the native excel file formats such as .xlsx

  • I think another important part of the automation is maybe saving some relevant results back in the original file. This would make the results easy to analyze and compare if the simulations are done on a large scale

Just remember to ensure that the code doesn't modify the input data on original file. It is possible to open a new file if it's needed.

Gui-FernandesBR avatar Sep 16 '22 13:09 Gui-FernandesBR

This will be understood as a colum separator if the user set "," as sepator. image

I will try to fix it

Gui-FernandesBR avatar Sep 24 '22 10:09 Gui-FernandesBR

Hey, two commentes here:

  • Could we make it work with other file types besides .csv? Like using the native excel file formats such as .xlsx
  • I think another important part of the automation is maybe saving some relevant results back in the original file. This would make the results easy to analyze and compare if the simulations are done on a large scale

@MateusStano , the ".xlsx" is a binary file, therefore it's not recommended to upload/use it on git. I think that it's correctly doing when asking for .csv files. When it is the case the user has a .xlsx file, he/she should also be able to easily convert it to a .csv file (by using MS excel or others).

But yes, the idea of supporting different files is good one. I think the same with .txt and .json files format.

Gui-FernandesBR avatar Sep 24 '22 11:09 Gui-FernandesBR