Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT: small fixes before v1.2 #550

Merged
merged 9 commits into from
Feb 9, 2024
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- [ ] Tests for the changes have been added (if needed)
- [ ] Docs have been reviewed and added / updated
- [ ] Lint (`black rocketpy/ tests/`) has passed locally
- [ ] All tests (`python3 -m pytest tests -m slow --runslow`) have passed locally
- [ ] All tests (`pytest tests -m slow --runslow`) have passed locally
- [ ] `CHANGELOG.md` has been updated (if relevant)

## Current behavior
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/test_pytest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ jobs:
- name: Run Acceptance Tests
run: pytest tests/acceptance --cov=rocketpy --cov-append --cov-report=xml

- name: Run pytest --runslow
if: github.ref == 'refs/heads/master'
run: pytest tests -m slow --runslow --cov=rocketpy --cov-append --cov-report=xml

- name: Upload coverage to artifacts
uses: actions/upload-artifact@v2
with:
Expand Down
24 changes: 24 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,30 @@ function-naming-style=snake_case
good-names=FlightPhases,
WindroseAxes,
barometric_height_ISA,
grain_I_33_initial,
convert_units_Functions,
Ix_volume,
Iy_volume,
Iz_volume,
Kn,
Kn_source,
I_dot,
I_CM,
Rdot,
Dx,
Dy,
Dz,
requires_netCDF4,
I_11_without_motor,
I_22_without_motor,
I_33_without_motor,
I_12_without_motor,
I_13_without_motor,
I_23_without_motor,
HTML,
fin_set_NACA,
fin_set_E473,
HIRESW_dictionary,


# Good variable names regexes, separated by a comma. If names match any regex,
Expand Down
93 changes: 62 additions & 31 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,34 +27,55 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased] - yyyy-mm-dd

Here we write upgrading notes for brands. It's a team effort to make them as
straightforward as possible.
<!-- These are the changes that were not release yet, please add them correctly.
Attention: The newest changes should be on top -->

### Added


### Changed


### Fixed


## [v1.2.0] - 2024-02-dd
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dd will be replaced with the release day in a future PR


You can install this version by running `pip install rocketpy==1.2.0`

### Added

