-
Notifications
You must be signed in to change notification settings - Fork 142
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
Fix for Incorrect OS Version Displayed for Windows 11 in marimo env
Command
#1410
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
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.
Hey @Haleshot - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 3 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
|
||
def get_system_info() -> dict[str, Union[str, dict[str, str]]]: | ||
os_version = platform.release() |
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.
suggestion: Variable os_version might be redundant.
The os_version
variable is only used once and could be inlined directly into the dictionary assignment for OS Version
. This would reduce the number of lines and improve readability.
|
||
def get_system_info() -> dict[str, Union[str, dict[str, str]]]: | ||
os_version = platform.release() | ||
if platform.system() == "Windows" and is_win11(): |
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.
suggestion (performance): Consider combining platform.system() checks.
The platform.system()
check is performed twice in the function. Consider storing the result in a variable to avoid redundant calls and improve performance.
if platform.system() == "Windows" and is_win11(): | |
system = platform.system() | |
if system == "Windows" and is_win11(): |
marimo env
Command
@Haleshot thanks for the contribution! i think some of the code-suggestions would be good to add, and there is a lint error ( |
* adding reactive_html export * doctype to avoid quirks mode * respect config width * clarified help message * islands from_file static method * switching cli export to static method * adding ; between styles * removing exposing cli option --------- Co-authored-by: Myles Scolnick <myles@marimo.io>
recheck |
@Haleshot |
Thanks. I seem to have combined another PR (didn't pull before committing) and even that commit got added here. Looking into removing that commit. Apologize for the inconvenience caused. |
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
@mscolnick Hope it's alright now. Reverted the commit and now made the final changes. Do let me know if it's alright/anything to be done from my side. |
@Haleshot you'll still need to sign the CLA - by pasting the text from above (it should be the first message in this thread) |
I have read the CLA Document and I hereby sign the CLA |
This reverts commit 1d953f3.
Added PR template in the same. Fixes #1413 |
The merge-base changed after approval.
this PR template is great! Thank you. And thank you for the windows fix |
🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.6.1-dev7 |
@mscolnick @akshayka This PR seems to have reverted the new MarimoIslandGenerator features. |
@gvarnavi it looks like it did for a commit, but then that was unreverted. The PR diff still looks fine. Is the new feature not in the published version? |
It's not, no --that's how I caught it. |
Weird .. I can revert it. |
Let me know if #1471 looks good |
Apologize for the above confusion and inconvenience caused due to this PR. Not sure how my commits got cluttered in the first place; learning to be more comfortable with using just git CLI than the VS integration. Hope to be more careful when contributing next time. |
Oh no worries at all -- git merging can often feel like dark magic! |
Fixes #1409
PR Title
Fix OS Version Display for Windows 11 in
marimo env
CommandDescription
The current implementation of the
get_system_info
function inenvinfo.py
incorrectly retrieves the OS version usingplatform.release()
, which does not differentiate between Windows 10 and Windows 11.. This PR addresses this issue by implementing a check for Windows 11 usingsys.getwindowsversion().build
and updating theOS Version
field accordingly.More information on this here.
Changes Made
is_win11()
to determine if the OS is Windows 11 based on the build number (sys.getwindowsversion().build >= 22000
).get_system_info
to use theis_win11()
function to set theOS Version
to "11" if running on Windows 11.Example Output
Before PR:
After PR:
Checklist
is_win11()
function to correctly identify Windows 11.get_system_info
to useis_win11()
for determining the OS version.