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

ENH: Exponential backoff retry strategy #449

Closed
Gui-FernandesBR opened this issue Oct 30, 2023 · 4 comments · Fixed by #588
Closed

ENH: Exponential backoff retry strategy #449

Gui-FernandesBR opened this issue Oct 30, 2023 · 4 comments · Fixed by #588
Assignees
Labels
Enhancement New feature or request, including adjustments in current codes Environment Enviroment Class related features Good first issue Good for newcomers

Comments

@Gui-FernandesBR
Copy link
Member

Is your feature request related to a problem? Please describe.

Currently the Environment class practices a bad retry by iterating inside a while loop to catch API response within a certain number of maximum attempts. This can be problematic because the user can get blocked by the server or the API may not have enough time to process the new request after . A good standard is to apply exponential backoff, meaning that the execution will give longer pauses as the number of attempts increases.

  • Dedicated python libraries may be considered. I'm leaving here two alternatives: https://pypi.org/project/backoff/ and https://stackoverflow.com/a/35636367/19971645
  • I'm not against being a bit more verbose with those API recalls. I'd like to know what is happening when trying to retrieve data from te different APIs
  • Implementing such features would let the code safer and more reliable.
  • I found 6 occurrences of such problem within the Environment class.

Additional context

@Gui-FernandesBR Gui-FernandesBR added Enhancement New feature or request, including adjustments in current codes Environment Enviroment Class related features labels Oct 30, 2023
@Gui-FernandesBR Gui-FernandesBR added this to the Release v1.X.0 milestone Oct 30, 2023
@Gui-FernandesBR Gui-FernandesBR added the Good first issue Good for newcomers label Dec 19, 2023
@Gui-FernandesBR
Copy link
Member Author

Gui-FernandesBR commented Jan 25, 2024

I see two options for us:

  1. Start using a dedicated library to apply backoff retry in our requests
    • This is good because it let the code more compact, which is usually better for reading the code and also maintenance.
    • A useful library that could be used is: https://github.com/litl/backoff, however, it seems like the library hasn't been updated lately, so that's risky. Still we can see more than 27k applications using it, that's impressive.
  2. Do the backoff by using for loops, in a pure python implementation
    • This might require more code line from us.
    • This doesn't generate a new dependency so it is easier to debug in case of things go wrong, but yet the code is larger.

Further discussions are welcome here.

EDIT: actually, I just thought about something here... We could also create our own @backoff decorator.

@Gui-FernandesBR Gui-FernandesBR self-assigned this Jan 25, 2024
@lucasfourier
Copy link
Collaborator

I was messing around with some tests in the environment class and i think the best option might be to just use some custom Python code. For instance, consider this integration test:

image

Maybe one could substitute 'time.sleep(1)' by 'time.sleep(i)' or 'time.sleep(2*i)', which would result in a linear backoff retry strategy and could possibly work.

Is that too naive? It was however the first thing that came to my mind.

@lucasfourier
Copy link
Collaborator

@Gui-FernandesBR What do you think?

@Gui-FernandesBR
Copy link
Member Author

I was messing around with some tests in the environment class and i think the best option might be to just use some custom Python code. For instance, consider this integration test:

image

Maybe one could substitute 'time.sleep(1)' by 'time.sleep(i)' or 'time.sleep(2*i)', which would result in a linear backoff retry strategy and could possibly work.

Is that too naive? It was however the first thing that came to my mind.

This suggestion is good but only solves the tests functions. The requested solution was to deal with the exponential backoff directly inside the Environment class.

I proposed a solution in the last PR, #588

Gui-FernandesBR added a commit that referenced this issue Apr 25, 2024
…corator

