Skip to content

Updates master with develop before releasing v1.14.0 - #1194

Open
Gui-FernandesBR wants to merge 179 commits into
masterfrom
develop
Open

Gui-FernandesBR wants to merge 179 commits into
masterfrom
develop

Conversation

@Gui-FernandesBR

@Gui-FernandesBR Gui-FernandesBR commented Sep 14, 2026 •

Copy link
Copy Markdown
Member

It seems like we already have enough content to prepare a new release!
PRs #1187 and #1190 will also be included in this release.
All other PRs must wait for v1.15 or higher versions.

Issues closed by this release

Fixed on develop and labelled Awaiting release; merging this PR into master closes them.

Closes #28
Closes #340
Closes #411
Closes #437
Closes #520
Closes #524
Closes #545
Closes #604
Closes #654
Closes #767
Closes #780
Closes #953
Closes #954
Closes #963
Closes #1086
Closes #1091
Closes #1096
Closes #1106
Closes #1110
Closes #1145
Closes #1147
Closes #1151

Gui-FernandesBR and others added 30 commits July 21, 2026 21:35
CI: make changelog automation LLM-based (Gemini) and race-safe
* ENH: Resolve pressure_ISA discretization bounds TODO (#1056)

* TST: Fix test_flight and environment interpolation due to new ISA bounds

* MNT: self-document pressure_ISA bounds and strengthen discretization test

Derive the pressure_ISA discretization bounds from the standard-atmosphere
layer table (geopotential_height[0]/[-1]) instead of hardcoding -2000/80000,
and document why the grid is split around sea level. Strengthen the
discretization test with physical-sanity assertions (strictly increasing
altitude, strictly decreasing pressure, sea level sampled). No change in
numeric output.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* TST: update density doctest for new pressure_ISA discretization

The finer spline knots shift density at 1000 m by ~1e-4 (density at sea
level is unchanged since 0 m is still sampled exactly). Update the
calculate_density_profile doctest expected value accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* TST: relax noisy stream_velocity_z apogee tolerance

stream_velocity_z at apogee is a residual of the apogee-time estimation:
it is physically ~0 but swings by ~1e-4 m/s across platforms/NumPy
versions and atmosphere discretizations (e.g. -8.9e-8 on py3.10 with the
new ISA grid, -2.0e-4 with the old grid, +2.6e-4 on py3.14). The previous
atol=1e-5 was tighter than this numerical noise, making the assertion
flaky. Use atol=1e-3, which is physically negligible (vertical speed
peaks above 200 m/s) while still catching real regressions.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* STY: apply ruff markdown formatting to README code blocks

CI installs ruff unpinned; ruff 0.16 formats fenced Python blocks in
Markdown by default, so `ruff format --check .` now flags README.md on
every PR. Reformat the affected snippets (indentation, quotes, call
wrapping) to unblock the lint check. No semantic changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

* MNT: satisfy pylint on the pressure_ISA discretization changes

CI runs pylint unpinned; three messages were attributable to this PR:
- C0415 import-outside-toplevel: move the tools import to the test module
  top level.
- R0915 too-many-statements: keep the discretization block compact so
  pressure_ISA stays within the 25-statement limit.
- C0302 too-many-lines: the terser block keeps environment.py under the
  3050-line module limit.

np.append over two linspaces yields the same grid as the previous
np.concatenate, so all numeric results are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
* ENH: Add native Meteomatics API support to the Environment class

Adds a new "meteomatics" atmospheric model to Environment.set_atmospheric_model,
porting and generalizing the implementation from the EuRoC-Dev repository.

- fetchers.py: fetch_meteomatics_token + fetch_atmospheric_data_from_meteomatics
  authenticate with username/password (short-lived token), query temperature,
  pressure and wind components by height above ground level, grouping the
  parameters to respect the account's per-request limit.
- environment.py: process_meteomatics_atmosphere converts the height-AGL data to
  above-sea-level profiles using the Environment elevation; set_atmospheric_model
  gains username/password kwargs (falling back to METEOMATICS_USERNAME /
  METEOMATICS_PASSWORD env vars); save/load handles the new model type.
- Network requests use timeouts, do not retry deterministic 4xx failures, and
  surface actionable RuntimeError messages.
- Tests fully mock the API (no real requests, no charges); docs and changelog
  updated.

Closes #545

* MNT: simplify Meteomatics fetcher and profile assembly

Follow-up cleanups from the code review of the Meteomatics support:

- Collapse the duplicated request/error ladder of the login and data
  endpoints into a single `_meteomatics_request_json` helper.
- Have `_build_meteomatics_parameters` return a {parameter: (profile,
  height)} mapping so the response parser no longer regex-parses back
  the strings this module just built. Drops the regex constant and the
  variable-to-profile table.
- Generalize `to_profile_array` to several profiles at once, so the
  wind u/v grid intersection reuses it instead of repeating it inline.
- Reuse the existing `__validate_datetime` helper for the launch-date
  check, and simplify the model default to `model or "mix"`.
- Normalize `atmospheric_model_type` once in `from_dict`. The type is
  stored as the user spelled it, so the previously case-sensitive
  `match` and `== "ensemble"` branches silently dropped the ensemble
  arrays for an Environment built with `type="Ensemble"`.
- Trim the elevation warning and raise it before the API call, so it is
  shown even when the request later fails.

* MNT: address Meteomatics review comments

Two points raised in the PR review:

- `fetch_atmospheric_data_from_meteomatics` stamped the instant with a
  trailing "Z" without normalizing the timezone, so an aware datetime in
  a non-UTC zone was sent as the wrong instant. Aware datetimes are now
  converted to UTC; naive ones are documented as assumed UTC.
- Degenerate sampling arguments (`query_limit=0`, resolutions below 2)
  reached `range()`/`linspace()` and failed with an opaque low-level
  error after the login had already been paid for. They are now
  validated up front by `_validate_meteomatics_sampling`.
- `process_meteomatics_atmosphere` silently coerced any non-string model
  to "mix", hiding a mistake such as passing a Dataset or a path as
  `file` and querying the wrong model. It now accepts None (default) or
  a string, and raises otherwise.


* ENH: Refactor Meteomatics integration into MeteomaticsFetcher class and clean up environment method

* ENH: Decompose fetchers.py into rocketpy/environment/fetchers package with dedicated submodules
Both examples build a generator with np.random.default_rng(seed) and drop it,
then sample from the process-global np.random. reset_seed is a no-op, so a
sampler written by following this page ignores random_seed. The study runs and
the numbers look reasonable; only a second run with the same seed shows they
were never reproducible.

The bivariate generator needs two more things. It caches 1000 samples, so
reset_seed has to discard them or the first 1000 draws after a reseed still
come from the generator that was replaced. And its refill test compares
samples_generated against used_samples, which only becomes true after the
cache has run out, so a study longer than the cache silently got short lists:
sample(n_samples=1) returns [] at simulation 1001 and dict_generator raises
IndexError on [0].

Signed-off-by: thc1006 <[email protected]>
…1078) (#1084)

Isolates the three VTK/PyVista off-screen animation tests into their own workflow step so a native crash in one of them no longer kills the whole integration run, adds a bounded retry for the crash, forces Mesa software rendering on Linux, and sets fail-fast: false so one platform no longer cancels the rest of the matrix.

Closes #1078
…411) (#1085)

A motor whose thrust curve starts at t > 0 never left the rail: the rail phase's only time nodes were [t=0, max_time], so LSODA (max_step defaults to inf) took one huge step over the entire burn and the rocket never accelerated. __setup_phase_time_nodes now forces solver stops at ignition and burn-out when burn_start_time > 0, leaving ordinary motors byte-for-byte unchanged.

Also moves Codecov's coverage config out of .github/workflows/codecov.yml (where Actions was trying to execute it as a workflow, failing on every run) to .codecov.yml.

Closes #411
StochasticRocket.create_object built a Parachute from the full sampled draw, then discarded it and built a second one from six of its ten fields. radius, height, porosity and drag_coefficient never reached the rocket: the second Parachute re-derived radius from cd_s and the default drag coefficient, and height fell back to that radius. Attaching the sampled object itself fixes it and stops Parachute.__init__ running twice per parachute per simulation.

Breaking: radius and height feed the parachute added-mass term in flight.py, so descent dynamics and landing points change for any study whose parachute carries geometry.

Closes #1094
#1100)

* MNT: do not let one Python version cancel the other in the slow matrix

#1084 added fail-fast: false to the main test matrix while this was open, so
the only half left is the slow one. Same reason: 3.10 failing says nothing
about 3.14, so cancelling it costs a result and saves nothing worth having.

Signed-off-by: thc1006 <[email protected]>

* MNT: retry the VTK tests on SIGSEGV, not only on macOS SIGBUS

#1084 retries the animation tests when they die on 138, which is SIGBUS on
macOS. Counting the last 40 Tests runs, the crash was 139 eight times and 138
twice, so the common case fell straight through the retry. Linux SIGBUS is 135
rather than 138, so that missed as well.

Also sets fail-fast: false on the slow matrix, which #1084 left out. 3.10
failing says nothing about 3.14, so cancelling it costs a result and saves
nothing worth having.

Signed-off-by: thc1006 <[email protected]>

---------

Signed-off-by: thc1006 <[email protected]>
Co-authored-by: Gui-FernandesBR <[email protected]>
* ENH: Add Qodo PR-Agent workflow using Google Gemini

* FIX: point PR Agent workflow at the renamed action repo

Codium-ai/pr-agent-action no longer exists (the project moved to
the-pr-agent/pr-agent), which made the "Run PR Agent" check fail with
"Unable to resolve action". Updates the action reference, grants the
contents: write permission it now requires, and sets the Gemini key
via the GOOGLE_AI_STUDIO.GEMINI_API_KEY env var per the new action's docs.
* CI: build the docs for pull requests into develop as well

`branches` filters on a pull request's base, and almost every PR here is opened
against develop: 25 of the last 30, with 3 against master. So the build that
runs with -W --keep-going saw a docs change for the first time in a release
batch, well away from whatever caused it.

The path filter already keeps this off PRs that cannot affect the docs, and
`rocketpy/**` is in it because docstrings feed the autodoc reference, so a
docstring edit merged into develop could break the API pages unnoticed too.

`push` is left on master alone. The pull request check is where the feedback is
worth having, and running both would double the cost for a second opinion on
the same commit.

Signed-off-by: thc1006 <[email protected]>

* Apply suggestion from @Gui-FernandesBR

---------

Signed-off-by: thc1006 <[email protected]>
Co-authored-by: Gui-FernandesBR <[email protected]>
Every sampler on a model was reset with the model's seed, so two backed by
default_rng started from identical state and drew identical underlying values.
Not nearly identical, the same to every digit: two Gaussians with different
means and spreads both produced the deviate 0.466220770577340.

A study varying two parameters that way is varying one, and the correlation it
reports between them is an artefact of the seeding.

Each sampler now gets a child derived from the model's seed and the input's
name. Keyed by name rather than position so declaring another parameter does
not move the streams of the ones already there, and crc32 rather than hash
because hash is not stable across processes.

The documented wind X/Y wrappers are unaffected. Their correlation comes from
sharing one samples_list, not from sharing a seed, so handing them separate
children leaves it intact: measured 0.7010 against the covariance's 0.6981.

Signed-off-by: thc1006 <[email protected]>
Two problems with the first version of this, both found in review.

CRC32 is 32 bits, and a collision puts two samplers back on one stream, which
is the bug the keying exists to prevent. `wd4s4xka50` and `p56cjcee10` are both
valid identifiers with CRC32 1560575156, and both derived the same seed. The
name is length-prefixed into spawn-key words now, which no two names share, and
the child is kept at its full 128 bits to match the Monte Carlo seeding rather
than being cut to 64.

Samplers can also share one generator on purpose, as the documented wind pair
does, and each reset overwrites the last. With one seed per name, whichever was
reset last decided the stream, so the same seed meant different runs depending
on the order the model was declared in. Seeding is its own pass over sorted
names now.

The pass is separate from the validation loop deliberately. That loop's order
sets __dict__, and so the order every other input is drawn in, so sorting it
would have moved the samples of every model with a tuple in it.

Signed-off-by: thc1006 <[email protected]>
Two wrappers can share one generator on purpose, as the documented wind pair
do. One seed per name reset that generator once per wrapper, so every seed but
the last was discarded and the group's stream was decided by whichever member
sorted last. Adding a third wrapper to the same generator therefore moved the
first two, which name keying is meant to prevent.

CustomSampler gains a `seed_group` property, `self` by default, so a wrapper
can say which generator it shares. Members of a group are seeded once between
them, with the seed derived from all their names rather than from whichever
went last. The documented wind wrappers declare it.

Before, resetting six times for three wrappers and moving the pair when a third
arrived. After, once, and adding an independent sampler leaves the group where
it was.

Signed-off-by: thc1006 <[email protected]>
Only RuntimeError was caught, and the seed handed over is now 128 bits, which
the legacy numpy.random.RandomState refuses:

    ValueError: Seed must be between 0 and 2**32 - 1

Before this branch a sampler received the model's seed, usually a small int,
so RandomState took it. A sampler built on RandomState therefore breaks here,
and used to break with a bare ValueError that named nothing.

The seed stays 128 bits, since that is what keeps the streams apart and what
default_rng, the documented choice, takes. The error now says which input the
sampler belongs to and keeps the original as its cause.

Signed-off-by: thc1006 <[email protected]>
…discards

Three things from review, all small.

The documented bivariate generator filled a 1000-pair cache inside reset_seed.
With per-index seeding that reset happens once per simulation, so a study built
on this example generated a thousand pairs and used one, every time. 0.099 ms
each, about 10 s over 100k simulations. `top_up` already fills the shortfall on
first use, so the eager fill is gone and the cache starts empty.

The group reset went through the first member rather than the group, which
assumes every member resets identically and keeps nothing of its own. The group
holds the shared state, so it is reset directly when it knows how, and the
member is the fallback.

`_sampler_seed` now sorts the names itself. The caller does today, and a future
one that forgets would hand a single group two different seeds.

Signed-off-by: thc1006 <[email protected]>
Two rules the property invites breaking, both silent.

Identity has to be stable. Building the answer on each call, which returning
from a property makes easy, gives every member a different identity and puts
each back in a group of its own: a two-member group goes from one reset to two.

A group belongs to one model. Declaring the same generator on two models has
them both seed it, and the later one wins, which is the overwrite the grouping
exists to prevent.

The documented wind pair already returns a stored attribute, so the example
teaches the stable form.

Signed-off-by: thc1006 <[email protected]>
The automation that normally writes it cannot run on a pull request from a
fork, which is #1101, so this one is by hand.

It is a breaking change and the entry says so: fixed-seed CustomSampler
baselines move, and a sampler built on the legacy RandomState has to move to
default_rng because the seed it now receives is 128 bits wide.

Signed-off-by: thc1006 <[email protected]>
`scipy>=1.0` is not true. `monte_carlo.py` imports `scipy.stats.bootstrap` at
module level, and the SciPy 1.7.0 release notes are where that arrives, so
anything from 1.0 to 1.6 satisfies the floor and then fails on `import
rocketpy`.

`numpy>=1.13` is not true either, and the binding constraint turned out to be a
sibling rather than NumPy itself: `matplotlib>=3.9.0` requires `numpy>=1.23`.
SciPy then has to be new enough to allow that, and 1.7.2 caps NumPy at
`<1.23.0`, so 1.8 is the first that composes.

Verified rather than reasoned. On Python 3.10 with numpy 1.23.0 and scipy
1.8.0 pinned and everything else current, `import rocketpy` works and
`tests/unit/simulation` with `tests/unit/stochastic` is 162 passed, 5 skipped.
At numpy 1.21.3, which is where NumPy's own cp310 wheels start, matplotlib
refuses to import.

Signed-off-by: thc1006 <[email protected]>
…1103)

