-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
Added Altitude Pressure equation #8909
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
Conversation
for more information, see https://pre-commit.ci
…thon into Altitude-Equation
.vscode/settings.json
Outdated
"python.linting.pylintEnabled": true, | ||
"python.linting.enabled": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert this change. This repo not use pylint. Instead, we use ruff that includes the pylint rules.
Line 111 in d31750a
[tool.ruff.pylint] # DO NOT INCREASE THESE VALUES |
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
Co-authored-by: Christian Clauss <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool algorithm... Just a few more tests.
physics/altitude_pressure.py
Outdated
>>> get_altitude_at_pressure(pressure=100000) | ||
105.47836610778828 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make tests for H ~= sea level, H ~= 100 meters (the current test), H ~= 1,750 (altitude of my house) also a zero pressure, a negative pressure, and a pressure greater than 101,325... The last few should prove that the code raises ValueErrors like...
Python/arithmetic_analysis/bisection.py
Lines 9 to 12 in d31750a
>>> bisection(lambda x: x ** 3 - 1, 2, 1000) | |
Traceback (most recent call last): | |
... | |
ValueError: could not find root in given interval. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice contribution!!!!
* Added Altitude Pressure equation * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Removed trailing whitespaces * Removed pylint * Fix lru_cache_pythonic.py * Fixed spellings * Fix again lru_cache_pythonic.py * Update .vscode/settings.json Co-authored-by: Christian Clauss <[email protected]> * Third fix lru_cache_pythonic.py * Update .vscode/settings.json Co-authored-by: Christian Clauss <[email protected]> * 4th fix lru_cache_pythonic.py * Update physics/altitude_pressure.py Co-authored-by: Christian Clauss <[email protected]> * lru_cache_pythonic.py: def get(self, key: Any, /) -> Any | None: * Delete lru_cache_pythonic.py * Added positive and negative pressure test cases * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Christian Clauss <[email protected]>
Describe your change:
Checklist: