Commit d49c40e
ENH: Create a rocketpy file to store flight simulations (#800)
* ENH: added .rpy file functionality (see issue 668)
This commit add 'save_to_rpy' and 'load_from_rpy' functions, that allows saving and loading flights.
* MNT: adjusting minor changes to .rpy functions and tests.
Formatted docstrings correctly.
Reverted duplication of `test_encoding.py` files.
Version warning will be called when loaded version is more recent.
* MNT: incorporating previous comments
Change file management from os to Path
Adjust docstrings
* DOC: Added comment about outputs in `to_dict` method
* MNT: Refactoring `RocketPyDecoder` unpacking operation and other small adjustments
* DOC: update changelog
* STY: formatted according to ruff
* MNT: changing `str | Path` operation to support Python 3.9
* MNT: fixed trailing commas on .rpy and added shield against `ruff` formatting .rpy and .json files
* MNT: fixing error related to `test_flight_save_load_no_resimulate`
When `include_outputs` were set to `True`, it would try to include the additional data into the flight, breaking the test
* MNT: fixing a typo and adding comment on test coverage
---------
Co-authored-by: Gui-FernandesBR <[email protected]>1 parent 6bf70f3 commit d49c40e
File tree
8 files changed
+43655
-16
lines changed- rocketpy
- simulation
- tests
- fixtures/utilities
- integration
- unit
8 files changed
+43655
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| 80 | + | |
78 | 81 | | |
79 | 82 | | |
80 | 83 | | |
| |||
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
87 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
88 | 140 | | |
89 | 141 | | |
90 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3434 | 3434 | | |
3435 | 3435 | | |
3436 | 3436 | | |
| 3437 | + | |
| 3438 | + | |
| 3439 | + | |
| 3440 | + | |
| 3441 | + | |
| 3442 | + | |
| 3443 | + | |
| 3444 | + | |
| 3445 | + | |
| 3446 | + | |
| 3447 | + | |
| 3448 | + | |
| 3449 | + | |
| 3450 | + | |
| 3451 | + | |
| 3452 | + | |
| 3453 | + | |
| 3454 | + | |
| 3455 | + | |
| 3456 | + | |
| 3457 | + | |
| 3458 | + | |
| 3459 | + | |
| 3460 | + | |
| 3461 | + | |
| 3462 | + | |
3437 | 3463 | | |
3438 | 3464 | | |
3439 | 3465 | | |
3440 | 3466 | | |
3441 | 3467 | | |
3442 | 3468 | | |
3443 | | - | |
3444 | 3469 | | |
3445 | 3470 | | |
3446 | | - | |
3447 | | - | |
3448 | 3471 | | |
3449 | 3472 | | |
3450 | 3473 | | |
3451 | | - | |
3452 | | - | |
3453 | | - | |
3454 | | - | |
3455 | 3474 | | |
3456 | 3475 | | |
3457 | 3476 | | |
| |||
3465 | 3484 | | |
3466 | 3485 | | |
3467 | 3486 | | |
3468 | | - | |
3469 | | - | |
3470 | | - | |
3471 | | - | |
3472 | | - | |
3473 | | - | |
3474 | 3487 | | |
3475 | 3488 | | |
3476 | 3489 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
| |||
12 | 17 | | |
13 | 18 | | |
14 | 19 | | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
| |||
688 | 694 | | |
689 | 695 | | |
690 | 696 | | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
0 commit comments