* BUG: accept the callable parachute triggers the docstring promises

The `or` sat inside the isinstance call rather than beside it:

    isinstance(member, (str, int, float) or callable(member))

A non-empty type tuple is truthy, so the expression short-circuited to the
tuple and callable(member) was never evaluated. The check reduced to
isinstance(member, (str, int, float)), and a callable is none of those.

Parachute takes a callable trigger and Flight calls it, and the docstring three
lines above says "a list of callables, string 'apogee' or ints/floats". Only
the stochastic wrapper refused one. The two non-callable forms passed
throughout, which is why the tests never caught it.

Left as an assert to match the other fourteen in these two modules, and because
raising a different type would break anyone catching AssertionError.

Signed-off-by: thc1006 <[email protected]>

* BUG: refuse the trigger forms Parachute cannot use

Moving the `or` let callables through, but left four things the check should
never have accepted.

`["banana"]` passed here and then `Parachute` raised ValueError, so the wrapper
only moved the failure to create time. `[True]` is worse: bool is an int, so it
went through as a height of one metre. `[]` passed because `all([])` is True.
And `numbers.Real` replaces `(int, float)`, which took numpy.float64 because it
subclasses float and refused numpy.int64 because it subclasses neither.

The check is raised rather than asserted. `python -O` strips an assert outright,
and this is the only thing between those triggers and a Parachute that either
refuses them later or misreads them. Still an AssertionError, so nothing that
catches it has to change.