ENH: Exponential backoff decorator (fix #449)
MateusStano added a commit that referenced this issue May 1, 2024
commit b18ae9c
Merge: 67515f6 9a8e0c1
Author: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Date:   Thu Apr 25 18:15:24 2024 -0400

    Merge branch 'develop' into bug/airbrakes-postprocess

commit 67515f6
Author: MateusStano <mateusstano@usp.br>
Date:   Thu Apr 25 23:02:11 2024 +0200

    ENH: automatically disable time overshoot for controllers

commit f60c53b
Merge: 4974e8d 3df7586
Author: MateusStano <mateusstano@usp.br>
Date:   Thu Apr 25 22:53:10 2024 +0200

    Merge branch 'bug/airbrakes-postprocess' of https://github.com/RocketPy-Team/RocketPy into bug/airbrakes-postprocess

commit 4974e8d
Author: MateusStano <mateusstano@usp.br>
Date:   Thu Apr 25 22:52:48 2024 +0200

    BUG: initialize state derivatives for controllers

commit a49baf4
Author: MateusStano <mateusstano@usp.br>
Date:   Thu Apr 25 22:52:13 2024 +0200

    MNT: move controller initialization to private method

commit 9a8e0c1
Merge: 14375ed 2cbaa77
Author: MateusStano <69485049+MateusStano@users.noreply.github.com>
Date:   Thu Apr 25 15:37:05 2024 -0300

    Merge pull request #580 from RocketPy-Team/mnt/modularize-rocket-draw

    MNT: Modularize Rocket Draw

commit 2cbaa77
Merge: 822a89e 14375ed
Author: MateusStano <69485049+MateusStano@users.noreply.github.com>
Date:   Thu Apr 25 11:44:22 2024 -0300

    Merge branch 'develop' into mnt/modularize-rocket-draw

commit 3df7586
Merge: bf8c68b 14375ed
Author: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Date:   Thu Apr 25 06:49:58 2024 -0400

    Merge branch 'develop' into bug/airbrakes-postprocess

commit 14375ed
Merge: c31c6f8 b899064
Author: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Date:   Thu Apr 25 06:47:36 2024 -0400

    Merge pull request #588 from RocketPy-Team/enh/exponential-backoff-decorator

    ENH: Exponential backoff decorator (fix #449)

commit c31c6f8
Merge: a011c5a 684b997
Author: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Date:   Thu Apr 25 06:45:26 2024 -0400

    Merge pull request #587 from RocketPy-Team/mnt/delete-cached-property

    DEP: delete deprecated rocketpy.tools.cached_property

commit b899064
Author: Gui-FernandesBR <guilherme_fernandes@usp.br>
Date:   Fri Apr 19 12:13:23 2024 -0400

    DEV: adds PR 588 to the CHANGELOG

commit a8a185e
Author: Gui-FernandesBR <guilherme_fernandes@usp.br>
Date:   Fri Apr 19 12:08:58 2024 -0400

    TST: Fix tests with Environment class after exponential_backoff decorator was used

commit d0fbcd7
Author: Gui-FernandesBR <guilherme_fernandes@usp.br>
Date:   Fri Apr 19 12:07:45 2024 -0400

    MNT: Refactor code to use the exponential_backoff decorator

commit ccd78af
Author: Gui-FernandesBR <guilherme_fernandes@usp.br>
Date:   Fri Apr 19 12:07:17 2024 -0400

    ENH: Add exponential backoff decorator to tools.py

commit 684b997
Author: Gui-FernandesBR <guilherme_fernandes@usp.br>
Date:   Thu Apr 18 21:47:19 2024 -0400

    DEV: Adds PR 587 to the CHANGELOG.md

commit bb0f46a
Author: Gui-FernandesBR <guilherme_fernandes@usp.br>
Date:   Thu Apr 18 21:41:38 2024 -0400

    MNT: refactors cached_property imports

commit afb3b32
Author: dyu056 <yudaniel888@hotmail.com>
Date:   Fri Jan 26 00:35:36 2024 +1300

    Completed changes

commit bf8c68b
Merge: aaa3f7b a011c5a
Author: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Date:   Thu Apr 18 21:17:06 2024 -0400

    Merge branch 'develop' into bug/airbrakes-postprocess

commit a011c5a
Merge: 624cc15 6b26f61
Author: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Date:   Thu Apr 18 15:12:40 2024 -0400

    Merge pull request #585 from RocketPy-Team/enh/swap-diff-for-flow-rate

    BUG: Swap `rocket.total_mass.differentiate` for `motor.total_mass_flow rate`

commit 6b26f61
Author: MateusStano <mateusstano@usp.br>
Date:   Wed Apr 17 22:19:16 2024 +0200

    DEV: changelog

commit 8ee2c95
Author: MateusStano <mateusstano@usp.br>
Date:   Wed Apr 17 22:16:59 2024 +0200

    ENH: create rocket total_mass_flow_rate attribute

commit aaa3f7b
Author: MateusStano <mateusstano@usp.br>
Date:   Mon Apr 15 16:52:49 2024 +0200

    DOCS: change accelerations names in docs

commit 7fe3d0b
Author: MateusStano <mateusstano@usp.br>
Date:   Mon Apr 15 16:12:39 2024 +0200

    ENH: optmize post process loop

commit a66fc53
Author: MateusStano <mateusstano@usp.br>
Date:   Mon Apr 15 15:18:37 2024 +0200

    ENH: add reset function

commit b9a97a4
Author: MateusStano <mateusstano@usp.br>
Date:   Mon Apr 15 15:06:01 2024 +0200

    ENH: add warning for improper time_overshoot

commit 830ea15
Author: MateusStano <mateusstano@usp.br>
Date:   Mon Apr 15 15:05:31 2024 +0200

    ENH: refactor retrieve arrays cached properties and controller sim post processing

commit e2a94c8
Author: MateusStano <mateusstano@usp.br>
Date:   Tue Apr 9 18:03:08 2024 +0200

    TST: fix tests

commit e5c7533
Author: MateusStano <mateusstano@usp.br>
Date:   Tue Apr 9 17:59:22 2024 +0200

    ENH: use mass_flow_rate instead of differentiate

commit 822a89e
Merge: e3e1a59 624cc15
Author: MateusStano <69485049+MateusStano@users.noreply.github.com>
Date:   Sun Apr 7 13:52:02 2024 +0200

    Merge branch 'develop' into mnt/modularize-rocket-draw

commit e3e1a59
Author: MateusStano <69485049+MateusStano@users.noreply.github.com>
Date:   Thu Apr 4 14:53:37 2024 +0200

    DEV: fix changelog order

commit 624cc15
Merge: 0a4d89b 61bf4d7
Author: Pedro Henrique Marinho Bressan <87212571+phmbressan@users.noreply.github.com>
Date:   Tue Apr 2 14:23:05 2024 -0300

    Merge pull request #565 from RocketPy-Team/doc/environment-docstring

    DOC: Improvements of Environment docstring phrasing.

commit 61bf4d7
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Mon Apr 1 15:00:10 2024 -0300

    MNT: add docs change to CHANGELOG.

commit 9c1a461
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Mon Apr 1 14:47:03 2024 -0300

    DOC: fix typing issues regarding Environment docs.

commit 4776208
Author: Pedro Henrique Marinho Bressan <87212571+phmbressan@users.noreply.github.com>
Date:   Fri Mar 29 08:47:18 2024 -0300

    DOC: Update Longitude value ranges.

    Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

commit 32a28c1
Merge: 27dd73d 0a4d89b
Author: Pedro Henrique Marinho Bressan <87212571+phmbressan@users.noreply.github.com>
Date:   Thu Mar 28 18:26:46 2024 -0300

    Merge branch 'develop' into doc/environment-docstring

commit 27dd73d
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Thu Mar 28 18:24:23 2024 -0300

    DOC: standardize grammar on time zones.

commit 4b42c9e
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Thu Mar 28 18:20:01 2024 -0300

    DOC: clarify timezones and dates Environment docs.

commit 95b61ef
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Thu Mar 28 16:38:17 2024 -0300

    DOC: specify latitude and longitude defaults.

commit 6b84c03
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Mon Mar 25 19:53:37 2024 -0300

    DOC: improve wording of Environment init.

    Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

commit 826efcc
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Sun Mar 24 16:47:14 2024 -0300

    DOC: specify datum as optional.

commit a2aa714
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Sun Mar 24 16:41:39 2024 -0300

    DOC: add examples and improvements to Environment gravity docstring.

commit 51bdd91
Author: MateusStano <mateusstano@usp.br>
Date:   Sun Mar 24 15:14:45 2024 +0100

    MNT: changelog

commit 6805e32
Author: MateusStano <mateusstano@usp.br>
Date:   Sun Mar 24 14:05:00 2024 +0100

    MNT: refactor rocket drawing plot methods

commit 3cc91e7
Merge: f637a9d 65b3315
Author: Pedro Henrique Marinho Bressan <87212571+phmbressan@users.noreply.github.com>
Date:   Thu Feb 29 20:06:09 2024 -0300

    Merge branch 'develop' into doc/environment-docstring

commit f637a9d
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Thu Feb 29 17:49:38 2024 -0300

    STY: run black for code linting.

commit 9198ac7
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Thu Feb 29 17:46:23 2024 -0300

    DOC: phrasing improvements of Environment docstring.
Gui-FernandesBR added a commit that referenced this issue Sep 12, 2024
* ENH: sensors class

* ENH: add accelerometer and gyroscope classes

* ENH: euler to quaternions tool function

* ENH: add sensors to other classes

* ENH: prints and sensors draw

* ENH: add sensors to parachutes

* TST: add sensors fixtures

* TST: add sensors tests

* DEV: sensors testing notebook

* ENH: add option to add noise to each axis seperatly

* MNT: run isort

* ENH: calculate u_dot only once for all sensors

* MNT: change `measured_values` to `measured_data`

* TST: unite gyro and accel tests

* Update rocketpy/plots/rocket_plots.py

Co-authored-by: Pedro Henrique Marinho Bressan <87212571+phmbressan@users.noreply.github.com>

* ENH: normalize quaternions for transform matrix

* TST: lower tolerances

* BUG: handle zero norm differently due to numpy.float64

* MNT: quantization typos

* DOCS: mention Hadamard product

* DOC: complete sensors class docstrings

* Squashed commit of the following:

commit b18ae9c
Merge: 67515f6 9a8e0c1
Author: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Date:   Thu Apr 25 18:15:24 2024 -0400

    Merge branch 'develop' into bug/airbrakes-postprocess

commit 67515f6
Author: MateusStano <mateusstano@usp.br>
Date:   Thu Apr 25 23:02:11 2024 +0200

    ENH: automatically disable time overshoot for controllers

commit f60c53b
Merge: 4974e8d 3df7586
Author: MateusStano <mateusstano@usp.br>
Date:   Thu Apr 25 22:53:10 2024 +0200

    Merge branch 'bug/airbrakes-postprocess' of https://github.com/RocketPy-Team/RocketPy into bug/airbrakes-postprocess

commit 4974e8d
Author: MateusStano <mateusstano@usp.br>
Date:   Thu Apr 25 22:52:48 2024 +0200

    BUG: initialize state derivatives for controllers

commit a49baf4
Author: MateusStano <mateusstano@usp.br>
Date:   Thu Apr 25 22:52:13 2024 +0200

    MNT: move controller initialization to private method

commit 9a8e0c1
Merge: 14375ed 2cbaa77
Author: MateusStano <69485049+MateusStano@users.noreply.github.com>
Date:   Thu Apr 25 15:37:05 2024 -0300

    Merge pull request #580 from RocketPy-Team/mnt/modularize-rocket-draw

    MNT: Modularize Rocket Draw

commit 2cbaa77
Merge: 822a89e 14375ed
Author: MateusStano <69485049+MateusStano@users.noreply.github.com>
Date:   Thu Apr 25 11:44:22 2024 -0300

    Merge branch 'develop' into mnt/modularize-rocket-draw

commit 3df7586
Merge: bf8c68b 14375ed
Author: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Date:   Thu Apr 25 06:49:58 2024 -0400

    Merge branch 'develop' into bug/airbrakes-postprocess

commit 14375ed
Merge: c31c6f8 b899064
Author: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Date:   Thu Apr 25 06:47:36 2024 -0400

    Merge pull request #588 from RocketPy-Team/enh/exponential-backoff-decorator

    ENH: Exponential backoff decorator (fix #449)

commit c31c6f8
Merge: a011c5a 684b997
Author: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Date:   Thu Apr 25 06:45:26 2024 -0400

    Merge pull request #587 from RocketPy-Team/mnt/delete-cached-property

    DEP: delete deprecated rocketpy.tools.cached_property

commit b899064
Author: Gui-FernandesBR <guilherme_fernandes@usp.br>
Date:   Fri Apr 19 12:13:23 2024 -0400

    DEV: adds PR 588 to the CHANGELOG

commit a8a185e
Author: Gui-FernandesBR <guilherme_fernandes@usp.br>
Date:   Fri Apr 19 12:08:58 2024 -0400

    TST: Fix tests with Environment class after exponential_backoff decorator was used

commit d0fbcd7
Author: Gui-FernandesBR <guilherme_fernandes@usp.br>
Date:   Fri Apr 19 12:07:45 2024 -0400

    MNT: Refactor code to use the exponential_backoff decorator

commit ccd78af
Author: Gui-FernandesBR <guilherme_fernandes@usp.br>
Date:   Fri Apr 19 12:07:17 2024 -0400

    ENH: Add exponential backoff decorator to tools.py

commit 684b997
Author: Gui-FernandesBR <guilherme_fernandes@usp.br>
Date:   Thu Apr 18 21:47:19 2024 -0400

    DEV: Adds PR 587 to the CHANGELOG.md

commit bb0f46a
Author: Gui-FernandesBR <guilherme_fernandes@usp.br>
Date:   Thu Apr 18 21:41:38 2024 -0400

    MNT: refactors cached_property imports

commit afb3b32
Author: dyu056 <yudaniel888@hotmail.com>
Date:   Fri Jan 26 00:35:36 2024 +1300

    Completed changes

commit bf8c68b
Merge: aaa3f7b a011c5a
Author: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Date:   Thu Apr 18 21:17:06 2024 -0400

    Merge branch 'develop' into bug/airbrakes-postprocess

commit a011c5a
Merge: 624cc15 6b26f61
Author: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>
Date:   Thu Apr 18 15:12:40 2024 -0400

    Merge pull request #585 from RocketPy-Team/enh/swap-diff-for-flow-rate

    BUG: Swap `rocket.total_mass.differentiate` for `motor.total_mass_flow rate`

commit 6b26f61
Author: MateusStano <mateusstano@usp.br>
Date:   Wed Apr 17 22:19:16 2024 +0200

    DEV: changelog

commit 8ee2c95
Author: MateusStano <mateusstano@usp.br>
Date:   Wed Apr 17 22:16:59 2024 +0200

    ENH: create rocket total_mass_flow_rate attribute

commit aaa3f7b
Author: MateusStano <mateusstano@usp.br>
Date:   Mon Apr 15 16:52:49 2024 +0200

    DOCS: change accelerations names in docs

commit 7fe3d0b
Author: MateusStano <mateusstano@usp.br>
Date:   Mon Apr 15 16:12:39 2024 +0200

    ENH: optmize post process loop

commit a66fc53
Author: MateusStano <mateusstano@usp.br>
Date:   Mon Apr 15 15:18:37 2024 +0200

    ENH: add reset function

commit b9a97a4
Author: MateusStano <mateusstano@usp.br>
Date:   Mon Apr 15 15:06:01 2024 +0200

    ENH: add warning for improper time_overshoot

commit 830ea15
Author: MateusStano <mateusstano@usp.br>
Date:   Mon Apr 15 15:05:31 2024 +0200

    ENH: refactor retrieve arrays cached properties and controller sim post processing

commit e2a94c8
Author: MateusStano <mateusstano@usp.br>
Date:   Tue Apr 9 18:03:08 2024 +0200

    TST: fix tests

commit e5c7533
Author: MateusStano <mateusstano@usp.br>
Date:   Tue Apr 9 17:59:22 2024 +0200

    ENH: use mass_flow_rate instead of differentiate

commit 822a89e
Merge: e3e1a59 624cc15
Author: MateusStano <69485049+MateusStano@users.noreply.github.com>
Date:   Sun Apr 7 13:52:02 2024 +0200

    Merge branch 'develop' into mnt/modularize-rocket-draw

commit e3e1a59
Author: MateusStano <69485049+MateusStano@users.noreply.github.com>
Date:   Thu Apr 4 14:53:37 2024 +0200

    DEV: fix changelog order

commit 624cc15
Merge: 0a4d89b 61bf4d7
Author: Pedro Henrique Marinho Bressan <87212571+phmbressan@users.noreply.github.com>
Date:   Tue Apr 2 14:23:05 2024 -0300

    Merge pull request #565 from RocketPy-Team/doc/environment-docstring

    DOC: Improvements of Environment docstring phrasing.

commit 61bf4d7
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Mon Apr 1 15:00:10 2024 -0300

    MNT: add docs change to CHANGELOG.

commit 9c1a461
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Mon Apr 1 14:47:03 2024 -0300

    DOC: fix typing issues regarding Environment docs.

commit 4776208
Author: Pedro Henrique Marinho Bressan <87212571+phmbressan@users.noreply.github.com>
Date:   Fri Mar 29 08:47:18 2024 -0300

    DOC: Update Longitude value ranges.

    Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

commit 32a28c1
Merge: 27dd73d 0a4d89b
Author: Pedro Henrique Marinho Bressan <87212571+phmbressan@users.noreply.github.com>
Date:   Thu Mar 28 18:26:46 2024 -0300

    Merge branch 'develop' into doc/environment-docstring

commit 27dd73d
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Thu Mar 28 18:24:23 2024 -0300

    DOC: standardize grammar on time zones.

commit 4b42c9e
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Thu Mar 28 18:20:01 2024 -0300

    DOC: clarify timezones and dates Environment docs.

commit 95b61ef
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Thu Mar 28 16:38:17 2024 -0300

    DOC: specify latitude and longitude defaults.

commit 6b84c03
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Mon Mar 25 19:53:37 2024 -0300

    DOC: improve wording of Environment init.

    Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

commit 826efcc
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Sun Mar 24 16:47:14 2024 -0300

    DOC: specify datum as optional.

commit a2aa714
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Sun Mar 24 16:41:39 2024 -0300

    DOC: add examples and improvements to Environment gravity docstring.

commit 51bdd91
Author: MateusStano <mateusstano@usp.br>
Date:   Sun Mar 24 15:14:45 2024 +0100

    MNT: changelog

commit 6805e32
Author: MateusStano <mateusstano@usp.br>
Date:   Sun Mar 24 14:05:00 2024 +0100

    MNT: refactor rocket drawing plot methods

commit 3cc91e7
Merge: f637a9d 65b3315
Author: Pedro Henrique Marinho Bressan <87212571+phmbressan@users.noreply.github.com>
Date:   Thu Feb 29 20:06:09 2024 -0300

    Merge branch 'develop' into doc/environment-docstring

commit f637a9d
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Thu Feb 29 17:49:38 2024 -0300

    STY: run black for code linting.

commit 9198ac7
Author: Pedro Bressan <phmbressan@usp.br>
Date:   Thu Feb 29 17:46:23 2024 -0300

    DOC: phrasing improvements of Environment docstring.

* MNT: fix component repr for sensors

* ENH: add _attatched_rockets to sensors

* ENH: add sensors saving methods

* MNT: simplify sensors repr

* ENH: use _save_data in accel and gyro

* ENH: improve accelerometer export

* ENH: imrpove gyroscope export

* ENH: add sensor initialization

* ENH: speed up measure call

* ENH: add final sensor cache

* ENH: add export sensor data

* BUG: wrong initialization order

* TST: test for new measured_data and exports

* ENH: abstract noise printings

* MNT: run isort

* ENH: add noise variance

* BUG: fix prints for noise variance

* TST: add variances

* Update rocketpy/rocket/rocket.py

Co-authored-by: Pedro Henrique Marinho Bressan <87212571+phmbressan@users.noreply.github.com>

* ENH: add pressure to .measure params

* ENH: add InertialSensors and ScalarSensors

* ENH: add Barometer class

* BUG: fix drawing for scalar sensors

* ENH: barometer prints

* DOC: change docs for scalar sensors

* ENH: add barometer export data

* BUG: fix scalars sensors prints

* TST: add barometers to tests

* DEV: update sensors testing

* MNT: remove .type attribute

* DOC: fix units of transformation_euler_anges

* DOC: add examples to transformation_euler_angles

* DOC: mention Euler parameters in docs

* TST: test_euler_to_quaternions

* TST: fix doc tests

* MNT: privatize components attributes and improve docs

* TST: add index to var names

* MNT: return temp drift directly

* ENH: improve export methods

* DOC: typos

* MNT: improve flight init

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* Fix code style issues with Black

* TST: overall improvements on sensor testing

* ENH: change format of sensor_data dict

* MNT: improve flight init

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* TST: increase rel tolerances

* TST: fix export sensor data test

* TST: fix doctests

* TST: fix doctests

* ENH: change units in prints

* ENH: add .round to Matrix and remove broken doctests

* TST: test transfromation euler angles

* TST: imrpove test_euler_to_quaternions

* DEV: update sensors_testing notebook

* MNT: minor fixes - typos and isort

* MNT: remove aft double underscore from __units

* DOC: remove .type

* MNT: remove .units underscores

* MNT: remove repetition from sensors prints

* ENH: normalize_quaternions in tools.py

* BUG: remove Matrix circuklar import in tools

* MNT: remove unused variable

Co-authored-by: Gui-FernandesBR <63590233+Gui-FernandesBR@users.noreply.github.com>

* ENH: explicit for loop variables

* DOC: improve orientation docs

* ENH: x_position to x_offset

* TST: merge tests

* ENH: inherited export method

* TST: improve export data tests

* TST: Refactor sensor tests and export method

* TST: fix fixture names

* BUG: duplicate IntertialSensors

* TST: calisto_sensors to calisto_with_sensors

* MNT: isort

* MNT: remove type docs

* ENH: move export_sensor_measured_data to tools.py

* MNT: pylint fixes

* ENH: simplify sensors prints

* MNT: rename sensors classes

* MNT: sensor.py rename

* DOC: improve inertialsensor and scalar sensor doc

* MNT: sensors to sensor rename imports

* TST: format argument

* ENH: move generic_export_data back to Sensor class

* ENH: rename test files

* ENH: change from celsius to kelvin

* TST: fix celsius to kelvin convertion

* merge develop

* MNT: unecessary variable

* DEV: solve merge issues

* ENH: Adds GNSS Receiver sensor (#636)

* ENH: class GNSS

* ENH: gnss prints

* ENH: add params to measure call

* ENH: export data

* ENH: pass env in .measure

* DOC: gnss attribute docs

* MNT: units in prints

* MNT: fix merge errors

* TST: add gnss tests

* TST: fix time nodes tests

* DEV: add gnss to sensors testing notebook

* DEV: fix merge errors

* MNT: lint and isort

* MNT: black notebooks

* TST: fix test by inversion of rotation

* TST: lower rel tolerances and delete duplicated tests

* MNT: minor fixes

* ENH: export sensor data by sensor name

* MNT: use inverted_haversine in GNSS

* BUG: bearing unit in inverted_haversine

* MNT: pylint

* TST: add test for export with sensor name

* MNT: rename `GNSS` class to `GnssReceiver`

* MNT: fix lint

* MNT: rename gnss file

---------

Co-authored-by: Gui-FernandesBR <guilherme_fernandes@usp.br>

* DEV: updates changelog

* MNT: fix lint

* DOC: improve sensors documentation

* DOC: rename sensors notebook

* MNT: Add warning for experimental development in Sensor classes

* MNT: rename euler-quaternion conversions

* MNT: minor adjustments before merging sensors

---------

Co-authored-by: MateusStano <mateusstano@usp.br>
Co-authored-by: MateusStano <69485049+MateusStano@users.noreply.github.com>
Co-authored-by: Pedro Henrique Marinho Bressan <87212571+phmbressan@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request, including adjustments in current codes Environment Enviroment Class related features Good first issue Good for newcomers
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

2 participants