- ENH: Function Support for CSV Header Inputs [#542](https://github.com/RocketPy-Team/RocketPy/pull/542)
- ENH: Argument for Optional Mutation on Function Discretize [#519](https://github.com/RocketPy-Team/RocketPy/pull/519)
- ENH: Add of a line for saving the filtered dataset [#518](https://github.com/RocketPy-Team/RocketPy/pull/518)
- ENH: Shepard Optimized Interpolation - Multiple Inputs Support [#515](https://github.com/RocketPy-Team/RocketPy/pull/515)
- ENH: adds new Function.savetxt method [#514](https://github.com/RocketPy-Team/RocketPy/pull/514)
- ENH: Argument for Optional Mutation on Function Discretize [#519](https://github.com/RocketPy-Team/RocketPy/pull/519)
- ENH: Air Brakes [#426](https://github.com/RocketPy-Team/RocketPy/pull/426)
- DOC: add juno3 flight example [#513](https://github.com/RocketPy-Team/RocketPy/pull/513)
- ENH: add Function.low_pass_filter method [#508](https://github.com/RocketPy-Team/RocketPy/pull/508)
- ENH: Air Brakes [#426](https://github.com/RocketPy-Team/RocketPy/pull/426)
-

### Changed

- MNT: Add repr method to Parachute class [#490](https://github.com/RocketPy-Team/RocketPy/pull/490)
- ENH: Function Reverse Arithmetic Priority [#488](https://github.com/RocketPy-Team/RocketPy/pull/488)
- DOC: Update Header Related Docs
- ENH Precalculate Barometric Height [#511](https://github.com/RocketPy-Team/RocketPy/pull/511)
- MNT: Encapsulate quaternion conversions [#537](https://github.com/RocketPy-Team/RocketPy/pull/537)
- MNT: improve the low pass filter and document an example [#538](https://github.com/RocketPy-Team/RocketPy/pull/538)
- ENH: Plotting both power on and off drag curves in a single plot [#547](https://github.com/RocketPy-Team/RocketPy/pull/547)
- BUG: Elliptical Fins Draw [#548](https://github.com/RocketPy-Team/RocketPy/pull/548)
- DOC: Replacing git clone command with curl in notebooks. [#544](https://github.com/RocketPy-Team/RocketPy/pull/544)
- DOC: Installing imageio library on dispersion analysis notebook [#540](https://github.com/RocketPy-Team/RocketPy/pull/540)
- MNT: improve the low pass filter and document an example [#538](https://github.com/RocketPy-Team/RocketPy/pull/538)
- MNT: Encapsulate quaternion conversions [#537](https://github.com/RocketPy-Team/RocketPy/pull/537)
- ENH: Precalculate Barometric Height [#511](https://github.com/RocketPy-Team/RocketPy/pull/511)
- ENH: optimize get_value_opt in class Function [#501](https://github.com/RocketPy-Team/RocketPy/pull/501)
- DOC: Update Header Related Docs [#495](https://github.com/RocketPy-Team/RocketPy/pull/495)
- ENH: Function Reverse Arithmetic Priority [#488](https://github.com/RocketPy-Team/RocketPy/pull/488)
- MNT: Add repr method to Parachute class [#490](https://github.com/RocketPy-Team/RocketPy/pull/490)

### Fixed

- ENH: Parachute trigger doesn't work if "Apogee" is used instead of "apogee" [#489](https://github.com/RocketPy-Team/RocketPy/pull/489)
- BUG: fin_flutter_analysis doesn't find any fin set [#510](https://github.com/RocketPy-Team/RocketPy/pull/510)
- FIX: EmptyMotor is breaking the Rocket.draw() method [#516](https://github.com/RocketPy-Team/RocketPy/pull/516)
- MNT: small fixes before v1.2 [#550](https://github.com/RocketPy-Team/RocketPy/pull/550)
- BUG: Elliptical Fins Draw [#548](https://github.com/RocketPy-Team/RocketPy/pull/548)
- BUG: 3D trajectory plot not labeling axes [#533](https://github.com/RocketPy-Team/RocketPy/pull/533)
- FIX: EmptyMotor is breaking the Rocket.draw() method [#516](https://github.com/RocketPy-Team/RocketPy/pull/516)
- BUG: fin_flutter_analysis doesn't find any fin set [#510](https://github.com/RocketPy-Team/RocketPy/pull/510)
- ENH: Parachute trigger doesn't work if "Apogee" is used instead of "apogee" [#489](https://github.com/RocketPy-Team/RocketPy/pull/489)


## [v1.1.5] - 2024-01-21
Expand All @@ -66,80 +87,90 @@ You can install this version by running `pip install rocketpy==1.1.5`
- BUG: Parachute Pressures not being Set before All Info. [#534](https://github.com/RocketPy-Team/RocketPy/pull/534)
- BUG: Invalid Arguments on Two Dimensional Discretize. [#521](https://github.com/RocketPy-Team/RocketPy/pull/521)

## [v1.1.4] - 2023-12-07
## [v1.1.4] - 2023-12-09

You can install this version by running `pip install rocketpy==1.1.4`

### Fixed

- DOC: Change from % to ! in the first cell to run properly in Colab. [#496](https://github.com/RocketPy-Team/RocketPy/pull/496)
- FIX: changes Generic Motor exhaust velocity to cached property [#497](https://github.com/RocketPy-Team/RocketPy/pull/497)
- DOC: Change from % to ! in the first cell to run properly in Colab. [#496](https://github.com/RocketPy-Team/RocketPy/pull/496)

## [v1.1.3] - 2023-11-30
## [v1.1.3] - 2023-11-29

You can install this version by running `pip install rocketpy==1.1.3`

### Fixed

- FIX: Broken Function.get_value_opt for N-Dimensional Functions [#492](https://github.com/RocketPy-Team/RocketPy/pull/492)
- FIX: Never ending Flight simulations when using a GenericMotor [#497](https://github.com/RocketPy-Team/RocketPy/pull/497)
- FIX: Broken Function.get_value_opt for N-Dimensional Functions [#492](https://github.com/RocketPy-Team/RocketPy/pull/492)

## [v1.1.2] - 2023-11-25
## [v1.1.2] - 2023-11-27

You can install this version by running `pip install rocketpy==1.1.2`

### Fixed

- BUG: Function breaks if a header is present in the csv file [#485](https://github.com/RocketPy-Team/RocketPy/pull/485)

## [v1.1.1] - 2023-11-23
## [v1.1.1] - 2023-11-24

You can install this version by running `pip install rocketpy==1.1.1`

### Added

- DOC: Added this changelog file [#472](https://github.com/RocketPy-Team/RocketPy/pull/472)
- ENH: Prevent out of bounds Tanks from Instantiation #484 [#484](https://github.com/RocketPy-Team/RocketPy/pull/484)
- DOC: Added this changelog file [#472](https://github.com/RocketPy-Team/RocketPy/pull/472)

### Fixed

- HOTFIX: Negative Static Margin [#476](https://github.com/RocketPy-Team/RocketPy/pull/476)
- HOTFIX: 2D .CSV Function and missing set_get_value_opt call [#478](https://github.com/RocketPy-Team/RocketPy/pull/478)
- HOTFIX: Tanks Overfill not Being Detected [#479](https://github.com/RocketPy-Team/RocketPy/pull/479)
- HOTFIX: 2D .CSV Function and missing set_get_value_opt call [#478](https://github.com/RocketPy-Team/RocketPy/pull/478)
- HOTFIX: Negative Static Margin [#476](https://github.com/RocketPy-Team/RocketPy/pull/476)

## [v1.1.0] - 2023-11-19

You can install this version by running `pip install rocketpy==1.1.0`

### Added

- DOC: Documentation for Function Class Usage [#465](https://github.com/RocketPy-Team/RocketPy/pull/465)
- DOC: first simulation all_info [#466](https://github.com/RocketPy-Team/RocketPy/pull/466)
- ENH: draw motors [#436](https://github.com/RocketPy-Team/RocketPy/pull/436)
- DOC: Documentation for Function Class Usage [#465](https://github.com/RocketPy-Team/RocketPy/pull/465)
- DOC: add documentation for flight data export. [#464](https://github.com/RocketPy-Team/RocketPy/pull/464)
- ENH: Add mass_flow_rate() to GenericMotor class [#459](https://github.com/RocketPy-Team/RocketPy/pull/459)
- DOC: Add documentation on how to build the docs [#452](https://github.com/RocketPy-Team/RocketPy/pull/452)
- ENH: draw motors [#436](https://github.com/RocketPy-Team/RocketPy/pull/436)
- ENH: new Flight.get_solution_at_time() method [#441](https://github.com/RocketPy-Team/RocketPy/pull/441)
- ENH: rocket drawing [419](https://github.com/RocketPy-Team/RocketPy/pull/419)
- ENH: Adding Stability Margin with Mach dependency [#377](https://github.com/RocketPy-Team/RocketPy/pull/377)

### Changed

- ENH: Spherical Caps Included in Total Length [#455](https://github.com/RocketPy-Team/RocketPy/pull/455)
- Important: This changes behavior of `TankGeometry.add_spherical_caps()`
- ENH: Clean Plots and Prints sub packages init files [#457](https://github.com/RocketPy-Team/RocketPy/pull/457)
- ENH: Add \_MotorPlots Inheritance to Motor Plots Classes [#456](https://github.com/RocketPy-Team/RocketPy/pull/456)
- DOC: organize flight examples folder [#429](https://github.com/RocketPy-Team/RocketPy/pull/429)
- ENH: Spherical Caps Included in Total Length [#455](https://github.com/RocketPy-Team/RocketPy/pull/455)
- Important: This changes behavior of `TankGeometry.add_spherical_caps()`
- DOC: improve mass and inertia docs [#445](https://github.com/RocketPy-Team/RocketPy/pull/445)
- DOC: organize flight examples folder [#429](https://github.com/RocketPy-Team/RocketPy/pull/429)

### Fixed

- MNT: Refactor exhaust velocity calculation to avoid ZeroDivisionError [#470](https://github.com/RocketPy-Team/RocketPy/pull/470)
- BUG: Fix find_input() Function to Return a Single Value [#471](https://github.com/RocketPy-Team/RocketPy/pull/471)
- MNT: Refactor exhaust velocity calculation to avoid ZeroDivisionError [#470](https://github.com/RocketPy-Team/RocketPy/pull/470)
- DOC: refactor dispersion analysis notebook [#463](https://github.com/RocketPy-Team/RocketPy/pull/463)
- DOC: fix positions and coordinate system documentation page [#454](https://github.com/RocketPy-Team/RocketPy/pull/454)
- BUG: User input checks added for Function class [#451](https://github.com/RocketPy-Team/RocketPy/pull/451)
- DOC: fix positions and coordinate system documentation page [#454](https://github.com/RocketPy-Team/RocketPy/pull/)
- MNT: fix env plots legends [#440](https://github.com/RocketPy-Team/RocketPy/pull/440)
- BUG: flight.prints.max_values() fails when launching an EmptyMotor [#438](https://github.com/RocketPy-Team/RocketPy/pull/438)
- BUG: Maintaining Extrapolation when Adding Discrete Functions with Constants [#432](https://github.com/RocketPy-Team/RocketPy/pull/432)
- MNT: Fix env plots max heights [#433](https://github.com/RocketPy-Team/RocketPy/pull/433)
- BUG: Maintaining Extrapolation when Adding Discrete Functions with Constants [#432](https://github.com/RocketPy-Team/RocketPy/pull/432)


# [v1.0.1] - 2023-10-07

You can install this version by running `pip install rocketpy==1.0.1`

### Fixed

- BUG: Remove NoseCone Warning [#428](https://github.com/RocketPy-Team/RocketPy/pull/428)
- BUG: motor coordinates [#423](https://github.com/RocketPy-Team/RocketPy/pull/423)
18 changes: 8 additions & 10 deletions docs/examples/ndrt_2020_flight_sim.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"source": [
"parameters = {\n",
" # Mass Details\n",
" \"rocket_mass\": (18.998, 0.010), # Rocket dry mass: 20.846 kg\n",
" \"rocket_mass\": (18.998, 0.010), # Rocket dry mass: 20.846 kg\n",
" # propulsion details\n",
" \"motor_structure_mass\": (1.848, 0.1),\n",
" \"burn_time\": (3.433, 0.1),\n",
Expand Down Expand Up @@ -222,7 +222,7 @@
" throat_radius=parameters.get(\"throat_radius\")[0],\n",
" interpolation_method=\"linear\",\n",
" nozzle_position=parameters.get(\"nozzle_position\")[0],\n",
" coordinate_system_orientation=\"combustion_chamber_to_nozzle\" #combustion_chamber_to_nozzle\"\n",
" coordinate_system_orientation=\"combustion_chamber_to_nozzle\", # combustion_chamber_to_nozzle\"\n",
")"
]
},
Expand Down Expand Up @@ -329,9 +329,7 @@
")\n",
"ndrt2020.set_rail_buttons(1.5, 2, 45)\n",
"\n",
"ndrt2020.add_motor(\n",
" motor=motor_l1395, position=parameters.get(\"motor_position\")[0]\n",
")"
"ndrt2020.add_motor(motor=motor_l1395, position=parameters.get(\"motor_position\")[0])"
]
},
{
Expand All @@ -358,7 +356,7 @@
"nose_cone = ndrt2020.add_nose(\n",
" length=parameters.get(\"nose_length\")[0],\n",
" kind=\"tangent\",\n",
" position=parameters.get(\"nose_position\")[0]\n",
" position=parameters.get(\"nose_position\")[0],\n",
")\n",
"fin_set = ndrt2020.add_trapezoidal_fins(\n",
" 4,\n",
Expand Down Expand Up @@ -700,7 +698,7 @@
" outputs=\"Altitude above ground level (m)\",\n",
" interpolation=\"linear\",\n",
" extrapolation=\"zero\",\n",
") # the division by 3.281 is to convert from feet to meters"
") # the division by 3.281 is to convert from feet to meters"
]
},
{
Expand Down Expand Up @@ -740,7 +738,7 @@
],
"source": [
"Function.compare_plots(\n",
" plot_list=[(actual_vz, \"Actual\"),(actual_vz_filtered, \"Filtered\")],\n",
" plot_list=[(actual_vz, \"Actual\"), (actual_vz_filtered, \"Filtered\")],\n",
" ylabel=\"Vertical velocity (m/s)\",\n",
" title=\"Vertical velocity\",\n",
" xlabel=\"Time (s)\",\n",
Expand Down Expand Up @@ -785,11 +783,11 @@
],
"source": [
"Function.compare_plots(\n",
" plot_list=[(actual_az, \"Actual\"),(actual_az_filtered, \"Filtered\")],\n",
" plot_list=[(actual_az, \"Actual\"), (actual_az_filtered, \"Filtered\")],\n",
" ylabel=\"Vertical acceleration (m/s^2)\",\n",
" title=\"Vertical acceleration\",\n",
" xlabel=\"Time (s)\",\n",
")\n"
")"
]
},
{
Expand Down
12 changes: 6 additions & 6 deletions docs/notebooks/air_brakes_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,14 @@
" altitude_ASL = state[2]\n",
" altitude_AGL = altitude_ASL - env.elevation\n",
" vx, vy, vz = state[3], state[4], state[5]\n",
" \n",
"\n",
" # Get winds in x and y directions\n",
" wind_x, wind_y = env.wind_velocity_x(altitude_ASL), env.wind_velocity_y(altitude_ASL)\n",
" \n",
" wind_x, wind_y = env.wind_velocity_x(altitude_ASL), env.wind_velocity_y(\n",
" altitude_ASL\n",
" )\n",
"\n",
" # Calculate Mach number\n",
" free_stream_speed = (\n",
" (wind_x - vx) ** 2 + (wind_y - vy) ** 2 + (vz) ** 2\n",
" ) ** 0.5\n",
" free_stream_speed = ((wind_x - vx) ** 2 + (wind_y - vy) ** 2 + (vz) ** 2) ** 0.5\n",
" mach_number = free_stream_speed / env.speed_of_sound(altitude_ASL)\n",
"\n",
" # Get previous state from state_history\n",
Expand Down
10 changes: 4 additions & 6 deletions docs/notebooks/compare_flights_usage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"env = Environment(latitude=-23, longitude=-49, date=after_tomorrow)\n",
"env.set_atmospheric_model(type=\"Forecast\", file=\"GFS\")\n",
"\n",
"Pro75M1670 = SolidMotor(\n",
"Pro75M1670 = SolidMotor(\n",
" thrust_source=\"../../data/motors/Cesaroni_M1670.eng\",\n",
" dry_mass=1.815,\n",
" dry_inertia=(0.125, 0.125, 0.002),\n",
Expand Down Expand Up @@ -109,9 +109,7 @@
"\n",
"calisto.add_motor(Pro75M1670, position=-1.255)\n",
"\n",
"nosecone = calisto.add_nose(\n",
" length=0.55829, kind=\"vonKarman\", position=1.278\n",
")\n",
"nosecone = calisto.add_nose(length=0.55829, kind=\"vonKarman\", position=1.278)\n",
"\n",
"fin_set = calisto.add_trapezoidal_fins(\n",
" n=4,\n",
Expand All @@ -120,7 +118,7 @@
" span=0.110,\n",
" position=-1.04956,\n",
" cant_angle=0.5,\n",
" airfoil=(\"../../data/calisto/NACA0012-radians.csv\",\"radians\"),\n",
" airfoil=(\"../../data/calisto/NACA0012-radians.csv\", \"radians\"),\n",
")\n",
"\n",
"tail = calisto.add_tail(\n",
Expand Down Expand Up @@ -194,7 +192,7 @@
" heading=heading,\n",
" name=f\"Incl {inclination} Head {heading}\",\n",
" )\n",
" flights.append(flight)\n"
" flights.append(flight)"
]
},
{
Expand Down
Loading
Loading