The docstring claimed a tuple form that was never implemented; it now describes
what the code does.

Signed-off-by: thc1006 <[email protected]>

* BUG: do not accept numpy integers the Parachute will refuse

Widening the height check to numbers.Real was the same mistake as accepting
"banana": Parachute checks isinstance(trigger, (int, float)), so numpy.float64
passes because it subclasses float and numpy.int64 raises ValueError because it
subclasses neither. Letting them through here only moved the failure to
create_object.

Back to (int, float), matching that check rather than improving on it, and the
test that asserted numpy.int64 was accepted now asserts both ends refuse it.

The asymmetry is Parachute's rather than this wrapper's and is worth fixing
there, where widening the check would not strand anything downstream.

Signed-off-by: thc1006 <[email protected]>

* TST: use the state length Flight actually passes

The trigger tests built a 14-element state. Flight passes 13:
x y z vx vy vz e0 e1 e2 e3 wx wy wz. Only y[5] is read, so both worked, but
the test is there to document the contract and was documenting it wrongly.

Signed-off-by: thc1006 <[email protected]>

* DOC: add the changelog entry for this branch

By hand, because the automation cannot run on a pull request from a fork
(#1101).

No documented API breaks, but the observable behaviour does: an invalid string,
an empty list or a boolean trigger now fails during StochasticParachute
validation rather than later in Parachute construction, or silently becoming a
one-metre height trigger.

Signed-off-by: thc1006 <[email protected]>

---------

Signed-off-by: thc1006 <[email protected]>
BUG: give each CustomSampler its own stream instead of the model's seed

Every CustomSampler on a model was reset with the model's own seed, so two
samplers backed by default_rng started from the same state and drew the same
underlying deviate. Each input now gets a stream keyed by its name, and
samplers that share one generator declare a seed_group so the group is seeded
once between them.

Merged manually rather than through the button: the CHANGELOG conflicted with
#1103, and the resolution keeps both entries.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
* ENH: Add opening shock force estimation to Parachute class (#1050)

Adds an opening_shock_coefficient parameter and a
calculate_opening_shock_force method to estimate the peak transient
force during parachute inflation, following the simplified model in
Knacke's Parachute Recovery Systems Design Manual (1992, Section 5.5).

Closes #161

Co-authored-by: ArthurJWH <[email protected]>

* ENH: Moving opening shock force function to utilities

* DOC: Updated the CHANGELOG

* DOC: Removed cross-reference from previous Parachute method

---------

Co-authored-by: Matanski <[email protected]>
#1104 and #1108 both came from a fork, so `Populate Changelog` failed on
`RELEASE_TOKEN` being withheld and neither got an entry. #1101 tracks the
workflow bug; these two lines are the entries it would have written.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Gui's point on the review. `python -O` strips an assert, and this is what keeps
a non-sampler out of the model, so it has to be a raise. Same shape as #1103,
which took the identical route for the parachute triggers.

AssertionError is kept rather than swapped for TypeError, because the docstring
on develop already documents it and a caller catching it should keep working.

Two tests. One is the behaviour; the other runs a child interpreter under -O,
since that is the mechanism and the plain test passes either way.

Note this module carries thirteen more asserts on develop, none of them mine.
Happy to send them separately if you want the same treatment there.

Signed-off-by: thc1006 <[email protected]>
`stochastic_model.py` has carried this as a TODO:

    # TODO: Stop using assert in production code. Use exceptions instead.

The reason it matters is that the optimiser removes them, so the checks stop
running and malformed input reaches the model:

    StochasticModel(obj, mass=("not a number", 0.5))

    python      AssertionError
    python -O   accepted, mass = ('not a number', 0.5, <Generator.normal>)

That model then fails somewhere later with something that does not point back
at the tuple that caused it.

Twenty one of them, all in stochastic/: thirteen in stochastic_model.py, three
each in stochastic_environment.py and stochastic_flight.py, one in
stochastic_aero_surfaces.py, and the one in stochastic_parachute.py that #1103
did not reach. Converted mechanically through the AST, so the condition and the
message are the ones that were there.

AssertionError is kept rather than swapped for TypeError or ValueError. The
docstrings document it, and callers catching it should keep working. Changing
the type is a separate decision from making the check run at all.

Two kinds of test. One reads each module and fails on a reintroduced `assert`,
which is the mechanism. The other runs a child interpreter under -O, because in
process the assert is still compiled in and the check would pass either way.

Also moves two imports in test_custom_sampler.py to the top of the file, which
pylint flags as C0415 on develop today.

Signed-off-by: thc1006 <[email protected]>
Gui-FernandesBR and others added 14 commits November 21, 2026 16:17
…urly

MNT: make the Open-Meteo hourly variables builder private
A PointMassMotor, a PointMassRocket and a flight of them could be saved
but not loaded:

- PointMassMotor had no from_dict, so it was rebuilt from arguments its
  constructor does not take, and its propellant masses were not saved.
- Rocket.from_dict built the rocket with arguments PointMassRocket does
  not accept (inertia, coordinate_system_orientation).
- weathercock_coeff was not saved.

The constructor call of Rocket.from_dict is now its own method, which
PointMassRocket overrides.

Co-authored-by: Claude Fable 5.2 <[email protected]>
The stochastic validators raised AssertionError for every bad input, which
says nothing about whether the type or the value was wrong. They now raise
StochasticTypeError or StochasticValueError from rocketpy.exceptions, which
are also TypeError/ValueError and still AssertionError, so existing
`except AssertionError` code keeps working. Messages are unchanged.

Related to #1209.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq
Wrong types in the positive-int list, ensemble members and parachute
trigger now raise StochasticTypeError, and an empty trigger list raises
StochasticValueError. The last plain TypeErrors in StochasticRocket and
StochasticFlight become StochasticTypeError, and the tests assert the
specific class for each of these sites.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XDW577mr8JSrJHguXrmXzw
MNT: raise typed stochastic exceptions instead of bare AssertionError
…gravity-1216-af00

BUG: compute Flight.potential_energy from Environment.gravity
* ENH: create custom ensembles without a file and without a date

- `Environment.create_ensemble` keeps the ensemble in memory by default.
  A file is only written when `file_name` is given.
- An ensemble created from profiles has no date: the Environment does not
  need one, and a saved ensemble loads for any launch date. Ensemble files
  from elsewhere still check the launch date.
- `set_date` and `set_location` leave such an ensemble as it is, and the
  prints skip its time period.

Co-Authored-By: Claude Fable 5.2 <[email protected]>

* DOC: update the custom ensemble guide

Co-Authored-By: Claude Fable 5.2 <[email protected]>

* BUG: give each in-memory ensemble dataset its own name

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* BUG: close the ensemble file when the launch date is missing

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* DOC: describe the pressure range and the attributes of profile ensembles

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* ENH: leave the model grid out of the prints of profile ensembles

Also add docstrings and Arrange/Act/Assert comments to the profile
ensemble tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Fable 5.2 <[email protected]>
* DOC: add notes on the inputs of the drag coefficient models

- alpha and beta are separate signed angles, to be combined for the total
  angle of attack. The example now uses both.
- The Reynolds number uses the rocket diameter as reference length.
- A drag CSV with a missing combination loads, but interpolates differently.

Co-Authored-By: Claude Fable 5.2 <[email protected]>

* DOC: clarify the angles, the Reynolds length and the grid of drag inputs

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* DOC: say the drag model takes the angles in radians, not in degrees

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Fable 5.2 <[email protected]>
…che (#1219)

* REV: revert the atmosphere disk cache of #1137

This reverts 88aed5a ("ENH: cache downloaded atmosphere netCDF datasets
(#654) (#1137)"): atmosphere_cache.py, its tests, the cache code in
environment.py and the no_cache parameter of set_atmospheric_model.

The cache judged a saved forecast by its age alone (6 hours for every
model), was on by default, wrote to the home folder and said nothing when
it was used. The next commit replaces it.

The pylint comment moves that came with #1137 in motor.py, sensor.py,
monte_carlo.py and test_plots.py are kept as they are.

Co-Authored-By: Claude Fable 5.2 <[email protected]>

* ENH: reuse a forecast in memory while its model run is current

Within one Python session, a forecast downloaded with one of the latest
forecast shortcuts (GFS, NAM, RAP, HRRR, AIGFS) is kept in memory. When
the same model, place and launch time are asked for again, the server is
asked which model run supplies the launch time, and the data is downloaded
again only if that run changed.

- The server is always contacted. If it cannot be reached the request
  fails as before, so a forecast that cannot be confirmed as current is
  never used.
- Nothing is written to disk and there is no new parameter.
- A reused Environment gets its own copies of the results.

The gain is small: on GFS a repeated request takes about 2.3 s in place
of about 6.5 s, since the check with the server remains.

Co-Authored-By: Claude Fable 5.2 <[email protected]>

* BUG: fix the forecast reuse problems found in review

- Windy without a model uses its default again.
- A forecast is identified by its model run and by the first and last
  times of the dataset, and a launch time outside them is never reused.
- The elevation given by the user is not part of the request.
- The attributes kept for reuse are listed, not found by comparing objects.
- A model run that cannot be read means the forecast is processed again.
- The wind heading and direction are rebuilt on a reuse, so they read the
  Environment's own data.
- The 100 most recent forecasts are kept.
- The reuse tests read small GFS-shaped netCDF files with the real
  processing.

Co-Authored-By: Claude Fable 5.2 <[email protected]>

* DOC: say why forecasts are kept in memory and how many

Co-Authored-By: Claude Fable 5.2 <[email protected]>

* TST: split the helper that writes the forecast test files

Pylint counted too many statements in it.

Co-Authored-By: Claude Fable 5.2 <[email protected]>

* ENH: add an opt-in disk cache for forecasts and reanalysis

set_atmospheric_model(..., cache=True) saves the latest forecast shortcuts
and reanalysis given by a web address in the system cache folder
(platformdirs). A saved forecast is used while its model run is still the
latest one, or with a warning when the server cannot be reached; a saved
reanalysis is always used. A warning is given on every use of saved data,
and forecasts saved more than 7 days ago are deleted. The files are JSON.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Fable 5.2 <[email protected]>
* MNT: make the parachute noise seed private

Parachute no longer takes a public seed. StochasticParachute and from_dict set it through _set_noise_seed, which also redraws the first noise sample so the sequence is unchanged. to_dict still writes the seed, and from_dict still loads dicts without one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq

* BUG: cut the parachute noise seed to 63 bits so pandas reads the inputs

Each Monte Carlo input row records every parachute's noise seed, and it
was 128 bits, so pandas.read_json failed with "Value is too big!", the
same failure #1213 fixed for the study seed. The test now runs a real
study and reads its input file with pandas, which covers both seeds.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XDW574yAS8aQWohX238Bwc

* MNT: record a copy of the parachute draw and tidy the noise seed tests

StochasticParachute records the drawn dict plus the noise seed instead
of writing the seed in and deleting it again. The first noise sample now
reads the same bias and deviation as the rest of the chain. The test
that rejects seed= checks the message, and a dead pylint disable goes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XDW574yAS8aQWohX238Bwc

* TST: derive the expected parachute noise instead of pinning its floats

The test keeps the pinned noise seeds and rebuilds the AR(1) chain from
a fresh generator, so a NumPy release that changes its normal stream no
longer fails it while the seeding code is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XDW574yAS8aQWohX238Bwc

* DOC: say how parachute pressure noise can be reproduced

With the public seed gone and numpy.random.seed no longer reaching the
noise, the noise docstring now says it is reproducible only through the
seed a Monte Carlo run records, or from_dict on a dict that carries one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XDW574yAS8aQWohX238Bwc

* STY: drop the io import the seeding test no longer uses

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XDW574yAS8aQWohX238Bwc

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
* ENH: warn when a drag CSV does not form a regular grid

Fall back from regular-grid interpolation still loads the table, but now
emits a UserWarning so a missing combination, duplicate row, or split
float does not silently change drag between tabulated points.

Co-authored-by: Charles <[email protected]>

* DOC: say RocketPy warns on irregular drag CSVs

PR #1232 documented that a non-grid table still loads and no warning
is given. This branch now warns, so the note matches that behavior.

Co-authored-by: Charles <[email protected]>

* ENH: point the irregular drag CSV warning at Rocket()

Raise stacklevel from 2 to 4 so the warning names the caller's
Rocket(...) line, and include the drag file path in the message.

Co-authored-by: Charles <[email protected]>

* fix(tests): platform-safe drag CSV warning path assertion for Windows CI

Rocket warns with file_path!r, so backslashes differ from str(Path) on Windows.
Check filename plus native or repr path in the warning message. Unblocks PR 1239.

Co-authored-by: Charles <[email protected]>

---------

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Charles <[email protected]>
)

Each member drops the pressure levels that come back empty. The members
were then cut to the same length by position and given one shared list
of pressures, so two members missing different levels ended up with rows
labelled with the wrong pressure. Keep only the levels every member has,
picked by pressure, and raise when fewer than two are shared.

Co-authored-by: Claude Fable 5.2 <[email protected]>
* DOC: backfill the v1.14.0 changelog

The changelog automation has not run since #1112, so the PRs merged into develop after it were missing from [Unreleased]. Add them, add the entries for #1225, #1226 and #1227, update the tip-off, tube-fins and parachute-seed entries to what the release ships, and drop the raw commit link, the back-merge entry and the duplicate StochasticFreeFormFins entry.

Related to #1209

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq

* DOC: add a Breaking changes section to the v1.14.0 changelog

List what changes for a v1.13.0 user: Monte Carlo seeding and numbering, the deprecated static_margin assignment, the parachute trigger ValueError on the rail, the shifted flight results, and the sensor default temperature.

Related to #1209

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XDW575d9C9zpS7Z1v2KXVq

* DOC: bring the v1.14.0 changelog up to date with develop

Describe the forecast reuse and the opt-in disk cache that replaced the
first cache (#1219), and add the PRs merged after the backfill: #1221,
#1222, #1223, #1224, #1231, #1232, #1234, #1239 and #1242.

Co-Authored-By: Claude Fable 5.2 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: MateusStano <[email protected]>
@MateusStano
MateusStano marked this pull request as ready for review November 28, 2026 20:57
@MateusStano
MateusStano requested a review from a team as a code owner November 28, 2026 20:57
Comment thread rocketpy/rocket/parachute.py Resolved
Comment thread rocketpy/sensors/accelerometer.py Resolved
@MateusStano MateusStano mentioned this pull request Nov 28, 2026
8 tasks done
* MNT: drop the deprecated static_margin setter

The static margin is computed from the rocket, and assigning it was never
documented. Assigning it raises AttributeError again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* MNT: simplify the sensor seed check

Replace the seed type alias, its two helpers and the type hints with one check
that rejects random generator objects, and shorten the comments, the error
message and the seed docstrings. NumPy rejects any other invalid seed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* MNT: clean up the tip-off and energy code in Flight

- The out_of_rail_* docstrings say the upper rail button leaves the rail.
- Remove Flight.attitude_unit; udot_rail2 computes the rail direction.
- Remove _gravitational_potential_per_mass; potential_energy integrates
  Environment.gravity with Function.integral.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* MNT: let Parachute alone decide what a valid trigger is

Inline the height trigger check in Parachute, and have StochasticParachute
build a Parachute for each trigger member instead of restating the rules.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* DOC: list the current required packages on the installation page

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* MNT: install contextily on Python 3.14 too

rasterio, which contextily needs, now ships Python 3.14 wheels for Linux,
macOS and Windows, so the background map of the Monte Carlo plots no longer
needs to be skipped there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* MNT: keep the static_margin setter and address review nits

Put back the deprecated Rocket.static_margin setter from #1225, so the
assignment keeps working with a DeprecationWarning for one more release.
Reword the callable-gravity potential energy test, add a NaN altitude test
for potential_energy, and match NumPy's message in the sensor seed tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* TST: check the gravity integral at a NaN altitude

The previous test built potential_energy from a NaN altitude, which raises
in the mass product on develop as well. Test the per-node integral that
potential_energy relies on instead, for array and callable gravity.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
@MateusStano MateusStano mentioned this pull request Nov 29, 2026
2 tasks done
phmbressan
phmbressan previously approved these changes Nov 29, 2026
MateusStano
MateusStano previously approved these changes Nov 29, 2026
…1246)

* BUG: raise a clear error for the discontinued NAM forecast shortcut

UCAR THREDDS stopped publishing NAM on 2026-11-03, so file="NAM" loaded a
stale dataset and failed with "Chosen launch time is not available". It now
raises a ValueError that points to HRRR, RAP or GFS, like HIRESW and GEFS.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XDW574tsj2yzaQ2JFZusEw

* DOC: stop executing the NAM forecast example

The forecast page ran file="NAM" at build time, which has failed every
Read the Docs build of develop since UCAR stopped publishing NAM.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XDW574tsj2yzaQ2JFZusEw

* DOC: add the NAM shortcut change to the v1.14.0 changelog

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XDW574tsj2yzaQ2JFZusEw

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment